Run this model with HF Jobs

Run TomBellivier/extraits-models on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/TomBellivier/extraits-models. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/TomBellivier/extraits-models on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
extraits-models / README.md
TomBellivier's picture
Update README.md
6cfcdc6 verified
|
Raw History Blame Contribute Delete
4.94 kB
metadata
license: agpl-3.0
library_name: ultralytics
pipeline_tag: keypoint-detection
tags:
  - insects
  - morphometrics
  - pose-estimation
  - yolo
  - biology
  - extraits

EXTRAITS models (v0.1.0)

DOI

Models used by EXTRAITS to measure insects on dorsal images:

Folder Model Role
pose/ ensemble of YOLO-pose models (one per cross-validation fold) 42 keypoints, from which 27 measurements are derived
scale_bar/ YOLO detector finds the scale bar; its value is read by EasyOCR
measurement_validity/ one random forest per measurement (scikit-learn) says whether each measurement is valid

Download them with the EXTRAITS command line, which checks every file against the sha256 pinned in the package:

extraits download-models            # into <workspace>/models
extraits process -i <images folder> -o results.csv

Training data

The pose models and the validity classifiers were trained on dorsal images of insects from several natural-history image databases, annotated for the GRIT project. The images are not redistributable, so neither the images nor the annotations are published.

Annotated images: 2643 (coleoptera 1060, diptera 487, hymenoptera 341, lepidoptera 661).

The pose models are fine-tuned from Ultralytics yolo26n-pose.pt. The scale-bar detector was trained outside the EXTRAITS repository and is published as weights only.

Evaluation

Pose ensemble

Cross-validated oks_ap of the ensemble members on their held-out folds: 0.810 ± 0.007 (5 folds).

Member Held-out fold oks_ap
yolo_pooled__pooled__kfold5_grouped_seed42_pooled__fold0__pooled_yolo-tuned__e019aa15 0 0.809
yolo_pooled__pooled__kfold5_grouped_seed42_pooled__fold1__pooled_yolo-tuned__dc08bcf5 1 0.808
yolo_pooled__pooled__kfold5_grouped_seed42_pooled__fold2__pooled_yolo-tuned__9a1dc23c 2 0.820
yolo_pooled__pooled__kfold5_grouped_seed42_pooled__fold3__pooled_yolo-tuned__ef4ff9d8 3 0.801
yolo_pooled__pooled__kfold5_grouped_seed42_pooled__fold4__pooled_yolo-tuned__583de0c4 4 0.812
  • Keypoint schema: insect42_v1, 42 keypoints.
  • Input size: [640, 640].
  • Insect orders: coleoptera, diptera, hymenoptera, lepidoptera.
  • Cross-validation split: kfold5_grouped_seed42_pooled.

Measurement validity

Cross-validated metrics of each classifier ("unmeasurable" is the positive class for the average precision):

Measurement n MCC Average precision Balanced accuracy
total length 1201 0.489 0.720 0.700
head width 1201 0.826 0.908 0.897
head length 1201 0.523 0.684 0.776
inter ocular distance 1201 0.964 0.982 0.975
right antenna length 1201 0.981 0.952 0.993
left antenna length 1201 0.981 0.954 0.998
thorax width 1201 0.991 0.984 0.998
abdomen width 1201 0.895 0.940 0.935
abdomen length 1201 0.478 0.685 0.762
intertegular distance 1201 0.984 0.997 0.995
left hind wing length 1201 0.943 0.999 0.976
right hind wing length 1201 0.912 0.999 0.946
left hind wing width 1201 0.961 0.999 0.976
right hind wing width 1201 0.926 0.999 0.948
left fore wing length 1201 0.594 0.703 0.872
right fore wing length 1201 0.613 0.747 0.871
left fore wing width 1201 0.745 0.934 0.875
right fore wing width 1201 0.794 0.946 0.899
left hind leg length 1201 0.879 1.000 0.947
left hind leg femur length 1201 0.916 1.000 0.934
left hind leg tibia length 1201 0.976 0.995 0.985
left hind leg tarsus length 1201 0.964 0.994 0.976
right hind leg length 1201 0.784 0.999 0.955
right hind leg femur length 1201 0.928 0.999 0.970
right hind leg tibia length 1201 0.972 0.992 0.983
right hind leg tarsus length 1201 0.969 0.991 0.981

Limitations

  • Trained on four insect orders (Coleoptera, Diptera, Hymenoptera, Lepidoptera) photographed dorsally; other orders or views are out of distribution.
  • extraits finetune adapts the pose models to new images.

Licence

These weights are licensed under the GNU Affero General Public License v3.0 (AGPL-3.0), because they derive from Ultralytics YOLO models, themselves AGPL-3.0. The EXTRAITS source code is MIT-licensed.

The .joblib files are Python pickles: load them only from a trusted source (extraits download-models verifies their sha256).

Citation

Please cite EXTRAITS, the GRIT project, the image-database providers and Ultralytics (see CITATION.cff in the EXTRAITS repository).

https://github.com/TomBellivier/EXTRAITS

DOI : 10.5281/zenodo.24439992

Model card generated on 2026-11-21.