Skip to content

Reidentifying people across a multi-camera environment and detecting their poses, all in real-time.

License

Notifications You must be signed in to change notification settings

theoway/multi-cam-reid

Repository files navigation

Multiple people reidentification and pose estimation across multiple camera setup in real-time

This projects uses RTSP from multiple cameras and tracks people with in it, also reidentifying them across multiple cameras and estimating their poses in real-time. This project is compatible with Python >= 3.6 and uses both Pytorch and Tensorflow at its backend. It is built on top of these amazing projects:

Before running the code:

  • Download this model data folder and it to your local repo with the same name.
  • Download this model and add it to model_data/models/
  • Download the body_pose_model.pth and add it to model_data/models/
  • Download the crowdhuman_yolov5m.pt and add it to the root repo folder.
  • Run pip install -r requirements.txt

Running the code:

  • To run the code with multiple RTSP feeds: python demo.py -u host1:port1 host2:port2 ...
    (*No need to prefix http/https with host names)
  • To debug the app and use computer webcam: python demo.py -u 0
  • To run pose estimation, use -p flag: python demo.py -p -u host1:port1 host2:port2 ... or python demo.py -p -u 0

Testing the code:

  • unittest module has been used to for writing the testcases. The testcase checks if the extraction subprocess and inference process are running correctly. The inference process uses a test video found in /tests/videos/
  • To run the test: python -m unittest -v tests.test_reid

Results and performance:

2.Cameras.mp4

On my setup(i5 8th gen, 8 Gb RAM and NVIDI GTX 1650) with low-resolution streams(640 × 480), I got 10 fps without pose estimation and 2 fps with pose esimtation. With better hardware, it can be improved.

Contributing:

  • Raise an issue with mentioning the issue being faced, your system specifications along with OS and Python version
  • PRs are welcome!

About

Reidentifying people across a multi-camera environment and detecting their poses, all in real-time.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published