Table of Contents
This is a python project
- Install all the requirements
pip install -r requirements.txt
step by step series of examples that tell you how to get a development env running
- Install all the requirements
git clone https://github.com/LukaFlores/object-tracking-opencv.git
- Change into specific Project Directory (e.g /Car-Counter)
cd Car-Counter
- Run the Program
./build.sh
Inspired by youtube project in which goal of the car counter is to track the number of cars that pass north and south on the freeway
- A mask was overlaid on the video to the area in which the vehicles could be identified. A bitwise * and * function was used to find the shared space of the mask and the video frame Code
-
The current frame (with the mask) is then assessed by the Yolo Model, which tries to identify one of the labels in this list, after detection it will produce a list of boxes bounding the object. We are left with the image recognition of vehicles after filtering for objects and confidence.
-
Abewley's realtime tracking algorithm assesses the age in which the object is not seen throughout frames (max_age), the is the minimum value of hit streak to continue tracking (min_hits) and the common characteristics of a specific object across frames (iou_threshold) Which as a results tracks a specific object across multiple frames.
-
Finally, to keep counter an origin is placed at the center of each object, once it crosses the respective line it is added to the overall tally.
Inspired by youtube project in which goal is to identify a 5 card poker hand
-
Dataset was taken from roboflow
-
The model is trained with ultralytics Yolo using these labels.
-
I used an
Apple M1 Pro Laptopfor training using these settings
- It identified card using the model it was trained on, in which it surrounds the card number with a bounding box
- The hand is then passed to
findPokerHandwhere it deduces the hand base on a series of conditions