kaopanboonyuen commited on
Commit
5f34e4d
ยท
verified ยท
1 Parent(s): ff8e481

๐Ÿ feat(repro): add official implementation of DeepRodent

Browse files
Files changed (1) hide show
  1. README.md +166 -0
README.md CHANGED
@@ -1,3 +1,169 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ tags:
4
+ - object-detection
5
+ - instance-segmentation
6
+ - oriented-bounding-box
7
+ - yolo
8
+ - computer-vision
9
+ - computational-biology
10
+ - rodent-monitoring
11
+ - experimental-biology
12
+ library_name: ultralytics
13
+ pipeline_tag: image-segmentation
14
  ---
15
+
16
+ <div align="center">
17
+
18
+ # ๐Ÿญ DeepRodent
19
+
20
+ ### A Robust and Generalizable Vision Framework for Automated Rodent Monitoring in Experimental Biology
21
+
22
+ **Teerapong Panboonyuen** ([@kaopanboonyuen](https://github.com/kaopanboonyuen))
23
+
24
+ Department of Computer Science, Khon Kaen University ยท PBYAIL ยท Chulalongkorn University
25
+
26
+ ๐Ÿ“ง teerapong.panboonyuen@gmail.com
27
+
28
+ [![GitHub](https://img.shields.io/badge/GitHub-Code-181717?style=for-the-badge&logo=github)](https://github.com/kaopanboonyuen/DeepRodent)
29
+ [![Project Page](https://img.shields.io/badge/๐ŸŒ-Project%20Page-blue?style=for-the-badge)](https://kaopanboonyuen.github.io/DeepRodent)
30
+ [![Demo](https://img.shields.io/badge/๐Ÿค—-Live%20Demo-yellow?style=for-the-badge)](https://huggingface.co/spaces/kaopanboonyuen/DeepRodent-Demo)
31
+ [![License](https://img.shields.io/badge/License-Apache%202.0-green?style=for-the-badge)](LICENSE)
32
+
33
+ </div>
34
+
35
+ ---
36
+
37
+ ## โœจ Overview
38
+
39
+ **DeepRodent** is a unified, detector-agnostic deep learning framework built for **precise, generalizable, multi-task rodent monitoring** in laboratory environments. It jointly predicts:
40
+
41
+ - ๐Ÿ“ฆ **Standard object detection**
42
+ - ๐Ÿ”„ **Oriented Bounding Boxes (OBB)** โ€” captures rotation during grooming, rearing, and huddling
43
+ - ๐ŸŽจ **Pixel-level instance segmentation** โ€” accurate boundary masks even under occlusion
44
+ - ๐Ÿงญ **Temporal-consistent behavioral embeddings** โ€” stable identity tracking across video frames
45
+
46
+ 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.
47
+
48
+ <div align="center">
49
+
50
+ | ๐ŸŽฏ Metric | ๐Ÿฅ‡ DeepRodent | Best Baseline (YOLO12-Seg) | ๐Ÿ“ˆ Gain |
51
+ |:---:|:---:|:---:|:---:|
52
+ | mAPโ‚…โ‚€ | **96.2** | 94.4 | +1.8 |
53
+ | mAPโ‚…โ‚€โ‚‹โ‚‰โ‚… | **84.6** | 78.2 | **+6.4** |
54
+ | Cross-domain (Lab C) | **91.5** | 87.2 | +4.3 |
55
+ | FPS (real-time) | 154 | 156 | โ€” |
56
+
57
+ </div>
58
+
59
+ ---
60
+
61
+ ## ๐Ÿš€ Quick Start
62
+
63
+ ```bash
64
+ pip install ultralytics
65
+ ```
66
+
67
+ ```python
68
+ from ultralytics import YOLO
69
+
70
+ # ๐Ÿญ Load DeepRodent
71
+ model = YOLO("DeepRodent_WEIGHT.pt")
72
+
73
+ # ๐Ÿ” Run inference
74
+ results = model.predict("your_cage_image.jpg", save=True)
75
+
76
+ # ๐ŸŽจ Visualize instance masks + OBB
77
+ results[0].show()
78
+ ```
79
+
80
+ ### ๐Ÿ“ฅ Download directly
81
+
82
+ ```python
83
+ from huggingface_hub import hf_hub_download
84
+
85
+ weight_path = hf_hub_download(
86
+ repo_id="kaopanboonyuen/DeepRodent",
87
+ filename="DeepRodent_WEIGHT.pt"
88
+ )
89
+ ```
90
+
91
+ ---
92
+
93
+ ## ๐Ÿง  Why DeepRodent?
94
+
95
+ | Challenge in the Lab ๐Ÿ”ฌ | How DeepRodent Solves It ๐Ÿ’ก |
96
+ |---|---|
97
+ | Rodents curl, rear, and huddle | Oriented Bounding Boxes capture true rotation |
98
+ | Axis-aligned boxes overlap during interaction | Instance segmentation isolates each animal precisely |
99
+ | Lighting/cage geometry varies across labs | Cross-domain robustness constraint for generalization |
100
+ | Jittery masks across video frames | Temporal consistency loss stabilizes identity tracking |
101
+ | Need for downstream analytics | Direct output โ†’ trajectories, heatmaps, behavior states |
102
+
103
+ ---
104
+
105
+ ## ๐Ÿ—๏ธ Architecture Snapshot
106
+
107
+ ```
108
+ Input Frame โ†’ Shared Backbone โ†’ โ”ฌโ”€โ”€ Detection Head
109
+ โ”œโ”€โ”€ OBB Head (ฮธ-aware)
110
+ โ”œโ”€โ”€ Instance Seg Head
111
+ โ””โ”€โ”€ Temporal Embedding Head
112
+ โ†“
113
+ Trajectory Tracking ยท Behavior States ยท Occupancy Heatmaps
114
+ ```
115
+
116
+ Detector-agnostic: plug into **YOLOv8 โ†’ YOLO12** families and gain **+2.6 to +3.1 mAP** consistently. ๐Ÿ”Œ
117
+
118
+ ---
119
+
120
+ ## ๐Ÿ“Š Benchmarks
121
+
122
+ Evaluated on a private multi-setting laboratory rodent dataset (~30K annotated frames, 60/20/20 split):
123
+
124
+ - ๐Ÿฅ‡ Outperforms **RT-DETR** by **+6.7 mAPโ‚…โ‚€โ‚‹โ‚‰โ‚…**
125
+ - ๐Ÿฅ‡ Outperforms **Mask R-CNN** by **+13.5 mAPโ‚…โ‚€โ‚‹โ‚‰โ‚…**
126
+ - โšก Maintains **154 FPS** โ€” real-time, deployment-ready
127
+
128
+ Full ablation, cross-domain, and SOTA comparison tables are in the [paper](https://kaopanboonyuen.github.io/DeepRodent).
129
+
130
+ ---
131
+
132
+ ## ๐Ÿ“ Repository Links
133
+
134
+ | Resource | Link |
135
+ |---|---|
136
+ | ๐Ÿ’ป Code | [github.com/kaopanboonyuen/DeepRodent](https://github.com/kaopanboonyuen/DeepRodent) |
137
+ | ๐ŸŒ Project Page | [kaopanboonyuen.github.io/DeepRodent](https://kaopanboonyuen.github.io/DeepRodent) |
138
+ | ๐Ÿค— Weights (this repo) | `DeepRodent_WEIGHT.pt` |
139
+ | ๐ŸŽฎ Interactive Demo | [Hugging Face Spaces](https://huggingface.co/spaces/kaopanboonyuen/DeepRodent-Demo) |
140
+
141
+ ---
142
+
143
+ ## ๐Ÿพ Ethical Use
144
+
145
+ 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.
146
+
147
+ ---
148
+
149
+ ## ๐Ÿ“œ Citation
150
+
151
+ If DeepRodent helps your research, please cite:
152
+
153
+ ```bibtex
154
+ @article{panboonyuen2026deeprodent,
155
+ title = {DeepRodent: A Robust and Generalizable Vision Framework for Automated Rodent Monitoring in Experimental Biology},
156
+ author = {Panboonyuen, Teerapong},
157
+ year = {2026}
158
+ }
159
+ ```
160
+
161
+ ---
162
+
163
+ <div align="center">
164
+
165
+ Made with ๐Ÿงก for open, reproducible science.
166
+
167
+ โญ **If this helped your research, consider starring the [GitHub repo](https://github.com/kaopanboonyuen/DeepRodent)!**
168
+
169
+ </div>