Skip to content

namratasaun/Vehicle-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle-Detection

Overview


This project focuses on detection of 3 sets of Indian vehicles using Retinanet Model.

Trained on


The model used is trained on a dataset containing three sets of Indian vehicles - Cars, Motorbikes and Autos. The dataset comprising of about 10,000 pictures was collected manually and was labelled using tool LabelMe.

Model used


RetinaNet is a popular single-stage detector, which is accurate and runs fast.
RetinaNet uses a feature pyramid network to efficiently detect objects at multiple scales and introduces a new loss, the Focal loss function, to alleviate the problem of the extreme foreground-background class imbalance.

Weights of trained model - /models/vds_weights.h5

How to Run


Prerequisites

  • Python3
  • Keras
  • Tensorflow
  • Keras_retinanet
  • CV2

Steps

  1. Download weights and copy it to the models directory. It contains weights of the trained model.

  2. Execute predict.py file.

python predict.py
  1. To input an image, save the image in root directory and change the image name in function read_image_bgr in predict.py. (example - test.jpeg)

  2. You can also tweak the threshold score. (Detector will only detect those images in the output where confidence score is greater than threshold.)

Results


Result 1 Result 2 Result 3 Result 4 Result 5

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages