Costa Rica license plate generator for computer vision
- Plate formats: car, motorcycle, trucks, taxi, disabled drivers.
- Perspective rotations, size and random backgrounds.
- Annotations with character bounding boxes (class, cx, cy, w, h)
configuration.cfg
andtemplates.json
files for customization.
[Pending]
- Python >= 3.6.0
- Modules on requirements.txt
pip3 install -r requirements.txt
-
Add some images to ./backgrounds directory, these will work as random backgrounds for the plates. SUN Database is recommended.
-
Run the main file
python ./main.py
-
Random plates will be generated on ./output directory
The following is a description of all the settings on this file.
Setting | Description | Value |
---|---|---|
[General] | ||
dataset_size | Quantity of images to generate | int |
templates_path | Path to directory containing base plate images | string |
templates_config | Path to JSON configuration for each type of plate | string |
[Image] | ||
resize_plate | Apply resizing to the base plate images setting | bool |
plate_scales | List of scaling factors to be used | list |
resize_bg | Apply resizing to background images to a fixed size | bool |
bg_sizes | List of target (width,height) pairs to resize bgs | list |
draw_bboxes | Whether to draw bounding boxes (Use for testing only) | bool |
bbox_padding | Spacing between bbox and inner object (px) | int |
[Perspective] | ||
theta_range | Maximum angle (degrees) to rotate plate over z-plane | float |
phi_range | Maximum angle (degrees) to rotate plate over y-plane | float |
gamma_range | Maximum angle (degrees) to rotate plate over x-plane | float |
[Pending]
- Alejandro Pereira - Home Page
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details
- Perspective transformations: https://nbviewer.jupyter.org/github/manisoftwartist/perspectiveproj/blob/master/perspective.ipynb
- Another plate generator: https://matthewearl.github.io/2016/05/06/cnn-anpr/
- SUN Database: https://vision.princeton.edu/projects/2010/SUN/