Skip to content

vyzboy92/Object-Detection-Net

Repository files navigation

Vehicle-Detection-Net

This project is aimed at implementing a vehicle detection platform for aerial images.

A Faster R-CNN is employed for the detection mechanism. Detailed description of F-RCNN can be found here. Detection of vehicles in aerial image has real life implications like military surveillance, trafiic management, parking lot monitoring etc. The current model can be used for detecting other objects in images like people, cars,bus etc. This is enabled by pretrained weights, that are trained on huge image dataset. Along with detection our model enables both instantaneous count per frame and sequential count of objects in videos. Input to the model can be either video or images while testing. Training is done using annotated images. Annotation and dataset creation for training on your own data is discussed below. This work is adapted and modified from the code origanally developed by Yann Henon

Requirements

  • Keras v.2.0.3
  • Tensorflow v1.5.0
  • h5py
  • Open CV
  • sklearn

Data Annotation and Training.

Data annotation can be done for your images using the annotate.py script provided in the repo. It can be done by running python annotate.py, by mentioning the path variable in the script as the folder in which you have the images stored. The annotation can be generated by dragging your mouse from the top left corner pixel of the object in the image to its bottom right corner. Multiple objects in the image can be annotated this way. After generating annotation for one image press any key to switch to next file.

The tool generates annotations in the following format:

path/to/the/image.jpg, x1, y1, x2, y2, class_name

For each annotated object a .txt file is created which contains the above line. Once the annotations are generated run python concat_txt.py with the path variable pointing to the folder containing the .txt files. This generates a single .txt file containing annotations from all the text files in the path.

The final Annotation.txt file can be used to train the F-RCNN py executing the following line:

python train_frcnn -o simple -p Annotation.txt

About

Vehicle Detection Faster RCNN for Aerial Images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages