Disclaimer: This project is meant for research purpose only.
Tracking humans in a hallway.
- The project deals with tracking humans in a narrow hallway under different lighting conditions.
- Unlike other MOT models, we aim to track people without any training, that means, all tracking is done online.
- There are many state-of-the-art models and architectures, that have been a large source of our inspiration (they are all listed under references below).
- The videos were obtained from this link.
It is suggested that you create a virtual environment. The requirements are given below, we've also included a requirements.txt
torchvision==0.6.0a0+82fd1c8
torch==1.5.0
dlib==19.19.0
numpy==1.18.2
scipy==1.4.1
opencv_contrib_python==4.2.0.34
The directory structure is as follows:
- Core: This contains the core modules for the project.
- Detector:
- This uses the YOLOv3 model to detect humans after every N frames.
- Once the object is detected, the matching algorithm is used to see if the object is already being tracked, and thus avoiding re-identification.
- If the object is a new object (or if re-ID fails), the next available ID is given to the new (or re-IDed) object.
- Trackable:
- This is the trackable object which contains a ID and other data regarding the object.
- Tracker:
- This implements the correlation tracker (from dlib) along with centroid tracking.
- It updates the position of the trackable object in each frame.
- Matcher:
- This contains the matching function which returns a score of how similar two objects are.
- The score is the weighted average of correlation score, Bhattacharyya score (obtained from their histograms) and the cosine similarity from the feature extractor.
- Feature Extractor:
- This contains the ResNet model (from PyTorch), which is used to perform feature extraction and return a cosine similarity score.
- Detector:
- Utils: This contains helper functions and constants used by the core module.
As you can see the two major problems are:
-
Misidentification: This can be solved by training on the objects beforehand. However the main aim for this project was to differentiate between objects without any training.
-
Mistracking: This could be helped with a better matching algorithm. DeepSort could be another alternative.
This project is licensed under the MIT License - see the LICENSE.md file for details.