Instructions to use kaopanboonyuen/DeepRodent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use kaopanboonyuen/DeepRodent with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("kaopanboonyuen/DeepRodent") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
๐ญ DeepRodent
A Robust and Generalizable Vision Framework for Automated Rodent Monitoring in Experimental Biology
Teerapong Panboonyuen (@kaopanboonyuen)
Department of Computer Science, Khon Kaen University ยท PBYAIL ยท Chulalongkorn University
โจ Overview
DeepRodent is a unified, detector-agnostic deep learning framework built for precise, generalizable, multi-task rodent monitoring in laboratory environments. It jointly predicts:
- ๐ฆ Standard object detection
- ๐ Oriented Bounding Boxes (OBB) โ captures rotation during grooming, rearing, and huddling
- ๐จ Pixel-level instance segmentation โ accurate boundary masks even under occlusion
- ๐งญ Temporal-consistent behavioral embeddings โ stable identity tracking across video frames
Rather than bolting these on separately, DeepRodent fuses them into a single-stage, multi-head architecture โ so one forward pass gives you everything downstream biology pipelines need.
| ๐ฏ Metric | ๐ฅ DeepRodent | Best Baseline (YOLO12-Seg) | ๐ Gain |
|---|---|---|---|
| mAPโ โ | 96.2 | 94.4 | +1.8 |
| mAPโ โโโโ | 84.6 | 78.2 | +6.4 |
| Cross-domain (Lab C) | 91.5 | 87.2 | +4.3 |
| FPS (real-time) | 154 | 156 | โ |
๐ Quick Start
pip install ultralytics
from ultralytics import YOLO
# ๐ญ Load DeepRodent
model = YOLO("DeepRodent_WEIGHT.pt")
# ๐ Run inference
results = model.predict("your_cage_image.jpg", save=True)
# ๐จ Visualize instance masks + OBB
results[0].show()
๐ฅ Download directly
from huggingface_hub import hf_hub_download
weight_path = hf_hub_download(
repo_id="kaopanboonyuen/DeepRodent",
filename="DeepRodent_WEIGHT.pt"
)
๐ง Why DeepRodent?
| Challenge in the Lab ๐ฌ | How DeepRodent Solves It ๐ก |
|---|---|
| Rodents curl, rear, and huddle | Oriented Bounding Boxes capture true rotation |
| Axis-aligned boxes overlap during interaction | Instance segmentation isolates each animal precisely |
| Lighting/cage geometry varies across labs | Cross-domain robustness constraint for generalization |
| Jittery masks across video frames | Temporal consistency loss stabilizes identity tracking |
| Need for downstream analytics | Direct output โ trajectories, heatmaps, behavior states |
๐๏ธ Architecture Snapshot
Input Frame โ Shared Backbone โ โฌโโ Detection Head
โโโ OBB Head (ฮธ-aware)
โโโ Instance Seg Head
โโโ Temporal Embedding Head
โ
Trajectory Tracking ยท Behavior States ยท Occupancy Heatmaps
Detector-agnostic: plug into YOLOv8 โ YOLO12 families and gain +2.6 to +3.1 mAP consistently. ๐
๐ Benchmarks
Evaluated on a private multi-setting laboratory rodent dataset (~30K annotated frames, 60/20/20 split):
- ๐ฅ Outperforms RT-DETR by +6.7 mAPโ โโโโ
- ๐ฅ Outperforms Mask R-CNN by +13.5 mAPโ โโโโ
- โก Maintains 154 FPS โ real-time, deployment-ready
Full ablation, cross-domain, and SOTA comparison tables are in the paper.
๐ Repository Links
| Resource | Link |
|---|---|
| ๐ป Code | github.com/kaopanboonyuen/DeepRodent |
| ๐ Project Page | kaopanboonyuen.github.io/DeepRodent |
| ๐ค Weights (this repo) | DeepRodent_WEIGHT.pt |
| ๐ฎ Interactive Demo | Hugging Face Spaces |
๐พ Ethical Use
DeepRodent is an assistive research tool โ it does not replace veterinary oversight or trained behavioral experts. Developed following ARRIVE guidelines and the 3Rs principles (Replacement, Reduction, Refinement). Please validate performance before deployment in a new laboratory setting.
๐ Citation
If DeepRodent helps your research, please cite:
@article{panboonyuen2026deeprodent,
title = {DeepRodent: A Robust and Generalizable Vision Framework for Automated Rodent Monitoring in Experimental Biology},
author = {Panboonyuen, Teerapong},
year = {2026}
}
Made with ๐งก for open, reproducible science.
โญ If this helped your research, consider starring the GitHub repo!
- Downloads last month
- 15