Purino/resnet50-brain-tumor-mri
010
ResNet50 fine-tuned on Brain Tumor MRI Dataset
Fine-tuned from torchvision ImageNet-pretrained ResNet50 on the Brain Tumor MRI Dataset (classes: glioma, meningioma, notumor, pituitary).
Test accuracy: 0.9192 Test loss: 0.3549
Usage
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).
⚠️ Disclaimer
Trained for research/educational purposes only. This is not a medical device and must not be used for real clinical diagnosis or treatment decisions.
