Downloads · 30 days
4
5% of all-time downloads
diwaskunwar10/brain-tumor-vit-candor
brain-tumor-vit-candor is a image classification model from diwaskunwar10. Use it when you need a label for an image. The card lists the license as mit.
This is a Vision Transformer (ViT) fine-tuned for classifying brain MRI scans into four categories: 1. glioma 2. meningioma 3. notumor 4. pituitary
Downloads · 30 days
4
5% of all-time downloads
All-time downloads
88
Public
Parameters
85.8M
343 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors343 MB · 100%
From the Hugging Face model README
This is a Vision Transformer (ViT) fine-tuned for classifying brain MRI scans into four categories:
gliomameningiomanotumorpituitaryThe model is based on google/vit-base-patch16-224-in21k and fine-tuned on a dataset of brain MRI scans. It is used as the core classification engine in the Candor Dust application.
This model deployment includes:
You can load the model directly via the transformers library:
from transformers import ViTForImageClassification, ViTImageProcessor
import torch
from PIL import Image
model_name = "diwaskunwar10/brain-tumor-vit-candor"
processor = ViTImageProcessor.from_pretrained(model_name)
model = ViTForImageClassification.from_pretrained(model_name)
image = Image.open("path_to_mri.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
probs = torch.nn.functional.softmax(outputs.logits, dim=-1)
predicted_class = probs.argmax(-1).item()
print(model.config.id2label[predicted_class])
⚠️ RESEARCH PROTOTYPE ONLY — NOT a certified medical device. Not for clinical use. Always consult qualified healthcare professionals for medical decisions.