No Description

Roman Juranek 32d720c586 Uprava WB dema a navodu 11 months ago
data c5c62c7f4b New testing images 11 months ago
matlab cf7cb0ebde 2018 update. Just parameters in most cases 1 year ago
opencv 32b864ecbd Some parameter tuning in opencv demo 11 months ago
waldboost 32d720c586 Uprava WB dema a navodu 11 months ago
.gitignore 5f6875c956 ignoring .vec files 11 months ago
README.md 32d720c586 Uprava WB dema a navodu 11 months ago

README.md

Object detection demo for Computer Vision lecture

License plate detection in using Haar Cascade (OpenCV), ACF (Matlab) and Waldboost.

OpenCV demo

  1. First extract .vec files which are used for training. The .vec file contains training patches with common size extracted from the full images. Use extract_training_samples.sh which extracts samples with two different sizes. Or, alternatively, you can execute opencv_createsamples manualy.

  2. Then you can train detector with opencv_traincascade by passing the extracted .vec files and the list of background images bg.list. train_example_detectors.sh trains everything for you.

  3. cascade.xml files contains the trained model which you can use with CascadeClassifier class from OpenCV. See detect-image.py. Run detect_on_test_images.sh LP_36/cascade.xml

MATLAB demo

You need to install Piotr's Computer Vision Matlab Toolbox and set paths in Matlab.

  1. In Matlab, change directory to matlab and open LicensePlateModel.m. There are three code blocks that can be executed separately by CTRL+Enter. First block sets training options. Second block trains the detector model and saves it as a .mat file. The third block show detections in testing images.

  2. Execute the blocks one by one and see what happens.

Waldboost demo

You need to install waldboost package. It will also install few dependencies like opencv, skimage, etc. You might want to do that in virtualenv which is also possible.

# in waldbost directory
> pip install .

You also need to install TF object detection API. Follow installation instructions here. This API is used just for the purpose of representation of bounding boxes and operations over them.

Then run the training script. It will produce a new detector using data from ../data directory, and save it as license_plate_detector.pb. The process tooks just a few minutes.

> python3 training.py

Finally run detection script which will show detection in images from ../data/test_images directory.

> python3 show_detections.py

Notes

The training data are for demonstration purposes only. Any non-academic exploitation is prohibited. Directory background contains images extracted from Google Street View.