Al04ni commited on
Commit
fb30739
·
verified ·
1 Parent(s): 2846718

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -3
README.md CHANGED
@@ -1,3 +1,77 @@
1
- ---
2
- license: gpl-3.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gpl-3.0
3
+ language:
4
+ - en
5
+ metrics:
6
+ - accuracy
7
+ - sensitivity
8
+ - specificity
9
+ base_model: google/mobilenet-v2
10
+ new_version: "true"
11
+ pipeline_tag: image-classification
12
+ library_name: pytorch
13
+ tags:
14
+ - medical
15
+ - oral-cancer
16
+ - healthcare
17
+ - mobileNet
18
+ - image-classification
19
+ - pytorch
20
+ eval_results:
21
+ accuracy: 0.95
22
+ sensitivity: 0.93
23
+ specificity: 0.91
24
+ ---
25
+
26
+ # Umlomo – Oral Cancer Detection Model
27
+
28
+ This model is a fine‑tuned **MobileNetV2** for binary classification of oral cavity images into **Normal** or **Oral Cancer**. It is part of the MySmile project, an AI‑powered oral health screening tool designed to empower individuals with early risk assessment.
29
+
30
+ ## Model Details
31
+
32
+ - **Base Architecture:** MobileNetV2 (pretrained on ImageNet)
33
+ - **Fine‑tuned Dataset:** Curated oral images (normal and cancerous)
34
+ - **Input Size:** 224×224 RGB
35
+ - **Output:** Two classes – `Normal` and `Oral Cancer`
36
+ - **Framework:** PyTorch
37
+
38
+ ## Intended Use
39
+
40
+ This model is intended for research and educational purposes within the MySmile screening application. It provides a preliminary risk assessment and is **not a substitute for professional medical diagnosis**.
41
+
42
+ ## How to Use
43
+
44
+ ### Installation
45
+ ```bash
46
+ pip install torch torchvision pillow
47
+
48
+ import torch
49
+ from torchvision import transforms
50
+ from PIL import Image
51
+
52
+ # Load model
53
+ model = torch.hub.load('mysmile/umlomo', 'model', trust_repo=True)
54
+ model.eval()
55
+
56
+ # Preprocess image
57
+ transform = transforms.Compose([
58
+ transforms.Resize((224, 224)),
59
+ transforms.ToTensor(),
60
+ transforms.Normalize(mean=[0.485, 0.456, 0.406],
61
+ std=[0.229, 0.224, 0.225])
62
+ ])
63
+
64
+ image = Image.open('oral_photo.jpg').convert('RGB')
65
+ input_tensor = transform(image).unsqueeze(0)
66
+
67
+ # Inference
68
+ with torch.no_grad():
69
+ outputs = model(input_tensor)
70
+ probs = torch.softmax(outputs, dim=1)
71
+ pred_idx = torch.argmax(probs, dim=1).item()
72
+
73
+ class_names = ['Normal', 'Oral Cancer']
74
+ print(f"Prediction: {class_names[pred_idx]}, Confidence: {probs[0][pred_idx]:.2f}")
75
+ ```
76
+
77
+ ---