||2 years ago|
|data||2 years ago|
|matlab||3 years ago|
|opencv||2 years ago|
|waldboost||2 years ago|
|.gitignore||2 years ago|
|README.md||2 years ago|
Object detection demo for Computer Vision lecture
License plate detection in using Haar Cascade (OpenCV), ACF (Matlab) and Waldboost.
.vecfiles which are used for training. The
.vecfile contains training patches with common size extracted from the full images. Use
extract_training_samples.shwhich extracts samples with two different sizes. Or, alternatively, you can execute
Then you can train detector with
opencv_traincascadeby passing the extracted
.vecfiles and the list of background images
train_example_detectors.shtrains everything for you.
cascade.xmlfiles contains the trained model which you can use with
CascadeClassifierclass from OpenCV. See
You need to install Piotr's Computer Vision Matlab Toolbox and set paths in Matlab.
In Matlab, change directory to
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
.matfile. The third block show detections in testing images.
Execute the blocks one by one and see what happens.
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 .
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
> python3 show_detections.py
The training data are for demonstration purposes only. Any non-academic exploitation is prohibited. Directory
background contains images extracted from Google Street View.