piky commited on
Commit
d760b69
Β·
verified Β·
1 Parent(s): 5938e7c

Create README.md

Browse files

Add model card (README.md)

Files changed (1) hide show
  1. README.md +248 -0
README.md ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - Ultralytics/YOLO11
7
+ pipeline_tag: object-detection
8
+ ---
9
+
10
+ # YOLO11 Pill Detection Model
11
+
12
+ ## Model Description
13
+
14
+ This model is a custom-trained **YOLO11 object detection model** developed for detecting **full pills** in images.
15
+ It was trained using a labeled dataset prepared in **Roboflow** and exported in **YOLO format**.
16
+
17
+ The model identifies pills by predicting:
18
+
19
+ * Bounding boxes
20
+ * Confidence scores
21
+ * Object class labels
22
+
23
+ Currently, the model supports **one detection class**:
24
+
25
+ * `pill`
26
+
27
+ This project is designed for pharmaceutical object detection research and computer vision experimentation.
28
+
29
+ ---
30
+
31
+ ## Model Details
32
+
33
+ ### Model Type
34
+
35
+ * **Architecture:** YOLO11
36
+ * **Task:** Object Detection
37
+ * **Framework:** Ultralytics YOLO
38
+
39
+ ### Classes
40
+
41
+ ```yaml id="5m4e5l"
42
+ names:
43
+ 0: pill
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Intended Uses
49
+
50
+ ### Primary Use Cases
51
+
52
+ This model is intended for:
53
+
54
+ * Pill detection in images
55
+ * Pharmaceutical automation experiments
56
+ * Computer vision prototyping
57
+ * Medication localization in images/video
58
+
59
+ ### Out-of-Scope Use
60
+
61
+ This model is **not intended for**:
62
+
63
+ * Medical diagnosis
64
+ * Drug verification in clinical workflows
65
+ * Safety-critical pharmaceutical decisions
66
+
67
+ Predictions may be inaccurate under challenging imaging conditions.
68
+
69
+ ---
70
+
71
+ ## Training Data
72
+
73
+ The model was trained on a **custom Roboflow dataset** containing images of **Labeled_full_pill Computer Vision Model** annotated with bounding boxes.
74
+
75
+ ### Dataset Characteristics
76
+
77
+ * Annotated in Roboflow
78
+ * Exported in YOLO8 format
79
+ * Single object class: `pill`
80
+
81
+ ### Dataset Split
82
+
83
+ Example:
84
+
85
+ * **Train:** 70%
86
+ * **Validation:** 20%
87
+ * **Test:** 10%
88
+
89
+ > Replace with your actual dataset split ratios.
90
+
91
+ ---
92
+
93
+ ## Training Procedure
94
+
95
+ The model was trained using **Ultralytics YOLO11** with pretrained weights.
96
+
97
+ ### Training Hyperparameters
98
+
99
+ ```yaml id="swf4hk"
100
+ model: yolo11n.pt
101
+ epochs: 100
102
+ imgsz: 640
103
+ batch: 16
104
+ optimizer: auto
105
+ device: 6
106
+ ```
107
+
108
+ ### Training Command
109
+
110
+ ```bash id="x0n8cd"
111
+ yolo train device=6 \
112
+ model=ul://ultralytics/yolo11/yolo11n \
113
+ data=ul://wijai-thongsom/datasets/labeled-full-pillv2iyolov8 \
114
+ roject=wijai-thongsom/jolly-husky \
115
+ name=exp
116
+ epochs=100 \
117
+ imgsz=640 \
118
+ batch=-1
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Evaluation Results
124
+
125
+ Model performance was evaluated on the validation set using standard object detection metrics.
126
+
127
+ ### Metrics
128
+
129
+ | Metric | Value |
130
+ | --------- | ----: |
131
+ | Precision | 0.919417 |
132
+ | Recall | 0.885885 |
133
+ | mAP50 | 0.950869 |
134
+ | mAP50-95 | 0.70499 |
135
+
136
+ > Replace these values with the actual metrics from your training results.
137
+
138
+ ---
139
+
140
+ ## Inference
141
+
142
+ ### CLI Example
143
+
144
+ ```bash id="7yqz1e"
145
+ yolo detect predict \
146
+ model=yolo11n.pt \
147
+ source=image.jpg
148
+ ```
149
+
150
+ ### Python Example
151
+
152
+ ```python id="x61czj"
153
+ from ultralytics import YOLO
154
+
155
+ model = YOLO("yolo11n.pt")
156
+ results = model("image.jpg")
157
+
158
+ for result in results:
159
+ print(result.boxes)
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Limitations
165
+
166
+ The model performance may degrade in cases such as:
167
+
168
+ * Poor lighting
169
+ * Motion blur
170
+ * Partial occlusion
171
+ * Overlapping pills
172
+ * Pill appearances not represented in the training dataset
173
+
174
+ Performance is dependent on image quality and dataset diversity.
175
+
176
+ ---
177
+
178
+ ## Bias and Risks
179
+
180
+ Because this model was trained on a custom dataset, its predictions may be biased toward:
181
+
182
+ * Specific pill colors
183
+ * Particular lighting conditions
184
+ * Limited pill shapes and sizes
185
+ * Background styles present in training data
186
+
187
+ Use caution when applying the model to images outside the training distribution.
188
+
189
+ ---
190
+
191
+ ## Environmental Impact
192
+
193
+ Training object detection models requires computational resources that consume energy.
194
+
195
+ Training setup example:
196
+
197
+ * **Hardware:** GPU
198
+ * **Framework:** Ultralytics YOLO11
199
+ * **Epochs:** 100
200
+
201
+ For reproducibility, document:
202
+
203
+ * GPU type
204
+ * Training duration
205
+ * Energy consumption estimate
206
+
207
+ ---
208
+
209
+ ## Model Files
210
+
211
+ Typical files included in this repository:
212
+
213
+ ```bash id="5nucyy"
214
+ .
215
+ β”œβ”€β”€ README.md
216
+ β”œβ”€β”€ yolo11n.pt
217
+ β”œβ”€β”€ data.yaml
218
+ └── results.png
219
+ ```
220
+
221
+ ---
222
+
223
+ ## Citation
224
+
225
+ If you use this model, please cite:
226
+
227
+ ```bibtex id="54bb7l"
228
+ @misc{yolo11-pill-detection,
229
+ title={YOLO11 Pill Detection Model},
230
+ author={Wijai Thongsom},
231
+ year={2026},
232
+ publisher={Hugging Face}
233
+ }
234
+ ```
235
+
236
+ ---
237
+
238
+ ## License
239
+
240
+ This model is released under the **MIT License**.
241
+
242
+ ---
243
+
244
+ ## Acknowledgments
245
+
246
+ * **Ultralytics** for YOLO11
247
+ * **Roboflow** for dataset annotation/export
248
+ * **Hugging Face Hub** for model hosting