You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Roman Juranek 32d720c586 Uprava WB dema a navodu 2 years ago
data New testing images 2 years ago
matlab 2018 update. Just parameters in most cases 3 years ago
opencv Some parameter tuning in opencv demo 2 years ago
waldboost Uprava WB dema a navodu 2 years ago
.gitignore ignoring .vec files 2 years ago Uprava WB dema a navodu 2 years ago

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 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. trains everything for you.

  3. cascade.xml files contains the trained model which you can use with CascadeClassifier class from OpenCV. See Run LP_36/cascade.xml


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

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

> python3


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