Shadow0482/mithu-mobilevit-dr
By Shadow0482 · ↓ 6 · ♥ 0 · Updated 2026-01-07
What's in this repo
This page lists the files in Shadow0482/mithu-mobilevit-dr, including mithu-vit.onnx.
- 1 ONNX models (.onnx files)
- 7 files, including 2 .json, 1 .md, 1 .onnx, 1 .safetensors, 1 .bin
- Last updated 2026-01-07
ONNX files
| File | Size | Download |
|---|---|---|
| mithu-vit.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
Mithu-ViT: Diabetic Retinopathy Classifier
This is a MobileViT (Small) model fine-tuned on the Processed Diabetic Retinopathy dataset.
It classifies retina scans into 5 severity levels:
- 0: No DR
- 1: Mild
- 2: Moderate
- 3: Severe
- 4: Proliferative DR
Model Details
- Architecture: MobileViT-Small (Apple)
- Format: PyTorch (
pytorch_model.bin) and ONNX (mithu-vit.onnx) - Resolution: 256x256
- License: Apache 2.0
Usage (PyTorch)
from transformers import MobileViTForImageClassification, MobileViTImageProcessor
from PIL import Image
import torch
# 1. Load Model
model = MobileViTForImageClassification.from_pretrained("Shadow0482/mithu-mobilevit-dr")
processor = MobileViTImageProcessor.from_pretrained("Shadow0482/mithu-mobilevit-dr")
# 2. Load Image
image = Image.open("path_to_eye_scan.jpg").convert("RGB")
# 3. Predict
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
print("Predicted Class:", model.config.id2label[outputs.logits.argmax(-1).item()])
Usage (ONNX)
import onnxruntime as ort
import numpy as np
from PIL import Image
# 1. Start Session
session = ort.InferenceSession("mithu-vit.onnx")
# 2. Prepare Input
img = Image.open("test.jpg").resize((256, 256))
img_data = np.array(img).transpose(2, 0, 1).astype(np.float32) / 255.0
img_data = np.expand_dims(img_data, axis=0)
# 3. Run
outputs = session.run(None, {"pixel_values": img_data})
print("Logits:", outputs[0])
Model info
image-classification
transformers
transformers
onnx
safetensors
mobilevit
image-classification
vision
medical
dataset:rohithgowdax/processed-dr
endpoints_compatible
region:us
↓ 6
♥ 0
Created: 2026-01-07
Updated: 2026-01-07
View on Hugging FaceFiles (7)
.gitattributes
README.md
config.json
mithu-vit.onnx
ONNX
model.safetensors
preprocessor_config.json
training_args.bin