Model Card for AntID-Tutor Genus Classifier

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.

Model Details

Model Description

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.

  • Developed by: Terry Stilwell
  • Funded by: Old Dominion University (as part of CS895 AI for Health & Life Sciences project)
  • Shared by: tstilwel (https://huggingface.co/tstilwel/antID-tutor-genus)
  • Model type: Image classification (CNN)
  • Language(s) (NLP): N/A (Vision task)
  • License: Apache-2.0
  • Finetuned from model: torchvision.models.efficientnet_b4 (pretrained on ImageNet)

Model Sources

Uses

Direct Use

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.

Downstream Use

Can be embedded into broader biodiversity platforms or entomological mobile apps with species distribution mapping or educational content.

Out-of-Scope Use

  • Not suitable for species-level identification.
  • Not intended for medical, pest control, or legal decision-making.
  • May not generalize well to highly distorted or poorly illuminated images.

Bias, Risks, and Limitations

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.

Recommendations

  • Use high-quality, centered images.
  • Combine predictions with expert validation.
  • Future work may include species-level training and regional ecological integration.

How to Get Started with the Model

You can test the model locally on the ODU Wahab cluster using the included inference script:

# Request GPU node (if needed)
salloc -p gpu --gres gpu:1

# Load PyTorch module
module load container_env pytorch-gpu/2.5.1

# Run inference
cd inference/genus
crun -p ~/envs/myrmecid python inference.py \
  --image casent0901862_h_1_med.jpg \
  --model genus_best_model_full.pth \
  --classes classes.json

Training Details

Training Data

  • Curated ant images with labeled genus from AntWeb and ODU image sets.
  • 42 ant genera.
  • Balanced sampling and augmentations applied (resizing, normalization).

Training Procedure

  • Framework: PyTorch
  • Architecture: EfficientNet-B4
  • Loss: Cross-Entropy
  • Optimizer: Adam
  • Epochs: 100
  • Batch size: 64
  • Learning Rate: 0.0005

Evaluation

Testing Data, Factors & Metrics

Testing Data

Held-out validation set from the same sources as training.

Factors

Image quality, angle (head/dorsal/profile), lighting.

Metrics

  • Top-1 Accuracy
  • Confusion Matrix
  • SHAP Visual Explanations

Results

  • Accuracy: ~92%

Environmental Impact

  • Hardware Type: A100 GPU (university cluster)
  • Cloud Provider: None (on-prem HPC)
  • Compute Region: USA (Old Dominion University)

Technical Specifications

Model Architecture and Objective

  • EfficientNet-B4 with modified classifier head
  • Objective: multi-class genus prediction (42 classes)

Compute Infrastructure

  • Hardware: NVIDIA A100 GPU
  • Software: PyTorch 2.1.0, torchvision, Python 3.9

Citation

APA: Stilwell, T. (2025). AntID Tutor: A Genus-Level Classifier for Ant Images Using EfficientNet-B4. Old Dominion University.

BibTeX:

@misc{stilwell2025antid,
  author = {Terry Stilwell},
  title = {AntID Tutor: A Genus-Level Classifier for Ant Images Using EfficientNet-B4},
  year = {2025},
  howpublished = {\url{https://huggingface.co/tstilwel/antID-tutor-genus}}
}

Model Card Contact

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support