🦋

Butterfly ID

A BioCLIP 2.5-H wing classifier for Neotropical butterflies.
This page is the inference API. Try the model in the web app:

Open the AI Identifier →

What is this?

Upload a butterfly wing photo and get a hierarchical ID (genus ▸ species ▸ subspecies). A frozen BioCLIP 2.5-H backbone feeds a cosine/ArcFace head trained on Sanger/Ikiam specimens; a YOLO26-seg model first crops the photo to the wings (masks from SAM 3), and an optional side-of-Andes / country prior re-ranks the result.

Coverage: Neotropical butterflies across all major families (~3,600 species, incl. the nocturnal Hedylidae and a few castniid moths). Most of the training data sits in the Ithomiini mimicry radiation, so confident calls on sparsely-sampled groups warrant extra caution; even mimetic Ithomiini subspecies are genuinely hard to tell apart.

API

GET/health· liveness + mode (real/mock)
GET/metadata· label space + whether the wing-crop loaded
POST/predict_raw· images[] → top-64 leaf probs + wing masks
POST/predict· images[] + prior → marginalised ranks
curl -F images=@butterfly.jpg \
  https://fr4nzzch-butterfly-id.hf.space/predict_raw

Weights

The trained classifier head + wing-cropper are downloadable (CC-BY-NC-4.0) from fr4nzzch/butterfly-id-classifier. The frozen BioCLIP 2.5-H backbone is upstream at imageomics/bioclip-2.5-vith14.

Training data

The subspecies-level taxonomic identifications used to train the classifier were compiled from Butterflies of America, Sangay, Noreste, and Cotacachi.

BioCLIP 2.5-H + CosineHead · wing-crop YOLO26-seg · masks SAM 3 · an AI suggestion, not a definitive identification.