- in and out of a store
- view of a security camera
Object Detection vs tracking:
- Detection
- where in a image/frame an object is
- computationally expensive
- slower
- algs: Haar cascades, HOG + Linear SVM, Faster R-CNNs, YOLO, Single Shot Detector (SSD)
- Tracking
- accept x, y cooridates where an object is
- assigns unique ID
- predicts the objects location based on gradient/optical flow
- algs: MedianFlow, MOSSE, GOTURN, kernalized correlation filters, discriminative correlation filters, etc.
Accurate trackers will combine both detection and tracking.
OpenCV object tracking algorithms: https://www.pyimagesearch.com/2018/07/30/opencv-object-tracking/
Phases:
- Detect (every N frames)
- Detect objects
- Detect new objects
- Find "lost" objects
- Track (until the Nth frame)
- Track objects
Project Structure
.
├── Pipfile # required packages for code
├── README.md # you are here
├── main.ipynb # main jupyter notebook code
├── main.py # main python code
├── mobilenet_ssd # Caffe deep learning model
├── output # output generated from the model
├── requirements.txt # required packages for code
├── submodules # helper scripts
│ ├── __init__.py
│ ├── centroidtracker.py # track an objects center
│ └── trackableobject.py # detect an object
└── videos # input videos if not using web cam