Git Product home page Git Product logo

aifarms / multi-camera-pig-tracking Goto Github PK

View Code? Open in Web Editor NEW
65.0 8.0 20.0 86 MB

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

Home Page: https://www.youtube.com/watch?v=wFGXfTkzE3E&t=2213s

Python 11.10% Makefile 0.22% C 83.21% Cuda 5.24% C++ 0.23%
multi-camera-tracking pig-detection pig-tracking homography computer-vision yolov4 deepsort deep-learning multi-object-tracking dataset

multi-camera-pig-tracking's Introduction

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.

multi-camera-pig-tracking's People

Contributors

ani8897 avatar okankocabalkanli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multi-camera-pig-tracking's Issues

Error in running manager.py

Hi
I am following the steps to running the code .I found missing packages
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

ModuleNotFoundError: No module named 'disjoint_set'

Any help for this ??
Thanks you.

dataset problem

There are two folders in the dataset link. Which one should I choose as the training set?

Custom reset function

Can you please release the code for Disjoint set custom reset function? or describe how it's supposed to work?

Can you share you camera information?

Hi, thanks for your sharing.
Can you share your camera information, like intrinsic parameters?
I want to map 2D images into a 3D world coordinate system.

Thanks

Requests for more train dataset

My research is also focused on pig-tracking. I am wondering if you could kindly send me more train dataset. I promise they will be used only for research purposed.

training problem

I would like to use this model for multiple-camera people-trakcing, but i see none training-guide. Is this could just use yolo-format labels to train?

AttributeError message when running commands from commands.txt

3840 1080
Process CameraManager-3:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/Users/multi-camera-pig-tracking/manager.py", line 79, in run
self.match_tracks_from_buffer()
File "/Users/multi-camera-pig-tracking/manager.py", line 93, in match_tracks_from_buffer
global_position_dict = self.match_tracks(self.ceiling_filter(self.local_buffer['ceiling'].pop(fid, None)),
File "/Users/multi-camera-pig-tracking/manager.py", line 152, in match_tracks
self.union_find.reset(ceil_id, min_id)
AttributeError: 'DisjointSet' object has no attribute 'reset'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.