RAPID is a patterned animal re-identification (reID) tool. It is easy-to-use, fast and accurate. Furthermore, suitable for edge deployment (e.g. drones) and integration into larger pipelines (e.g. autonomous monitoring).
The tool has two main features: 1) RAPID predicts IDs (with confidence scores) for query animals based on a set of database images, and 2) FalseTagFinder supports researchers to identify potentially wrong ID labels within ground truth databases.
As images should strictly follow the naming convention: animalID_viewpoint_frameID.filetype (e.g. jaguar7_left_23.jpg, tiger18_unknownvp_54.png, unknownID74_right_32.jpg), we also provide a Rename tool that automatically renames images based on a simple Excel or CSV file.
For more, read our preprint and watch the video abstract.
- accurate ID predictions + confidence scores 🎯
- real-time processing (even without GPU) ⚡
- optimal for edge devices, e.g. drones 🌿
- works with multiple species 🌎
- no need for large training data 📷
- localizable keypoints for visual verification 👀
- works with patterned animals
- needs cropped bounding boxes (however, not necessarily very tight)
- not automated for open-set scenarios (however, can be used as a supporting tool)
Top-1 accuracies on publicly available benchmark datasets:
| Accuracy (Top-1) | Species | Dataset |
|---|---|---|
| 99% | 🦓 Plains and Grevy's zebra | StripeSpotter |
| 95% | 🐅 Amur tiger | ATRW |
| 99% | 🐄 Holstein Friesian Cattle | AerialCattle |
| 89% | 🦒 🦓 Masai giraffe and Plains zebra | GiraffeZebraID |
| 99% | 🦓 Grevy's zebra | dataset coming soon... |
| 100% | 🐆 Jaguar | dataset coming soon... |
Query processing speed (FPS). Query processing time meant time spent from loading the raw bounding box until ID prediction and confidence score calculation.
| Hardware | Speed (FPS) |
|---|---|
| 🖥️PC | ~60 FPS |
| 💻Laptop | ~50 FPS |
| 🌿Edge | ~12 FPS |
Hardware used for tests: 1) PC - DELL Precision 3630 Tower with Intel(R)492 Xeon(R) E-2174G@ 3,80GHz CPU, 8 cores, 63 GB RAM; 2) Laptop - VivoBook-ASUSLaptop X513UA-M513UA with AMD Ryzen 7 5700U, Radeon Graphics, 16 cores, 16 GB RAM; 3) Edge - Texas Instruments SK-TDA4VM with ARM Cortex-A72, 2 cores, 2.25 GB RAM
- Click on
Download ZIPunderCodeand extract the file. Or in terminal:git clone https://github.com/robot-perception-group/Real-time_Animal_reID.git - Go to
scriptsdirectory, right click andopen a terminal, so you see.../scripts$ - In terminal, type:
chmod +x install_on_linux.sh - To install RAPID, type:
./install_on_linux.sh
- Click on
Download ZIPunderCodeand extract the file. Or in command prompt:git clone https://github.com/robot-perception-group/Real-time_Animal_reID.git - Go to
scriptsfolder and double-click oninstall_on_windowsto install RAPID
Note: images should be cropped bounding box images, and named as animalID_viewpoint_frameID.filetype. This section helps you to rename your images, if they are named differently.
- Set config
- prepare a metadata Excel or CSV with columns
filename,img-ID,animal-IDandside-info(more info in.../config/config_Rename.yaml) - provide metadata path and the directory of the images you want to rename in
.../config/config_Rename.yaml - make sure that your paths do not end with
/ - save changes
- prepare a metadata Excel or CSV with columns
- Activate virtual environment
- in
Real-time_Animal_reIDdirectory open a terminal, so you see.../Real-time_Animal_reID$ - in terminal:
source .venv/bin/activate, as a result, you should see(.venv)at the beginning of the command line
- in
- Run
- in terminal, run:
Rename - check
renamed_imagesdirectory, next to original image directory
- in terminal, run:
- Set config
- prepare a metadata Excel or CSV with columns
filename,img-ID,animal-IDandside-info(more info in...\config\config_Rename.yaml) - provide metadata path and the directory of the images you want to rename in
...\config\config_Rename.yaml - in provided paths, change every
\to double\\or single/ - make sure that your paths do not end with
\,\\, or/ - save changes
- prepare a metadata Excel or CSV with columns
- Activate virtual environment
- open command prompt and type:
conda activate rapid_env, as a result, you should see(rapid_env)at the beginning of the command line
- open command prompt and type:
- Run
- in terminal, type:
Rename - check
renamed_imagesfolder, next to original image folder
- in terminal, type:
- Prepare images
- If images are not named as animalID_viewpoint_frameID.filetype, rename them (see above)
- Set config
- provide database and query paths in
.../config/config_RAPID.yaml(orconfig_FalseTagFinder.yaml) - make sure that your paths do not end with
/ - save changes
- provide database and query paths in
- Activate virtual environment
- in
Real-time_Animal_reIDdirectory open a terminal, so you see.../Real-time_Animal_reID$ - in terminal:
source .venv/bin/activate, as a result, you should see(.venv)at the beginning of the command line
- in
- Run
- in terminal, run:
RAPID(orFalseTagFinder) - check results under
.../saved_RAPID(or.../saved_FalseTagFinder) next to your database directory
- in terminal, run:
- Prepare images
- If images are not named as animalID_viewpoint_frameID.filetype, rename them (see above)
- Set config
- provide database and query paths in
...\config\config_RAPID.yaml(or...\config_FalseTagFinder.yaml) - in provided paths, change every
\to double\\or single/ - make sure that your paths do not end with
\,\\, or/ - save changes
- provide database and query paths in
- Activate virtual environment
- open command prompt and type:
conda activate rapid_env, as a result, you should see(rapid_env)at the beginning of the command line
- open command prompt and type:
- Run
- in command prompt, run:
RAPID(orFalseTagFinder) - check results under
...\saved_RAPID(or...\saved_FalseTagFinder) next to your database folder
- in command prompt, run:
- In general, use only first 5 columns
query_imgcolumn helps you identify the given imageprovided_IDis the first part of the query image filename (see aboveHow to runsection)predicted_IDis the prediction of RAPIDconfidence_scoreis the confidence of the predictionID_matchingchecks if provided query animal ID from the filename is the same as the prediction. This is only meaningful, if you used proper animal IDs in the query image filenames that are part of your database
- other columns provide information about top 5 predictions and their weights that can be used for deeper analysis
Zábó, A., Nagy, M., & Ahmad, A. (2025). RAPID: Real-time Animal Pattern re-Identification on edge Devices. bioRxiv: https://doi.org/10.1101/2025.07.07.663143
