๐Ÿง  Brain Tumor Classification - ResNet50

Model ResNet50 yang di-fine-tune untuk mendeteksi tumor otak dari gambar MRI.

Performa

  • Validation Accuracy: 0.9933 (99.33%)

Kelas

  • no โ†’ Tidak ada tumor
  • yes โ†’ Ada tumor

Cara Penggunaan

import torch, json
from torchvision import models, transforms
import torch.nn as nn
from PIL import Image

with open("config.json") as f:
    cfg = json.load(f)

model = models.resnet50(weights=None)
model.fc = nn.Sequential(
    nn.Dropout(0.5), nn.Linear(model.fc.in_features, 256),
    nn.ReLU(), nn.Dropout(0.3), nn.Linear(256, cfg['num_classes'])
)
ckpt = torch.load("pytorch_model.pth", map_location="cpu")
model.load_state_dict(ckpt['model_state_dict'])
model.eval()
Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using yusufards/brain-tumor-classification-resnet50-v1 1