Downloads · 30 days
5
8% of all-time downloads
Purino/resnet50-brain-tumor-detection
resnet50-brain-tumor-detection is a image classification model from Purino. Use it when you need a label for an image.
Fine-tuned from torchvision ImageNet-pretrained ResNet50 on the Brain Tumor Detection Dataset (5,249 MRI images, YOLO-annotated; classes used here as image-level labels: glioma, meningioma, notumor, pituitary). Only t…
Downloads · 30 days
5
8% of all-time downloads
All-time downloads
65
Public
Parameters
23.6M
94.3 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors94.3 MB · 100%
From the Hugging Face model README
Fine-tuned from torchvision ImageNet-pretrained ResNet50 on the Brain Tumor Detection Dataset
(5,249 MRI images, YOLO-annotated; classes used here as image-level labels: glioma, meningioma, notumor, pituitary).
Only the tumor-class label was used for training — the bounding boxes were not.
Test accuracy: 0.9618 Test loss: 0.1060
This is a plain PyTorch state_dict saved as .safetensors (not a transformers model).
Rebuild the architecture and load the weights:
import torch
from torchvision.models import resnet50
from safetensors.torch import load_file
model = resnet50(weights=None)
model.fc = torch.nn.Linear(model.fc.in_features, 4)
model.load_state_dict(load_file("model.safetensors"))
model.eval()
Preprocess inputs to 224x224 RGB, normalized with mean [0.485, 0.456, 0.406] and
std [0.229, 0.224, 0.225] (see config.json for the full label mapping).
Trained for research/educational purposes only. This is not a medical device and must not be used for real clinical diagnosis or treatment decisions.