tstilwel commited on
Commit
dadcaf9
·
verified ·
1 Parent(s): 42fb1c9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +151 -3
README.md CHANGED
@@ -1,5 +1,153 @@
1
  ---
 
2
  license: apache-2.0
3
- language:
4
- - en
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+
3
  license: apache-2.0
4
+
5
+ ---
6
+
7
+ # Model Card for AntID-Tutor Genus Classifier
8
+
9
+ This model card documents the EfficientNet-B4 model used by the AntID Tutor platform to classify ant genus from user-submitted images. It supports educational outreach in myrmecology and assists students in exploring ant biodiversity.
10
+
11
+ ## Model Details
12
+
13
+ ### Model Description
14
+
15
+ This model is a fine-tuned EfficientNet-B4 convolutional neural network trained to classify ant images into one of 42 known genera. It powers the genus identification feature in the AntID Tutor application.
16
+
17
+ * **Developed by:** Terry Stilwell
18
+ * **Funded by:** Old Dominion University (as part of CS895 AI for Health & Life Sciences project)
19
+ * **Shared by:** tstilwel ([https://huggingface.co/tstilwel/antID-tutor-genus](https://huggingface.co/tstilwel/antID-tutor-genus))
20
+ * **Model type:** Image classification (CNN)
21
+ * **Language(s) (NLP):** N/A (Vision task)
22
+ * **License:** Apache-2.0
23
+ * **Finetuned from model:** torchvision.models.efficientnet\_b4 (pretrained on ImageNet)
24
+
25
+ ### Model Sources
26
+
27
+ * **Repository:** [https://github.com/tstilwell91/cs895\_project\_ants](https://github.com/tstilwell91/cs895_project_ants)
28
+ * **Demo:** [http://localhost:5002](http://localhost:5002) (local Flask web app)
29
+
30
+ ## Uses
31
+
32
+ ### Direct Use
33
+
34
+ This model is used in a web-based learning platform where students upload ant specimen images to receive genus-level predictions along with interpretive educational content.
35
+
36
+ ### Downstream Use
37
+
38
+ Can be embedded into broader biodiversity platforms or entomological mobile apps with species distribution mapping or educational content.
39
+
40
+ ### Out-of-Scope Use
41
+
42
+ * Not suitable for species-level identification.
43
+ * Not intended for medical, pest control, or legal decision-making.
44
+ * May not generalize well to highly distorted or poorly illuminated images.
45
+
46
+ ## Bias, Risks, and Limitations
47
+
48
+ The model is trained on a curated subset of labeled ant images and may underperform on genera not present in the training set. Misclassification may occur with rare, damaged, or low-resolution samples.
49
+
50
+ ### Recommendations
51
+
52
+ * Use high-quality, centered images.
53
+ * Combine predictions with expert validation.
54
+ * Future work may include species-level training and regional ecological integration.
55
+
56
+ ## How to Get Started with the Model
57
+
58
+ You can test the model locally on the ODU Wahab cluster using the included inference script:
59
+
60
+ ```bash
61
+ # Request GPU node (if needed)
62
+ salloc -p gpu --gres gpu:1
63
+
64
+ # Load PyTorch module
65
+ module load container_env pytorch-gpu/2.5.1
66
+
67
+ # Run inference
68
+ cd inference/genus
69
+ crun -p ~/envs/myrmecid python inference.py \
70
+ --image casent0901862_h_1_med.jpg \
71
+ --model genus_best_model_full.pth \
72
+ --classes classes.json
73
+ ```
74
+
75
+ ## Training Details
76
+
77
+ ### Training Data
78
+
79
+ * Curated ant images with labeled genus from AntWeb and ODU image sets.
80
+ * 42 ant genera.
81
+ * Balanced sampling and augmentations applied (resizing, normalization).
82
+
83
+ ### Training Procedure
84
+
85
+ * Framework: PyTorch
86
+ * Architecture: EfficientNet-B4
87
+ * Loss: Cross-Entropy
88
+ * Optimizer: Adam
89
+ * Epochs: 100
90
+ * Batch size: 64
91
+ * Learning Rate: 0.0005
92
+
93
+ ## Evaluation
94
+
95
+ ### Testing Data, Factors & Metrics
96
+
97
+ #### Testing Data
98
+
99
+ Held-out validation set from the same sources as training.
100
+
101
+ #### Factors
102
+
103
+ Image quality, angle (head/dorsal/profile), lighting.
104
+
105
+ #### Metrics
106
+
107
+ * Top-1 Accuracy
108
+ * Confusion Matrix
109
+ * SHAP Visual Explanations
110
+
111
+ ### Results
112
+
113
+ * Accuracy: \~92%
114
+
115
+ ## Environmental Impact
116
+
117
+ * **Hardware Type:** A100 GPU (university cluster)
118
+ * **Cloud Provider:** None (on-prem HPC)
119
+ * **Compute Region:** USA (Old Dominion University)
120
+
121
+ ## Technical Specifications
122
+
123
+ ### Model Architecture and Objective
124
+
125
+ * EfficientNet-B4 with modified classifier head
126
+ * Objective: multi-class genus prediction (42 classes)
127
+
128
+ ### Compute Infrastructure
129
+
130
+ * **Hardware:** NVIDIA A100 GPU
131
+ * **Software:** PyTorch 2.1.0, torchvision, Python 3.9
132
+
133
+ ## Citation
134
+
135
+ **APA:**
136
+ Stilwell, T. (2025). *AntID Tutor: A Genus-Level Classifier for Ant Images Using EfficientNet-B4*. Old Dominion University.
137
+
138
+ **BibTeX:**
139
+
140
+ ```bibtex
141
+ @misc{stilwell2025antid,
142
+ author = {Terry Stilwell},
143
+ title = {AntID Tutor: A Genus-Level Classifier for Ant Images Using EfficientNet-B4},
144
+ year = {2025},
145
+ howpublished = {\url{https://huggingface.co/tstilwel/antID-tutor-genus}}
146
+ }
147
+ ```
148
+
149
+ ## Model Card Contact
150
+
151
+ * Terry Stilwell
152
+ * GitHub: [https://github.com/tstilwell91](https://github.com/tstilwell91)
153
+ * Email: [tstilwel@cs.odu.edu](mailto:tstilwel@cs.odu.edu)