Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 2.18 KB

README.md

File metadata and controls

34 lines (19 loc) · 2.18 KB

Multi Camera Pig Tracking

Official Implementation of Tracking Grow-Finish Pigs Across Large Pens Using Multiple Cameras

CVPR2021 CV4Animals Workshop Poster

Dataset

The dataset can be found at this link.

The videos were acquired at the Imported Swine Research Lab (ISRL) at UIUC. The deployment video can be found here. It was annotated for grountruth global identities and bounding boxes using this MATLAB Tool.

Files

deepsort-tracking: Contains code for detecting and tracking pigs using YOLOv4 and DeepSORT

data/homography: Contains pickled homography matrices for both the pens

camera.py: Detects and tracks pigs using the trained model in DeepSORT and YOLOv4

manager.py: Main file which uses the homography matrices to assign global identities

Running the code

Download the dataset from this link and place multicam-dataset folder in data/. Note that we have already trained the model and extracted the output of DeepSORT into JSON files. You can find the pretrained checkpoint here

  1. Run export DARKNET_PATH=./deepsort-tracking/yolov4/ in terminal.
  2. Run any one of the commands from commands.txt, for instance: python3 manager.py --av data/multicam-dataset/0/0-Pen_B.mp4 --cv data/multicam-dataset/0/0-Ceiling_Cam.mp4 --cj data/multicam-dataset/0/0-Ceiling_Cam.json --aj data/multicam-dataset/0/0-Pen_B.json --cl 457

Future Work

We are currently working on building action recognition models for pig behavior using ethograms. We can currently estimate the time spent by pigs near drinkers and feeders based on their proximity.