Moth localization detectors (YOLOv9, TorchScript)
TorchScript exports of the insect localization models by Hui Yu et al. (Computer Vision Group, Friedrich Schiller University Jena), used in cvlab to benchmark detectors and crop moths from trap images. Shared with the authors' permission.
| File | Model | Input | Classes |
|---|---|---|---|
weights/yolov9-e-1280-binary.torchscript |
YOLOv9-E | 1280 × 1280 | moth, non-moth |
weights/yolov9-c-640-binary.torchscript |
YOLOv9-C | 640 × 640 | moth, non-moth |
weights/yolov9-c-640-flatbug-slice.torchscript |
YOLOv9-C, trained on flatbug slices | 640 × 640 | insect |
Use
Input: a (B, 3, S, S) float tensor in [0, 1], RGB, letterboxed to the square size S (pad value
114). Output: the main head's raw predictions (B, 4 + classes, anchors): box centre x, y,
width, height in input pixels, then one score per class. Apply NMS afterwards. The class names
and input size are stored in the file:
import json, torch
extra = {"meta.json": ""}
model = torch.jit.load("yolov9-e-1280-binary.torchscript", map_location="cuda", _extra_files=extra)
meta = json.loads(extra["meta.json"]) # names, imgsz, source checkpoint (sha256)
Source
Converted from the original YOLOv9 checkpoints (LIB repository, commit
0dd6676f0e9e04d9ecf87e0a50503a577aec649a) with the
YOLOv9 code at commit 5b1ea9a8b3f0ffe4fe0e203ec6232d788bb3fcff.
Only the main head is kept. The sha256 of each source checkpoint is in its meta.json.
Licence and citation
The models were trained with the YOLOv9 code, which is GPL-3.0, so these exports are GPL-3.0 too. If you use them, please cite:
Hui Yu, Joachim Denzler, Dennis Böttger, Gunnar Brehm, Paul Bodesheim. Exploiting Unlabeled Images via Pseudo-Labelling and Paste-In Augmentation for Insect Localisation in Automated Monitoring. Workshop Camera Traps, AI and Ecology, 2025. PDF