Skip to content

Created a computer vision pipeline to detect and classify cars as SUVs or sedans using transfer learning on Mobilenet and object detection using YOLOv3.

License

Notifications You must be signed in to change notification settings

prakhargurawa/Vehicle-Detection-Classification-YOLO-MobileNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle-Detection-Classification-YOLO-MobileNet

  • Clone this repo

  • Download yolo weights from https://pjreddie.com/darknet/yolo/ (Download TinyYOLO weights if you want to use that or else YOLO weights) For my work i have used TinyYolo as its faster and light weight.

  • If you want to use TinyYOLO use command A else for YOLO command B

    A. python convert.py yolov3-tiny.cfg yolov3-tiny.weights model_data/yolo_tiny.h5

    B. python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5

  • To test: python yolo_video.py --image Then provide path to any test image

  • Create a seperate environment to avoid any dependency clash conda env create -f test\dependecies.yml car_env conda activate car-project-env

  • pip inststall --upgrade Pillow

  • python MobileNet_TransferLearning.py (Feel free to change Optimizer/Epoch or any other ML technique according to your requirement) By Default I haev used Adam optimer with lr=0.0001 for 20 Epoch

  • python VideoReader.py

Note: To know more about system please go through Vehicle_Detection_YOLO.pdf

Working Demo:

alt text

Base Structure of Mobilenet:

alt text

MobileNet Transfer learning model:

alt text

Vision pipeline:

alt text

Results when compared with GroundTruth

  • Use model/ScoreCalculator.py for F1 score calculation
  • The results might seem low, but to be honest F1 Score wrt grouth truth is little harsh for this use case.

alt text

Adam vs RMSProp Optimer

  • Adam (Used for this work as giving better F1 Scores and also lower overfitting)

alt text

  • RMSProp

alt text

TODO

  • Optimize pipeline for faster processing (using producer-consumer)
  • Optimize transfer learning model
  • Better Designing (OOPS Aspect)

About

Created a computer vision pipeline to detect and classify cars as SUVs or sedans using transfer learning on Mobilenet and object detection using YOLOv3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages