All Projects → LeonLok → Multi Camera Live Object Tracking

LeonLok / Multi Camera Live Object Tracking

Licence: gpl-3.0
Multi-camera live traffic and object counting with YOLO v4, Deep SORT, and Flask.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Multi Camera Live Object Tracking

Object Detection Opencv
YOLO Object detection with OpenCV and Python.
Stars: ✭ 267 (-28.8%)
Mutual labels:  object-detection, opencv, yolo
Person Detection And Tracking
A tensorflow implementation with SSD model for person detection and Kalman Filtering combined for tracking
Stars: ✭ 193 (-48.53%)
Mutual labels:  object-detection, opencv, tracking
Openlabeling
Label images and video for Computer Vision applications
Stars: ✭ 706 (+88.27%)
Mutual labels:  object-detection, opencv, yolo
Pine
🌲 Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
Stars: ✭ 202 (-46.13%)
Mutual labels:  object-detection, opencv, yolo
Yolo annotation tool
Annotation tool for YOLO in opencv
Stars: ✭ 17 (-95.47%)
Mutual labels:  object-detection, opencv, yolo
Caffe2 Ios
Caffe2 on iOS Real-time Demo. Test with Your Own Model and Photos.
Stars: ✭ 221 (-41.07%)
Mutual labels:  object-detection, opencv, yolo
Pirsch
Pirsch is a drop-in, server-side, no-cookie, and privacy-focused analytics solution for Go.
Stars: ✭ 257 (-31.47%)
Mutual labels:  tracking, traffic
Realtime object detection
Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV. No Bugs No Worries. Enjoy!
Stars: ✭ 260 (-30.67%)
Mutual labels:  object-detection, opencv
Object Detection Api Tensorflow
Object Detection API Tensorflow
Stars: ✭ 267 (-28.8%)
Mutual labels:  object-detection, yolo
Yolo V2 Pytorch
YOLO for object detection tasks
Stars: ✭ 302 (-19.47%)
Mutual labels:  object-detection, yolo
Mxnet Yolo
YOLO: You only look once real-time object detector
Stars: ✭ 240 (-36%)
Mutual labels:  object-detection, yolo
Pytorch Yolo V3
A PyTorch implementation of the YOLO v3 object detection algorithm
Stars: ✭ 3,148 (+739.47%)
Mutual labels:  object-detection, yolo
Tensorflow 2.x Yolov3
YOLOv3 implementation in TensorFlow 2.3.1
Stars: ✭ 300 (-20%)
Mutual labels:  yolo, tracking
Sipmask
SipMask: Spatial Information Preservation for Fast Image and Video Instance Segmentation (ECCV2020)
Stars: ✭ 255 (-32%)
Mutual labels:  object-detection, tracking
Computer Vision Guide
📖 This guide is to help you understand the basics of the computerized image and develop computer vision projects with OpenCV. Includes Python, Java, JavaScript, C# and C++ examples.
Stars: ✭ 244 (-34.93%)
Mutual labels:  object-detection, opencv
Real time object detection and tracking
YOLOv2 and MobileNet_SSD detection algorithms used along with KCF object tracker
Stars: ✭ 241 (-35.73%)
Mutual labels:  object-detection, opencv
Yolov3v4 Modelcompression Multidatasettraining Multibackbone
YOLO ModelCompression MultidatasetTraining
Stars: ✭ 287 (-23.47%)
Mutual labels:  object-detection, yolo
Finger Detection And Tracking
Finger Detection and Tracking using OpenCV and Python
Stars: ✭ 317 (-15.47%)
Mutual labels:  object-detection, opencv
Deep Sort Yolov4
People detection and optional tracking with Tensorflow backend.
Stars: ✭ 306 (-18.4%)
Mutual labels:  object-detection, yolo
Lightnet
🌓 Bringing pjreddie's DarkNet out of the shadows #yolo
Stars: ✭ 322 (-14.13%)
Mutual labels:  object-detection, yolo

Multi-Camera Live Object Tracking

This repository contains my object detection and tracking projects. All of these can be hosted on a cloud server.

You can also use your own IP cameras with asynchronous processing thanks to ImageZMQ. I've written a blog post on how to stream using your own smartphones with ImageZMQ here.

Deep SORT and YOLO v4

Check out my Deep SORT repository to see the tracking algorithm that I used which includes the options for Tensorflow 2.0, asynchronous video processing, and low confidence track filtering.


Traffic Counting (Link)

This project is an extension of the object counting app.

(Full video)

Features

  • Trained using a total of 244,617 images generated from the DETRAC dataset. You can find the conversion code that I created here.
    • I used this paper as a guideline for data preparation and training.
  • Only counts each tracking ID once.
  • Counts objects by looking at the intersection of the path of the tracked object and the counting line.
    • Hence, those that lose tracking but are retracked with the same ID still get counted.
  • Tracked using low confidence track filtering from the same paper.
    • Offers much lower false positive rate.
    • Tracked objects show average detection confidence.
    • Tracked classes determined by most common detection class.
  • Showing detections is optional (but hides average detection confidence).
  • Multiple IP cameras possible.
  • Video streaming possible via emulated IP camera.
  • Directional counts can be configured based on angle.
  • Records counts for every set interval of the hour.
    • Total count.
    • Class-based counts.
  • Records intersection details for each counted object.
    • Time of intersection.
    • Coordinate of intersection.
    • Angle of intersection.
  • Can be hosted on a cloud server.

Note that since DETRAC doesn't contain any motorcycles, they are the only vehicles that are ignored. Additionally, the DETRAC dataset only contains images of traffic in China, so it struggles to correctly detect certain vehicles in other countries due to lack of training data. For example, it can frequently misclassify hatchbacks as SUVs, or not being able to detect taxis due to different colour schemes.


Object Counting (Link)

This project was originally intended to be an app for counting the current number of people in multiple rooms using my own smartphones, where the server would be remotely hosted. Below shows detection, tracking, and counting of people and cars.

Features

  • Counts the current number of objects in view.
  • Tracking is optional.
  • Multiple IP cameras possible.
  • Records current counts for every set interval of the hour.
    • Current total count.
    • Current class-based counts.
  • Can be hosted on a cloud server.

Using my own smartphones as IP cameras


Training your own vehicle tracking model (Link)

I trained a YOLO v4 and Deep SORT model using the DETRAC training dataset with v3 annotations. I've provided the scripts for converting the DETRAC training images and v3 annotations into the correct format for training both the YOLO v4 model as well as the Deep SORT tracking model.

Deep SORT conversion parameters

DETRAC images are converted into the Market 1501 training format.

  • Occlusion threshold - ignore vehicle sequences with too high occlusion ratio.
  • Truncation threshold - ignore vehicle sequences with too high truncation ratio.
  • Number of occurrences - vehicle sequences that are too short (i.e. not enough images) are discarded after considering occlusion and truncation ratios.

YOLO conversion parameters

DETRAC images are converted into the Darknet YOLO training format.

  • Occlusion threshold - ignore vehicle sequences with too high occlusion ratio.
  • Truncation threshold - ignore vehicle sequences with too high truncation ratio.

Both models were trained and evaluated on the DETRAC training set, but no evaluation has been done yet on the test set due to lack of v3 annotations and I don't have MATLAB for the Deep SORT evaluation software. It's been good enough though for my use case so far.


Hardware used

  • Nvidia GTX 1070 GPU
  • i7-8700K CPU

To give some idea of what do expect, I could run two traffic counting streams at around 10fps each (as you can see in the traffic counting gif). Of course, this heavily depends on stream resolution and how many frames are being processed for detection and tracking.


YOLO v3 vs. YOLO v4

I used YOLO v3 when I first started the object counting project which gave me about ~10FPS with tracking, making it difficult to run more than one stream at a time. Using YOLO v4 made it much easier to run two streams with a higher resolution, as well as giving a better detection accuracy.


Dependencies

  • Tensorflow-GPU 1.14
  • Keras 2.3.1
  • opencv-python 4.2.0
  • ImageZMQ
  • numpy 1.18.2
  • Flask 1.1.1
  • pillow

This project was built and tested on Python 3.6. You can use the conda environment file to set up all dependencies.


Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].