AI car & pedestrian tracking in python utilizing computer vision rather than lidar due to efficiency. This program detects people and automotive vechicles using visual input as demonstrated with youtube videos provided below to showcase the programs ability to distinguish between the two. This process starts by first placing the image in a classifier file to identify said object whether it be a person or automotive vehicle. The video file will then be converted as rectangle shapes as either yellow for people and red for cars so the program to identify which object it is.
Install the latest version of Python to your operating system of choice before running this program.
Python Website Link: https://www.python.org
Please download all image files and videos links for this project found in the src folder
Computer vision package
1.) Implement this command in terminal:
pip3 install opencv-python
OR
pip3 install opencv-python-headless
2.) Implement computer vision 2 command in terminal:
import cv2
This command above checks to ensure you installed the following without error
Pedestrians: https://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_fullbody.xml
Cars: https://raw.githubusercontent.com/andrewssobral/vehicle_detection_haarcascades/master/cars.xml
Tesla Dashcam: https://www.youtube.com/watch?v=d4L1Pte7zVc
Motorcycle Dashcam of pedestrians : https://www.youtube.com/watch?v=WriuvU1rXkc
BOTH VIDEO FILES MUST BE DOWNLOADED
OpenCV Documentation:
Cars Dataset (Cal Tech):
1.) Once all necessary files are downloaded, open terminal and change directory into folder
2.) Ensure the proper version of python is running once inside the folder
3.) Then type ls in terminal to ensure you are in the correct directory and can see all files
4.) Uncheck ONLY ONE of the videos in the top of the IDE below import cv2
5.) In terminal type in: python3 Car_and_Pedestrian_Tracking.py to run the program
6.) To quit out press control + C in terminal to stop the program