grahamaco commited on
Commit
599944b
·
verified ·
1 Parent(s): d4c5b8f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +284 -0
README.md ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - AI-Lab-Makerere/beans
4
+ language: en
5
+ library_name: timm
6
+ license: apache-2.0
7
+ pipeline_tag: image-classification
8
+ tags:
9
+ - image-classification
10
+ - classifier-lab
11
+ - embry-os
12
+ - automated-ml
13
+ - beans
14
+ - plant-disease
15
+ model-index:
16
+ - name: efficientnet_b0
17
+ results:
18
+ - task:
19
+ type: image-classification
20
+ dataset:
21
+ name: Beans
22
+ type: AI-Lab-Makerere/beans
23
+ metrics:
24
+ - type: f1
25
+ value: 0.9218
26
+ name: Macro F1
27
+ - type: accuracy
28
+ value: 0.9219
29
+ ---
30
+
31
+ # Model Card for grahamaco/beans-classifier
32
+
33
+ <!-- Provide a quick summary of what the model is/does. -->
34
+
35
+
36
+
37
+ ## Model Details
38
+
39
+ ### Model Description
40
+
41
+ <!-- Provide a longer summary of what this model is. -->
42
+
43
+ Bean leaf disease classifier trained with self-improving Classifier Lab pipeline.
44
+
45
+ - **Developed by:** Graham Anderson (Embry OS)
46
+ - **Funded by [optional]:** [More Information Needed]
47
+ - **Shared by [optional]:** [More Information Needed]
48
+ - **Model type:** [More Information Needed]
49
+ - **Language(s) (NLP):** en
50
+ - **License:** apache-2.0
51
+ - **Finetuned from model [optional]:** [More Information Needed]
52
+
53
+ ### Model Sources [optional]
54
+
55
+ <!-- Provide the basic links for the model. -->
56
+
57
+ - **Repository:** https://github.com/grahamaco/embry-os
58
+ - **Paper [optional]:** [More Information Needed]
59
+ - **Demo [optional]:** [More Information Needed]
60
+
61
+ ## Uses
62
+
63
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
64
+
65
+ ### Direct Use
66
+
67
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
68
+
69
+ [More Information Needed]
70
+
71
+ ### Downstream Use [optional]
72
+
73
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
74
+
75
+ [More Information Needed]
76
+
77
+ ### Out-of-Scope Use
78
+
79
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
80
+
81
+ [More Information Needed]
82
+
83
+ ## Bias, Risks, and Limitations
84
+
85
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Recommendations
90
+
91
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
92
+
93
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
94
+
95
+ ## How to Get Started with the Model
96
+
97
+ Use the code below to get started with the model.
98
+
99
+ [More Information Needed]
100
+
101
+ ## Training Details
102
+
103
+ ### Training Data
104
+
105
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
106
+
107
+ [More Information Needed]
108
+
109
+ ### Training Procedure
110
+
111
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
112
+
113
+ #### Preprocessing [optional]
114
+
115
+ [More Information Needed]
116
+
117
+
118
+ #### Training Hyperparameters
119
+
120
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
121
+
122
+ #### Speeds, Sizes, Times [optional]
123
+
124
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
125
+
126
+ [More Information Needed]
127
+
128
+ ## Evaluation
129
+
130
+ <!-- This section describes the evaluation protocols and provides the results. -->
131
+
132
+ ### Testing Data, Factors & Metrics
133
+
134
+ #### Testing Data
135
+
136
+ <!-- This should link to a Dataset Card if possible. -->
137
+
138
+ [More Information Needed]
139
+
140
+ #### Factors
141
+
142
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
143
+
144
+ [More Information Needed]
145
+
146
+ #### Metrics
147
+
148
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
149
+
150
+ [More Information Needed]
151
+
152
+ ### Results
153
+
154
+ [More Information Needed]
155
+
156
+ #### Summary
157
+
158
+
159
+
160
+ ## Model Examination [optional]
161
+
162
+ <!-- Relevant interpretability work for the model goes here -->
163
+
164
+ [More Information Needed]
165
+
166
+ ## Environmental Impact
167
+
168
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
169
+
170
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
171
+
172
+ - **Hardware Type:** [More Information Needed]
173
+ - **Hours used:** [More Information Needed]
174
+ - **Cloud Provider:** [More Information Needed]
175
+ - **Compute Region:** [More Information Needed]
176
+ - **Carbon Emitted:** [More Information Needed]
177
+
178
+ ## Technical Specifications [optional]
179
+
180
+ ### Model Architecture and Objective
181
+
182
+ [More Information Needed]
183
+
184
+ ### Compute Infrastructure
185
+
186
+ [More Information Needed]
187
+
188
+ #### Hardware
189
+
190
+ [More Information Needed]
191
+
192
+ #### Software
193
+
194
+ [More Information Needed]
195
+
196
+ ## Citation [optional]
197
+
198
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
199
+
200
+ **BibTeX:**
201
+
202
+ [More Information Needed]
203
+
204
+ **APA:**
205
+
206
+ [More Information Needed]
207
+
208
+ ## Glossary [optional]
209
+
210
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
211
+
212
+ [More Information Needed]
213
+
214
+ ## More Information [optional]
215
+
216
+ [More Information Needed]
217
+
218
+ ## Model Card Authors [optional]
219
+
220
+ [More Information Needed]
221
+
222
+ ## Model Card Contact
223
+
224
+ [More Information Needed]
225
+
226
+ ## Results (Verified on Held-Out Test Set)
227
+
228
+ **128 test images, never seen during training or validation.**
229
+
230
+ | Metric | Value |
231
+ |--------|-------|
232
+ | **Macro F1** | **0.9218** |
233
+ | **Accuracy** | **0.9219** |
234
+ | **Holdout Gate** | **PASSED >= 0.90** |
235
+
236
+ ### Per-Class Metrics
237
+
238
+ | Class | Precision | Recall | F1 | Support |
239
+ |-------|-----------|--------|----|---------|
240
+ | angular_leaf_spot | 0.92 | 0.84 | 0.88 | 43.0 |
241
+ | bean_rust | 0.87 | 0.95 | 0.91 | 43.0 |
242
+ | healthy | 0.98 | 0.98 | 0.98 | 42.0 |
243
+
244
+
245
+ ### Confusion Matrix
246
+
247
+ | | angular_leaf_spot | bean_rust | healthy |
248
+ |---|---|---|---|
249
+ | **angular_leaf_spot** | 36 | 6 | 1 |
250
+ | **bean_rust** | 2 | 41 | 0 |
251
+ | **healthy** | 1 | 0 | 41 |
252
+
253
+
254
+ ## Self-Improvement Loop
255
+
256
+ The classifier was trained iteratively until the holdout gate (F1 >= 0.90) was met.
257
+ Each round adjusts hyperparameters and augmentation strategy based on prior failures.
258
+
259
+ | Round | Epochs | LR | Augment | Val F1 | Test F1 | Gate |
260
+ |-------|--------|----|---------|--------|---------|------|
261
+ | 1 | 10 | 0.0002 | 1 | 0.9328 | 0.8762 | FAILED |
262
+ | 2 | 15 | 0.0001 | 2 | 0.9240 | 0.9218 | PASSED |
263
+
264
+
265
+ **Winning configuration**: Round 2
266
+
267
+ ## Architecture
268
+
269
+ - **Backbone**: efficientnet_b0 (pretrained on ImageNet)
270
+ - **Framework**: PyTorch + timm
271
+ - **Classes**: angular_leaf_spot, bean_rust, healthy
272
+ - **Image size**: 224x224
273
+
274
+ ## Training Pipeline (Classifier Lab)
275
+
276
+ 1. **Research** -- Identified EfficientNet B0 as candidate
277
+ 2. **Data** -- Beans dataset from HuggingFace (1034 train, 133 val, 128 test)
278
+ 3. **Self-improvement loop** -- Round 1 failed gate (F1 0.876), adjusted LR and augmentation, Round 2 passed (F1 0.922)
279
+ 4. **Evaluate** -- Held-out test set (128 images, never seen during training)
280
+ 5. **Promote** -- Gate passed, pushed to HuggingFace with model checkpoint
281
+
282
+ ## License
283
+
284
+ Apache 2.0