Skip to content

AI car & pedestrian tracking in python utilizing computer vision rather than lidar due to efficiency

License

Notifications You must be signed in to change notification settings

saqib727/AI-Cars-pedestrian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Overview

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.

1. Instructions For Installation

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

2. Packages Required

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

Machine Learning Files(Haar Cascade xml files)

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

Video of Cars and Pedestrians Source

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

Dataset

OpenCV Documentation:

https://docs.opencv.org/2.4/modules/objdetect/doc/cascade_classification.html?highlight=detectmultiscale

Cars Dataset (Cal Tech):

Link: https://www.researchgate.net/figure/Car-dataset-taken-by-Brad-Philip-and-Paul-Updike-California-Institute-of-Technology-It_fig5_267863282

3. Run Program Instructions

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

About

AI car & pedestrian tracking in python utilizing computer vision rather than lidar due to efficiency

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages