Comments (20)
I attach the trained data files for anyone interested in using them until this issue is resolved.
The file lch.traineddata
contains only the Swiss font data, the file leu.traineddata
contains the EU fonts and the Swiss font. Even though our test data only consisted of Swiss license plates we got better results using leu.traineddata
.
from train-ocr.
Hie maechler,
Can you help with how to attach our custom fonts to the leu.traineddata.
it would be a great help.
looking forward to hear from you soon.
thanks in advance
from train-ocr.
@bhavna7 The documentation chapter "Training OCR" tells you how to add your custom fonts: http://doc.openalpr.com/opensource.html#training-ocr
from train-ocr.
@bhavna7 The documentation chapter "Training OCR" tells you how to add your custom fonts: http://doc.openalpr.com/opensource.html#training-ocr
Hi @bhavna7 , I'm trying to train tessaract for austrian lp, but I have an issue. Could you please spend some time to tell or show us about your approach how you train the data. Especially how did you make the tif file, and how you combine the files for leu.traineddata.
Thanks!
from train-ocr.
@PetarMG-BG we had a similar discussion starting here: #33 (comment)
Maybe @alucard079 could help you, as he recently used the training tools.
from train-ocr.
@PetarMG-BG what part are you now?
from train-ocr.
@alucard079 currently I'm using a tif and box files for austrian lp, provided in some of the treads here.
The problem of this files are the quality of the images. How did you generate them?
from train-ocr.
@PetarMG-BG markus @maechler provided a train.py
for me. I think his code with a minimum revision will make it work.
@PetarMG-BG anw, I recompiled again the openalpr because I reinstalled my linux again, will you help me in compilling it again? I'm having a problem with "make".
from train-ocr.
@alucard079 what is the error of make?
from train-ocr.
@PetarMG-BG openalpr/openalpr#775
from train-ocr.
What exactly do i need to to with that swiss data?
There are many directories:
- /usr/share/openalpr/runtime_data/config/
-> There is NO ch.conf !! - /usr/share/openalpr/runtime_data/region
-> There is NO ch.xml - /usr/share/openalpr/runtime_data/ocr/tessdata
-> There is a fileleu.traineddata
but nolch.traineddata
What are the steps from A-Z so OpenAlpr (Open Sopurce) is able to recognize swiss car numbers?
Thank you for your feedback.
from train-ocr.
@martijintro
I have not used OpenALPR in a while, so I might be missing something here, but I'll try my best to answer your question.
- Download the trained data: traineddata.zip
- Decide whether you want to use it for EU and Swiss plates (a) or for Swiss plates only (b):
a.1. Copyleu.traineddata
toruntime_data/ocr/tessdata
and overwrite the existing file. Use the regular EU configuration and you are probably done.
b.1. Copylch.traineddata
toruntime_data/ocr/tessdata
b.2. Add a filech.conf
toruntime_data/config
with the content from below. We useeu.xml
for the detector as it works well enough.
b.3. Add a filech.patterns
toruntime_data/postprocess
with the content from below.
runtime_data/config/ch.conf
; Single-line Swiss style plates
; 35-50; 45-60, 55-70, 65-80, 75-90
char_analysis_min_pct = 0.35
char_analysis_height_range = 0.15
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 5
segmentation_min_speckle_height_percent = 0.2
segmentation_min_box_width_px = 5
segmentation_min_charheight_percent = 0.4;
segmentation_max_segment_width_percent_vs_average = 2.0;
plate_width_mm = 300
plate_height_mm = 80
multiline = 0
char_height_mm = 55
char_width_mm = 30
char_whitespace_top_mm = 13
char_whitespace_bot_mm = 13
template_max_width_px = 184
template_max_height_px = 46
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 18
plateline_sensitivity_horizontal = 55
; Regions smaller than this will be disqualified
min_plate_size_width_px = 65
min_plate_size_height_px = 18
; Results with fewer or more characters will be discarded
postprocess_min_characters = 3
postprocess_max_characters = 8
detector_file = eu.xml
ocr_language = lch
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [ABDEFGHIJLNORSTUVWZ]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto
runtime_data/postprocess/ch.patterns
ch [ABDEFGHIJLNORSTUVWZ][ABDEFGHIJLNORSTUVWZ]######
ch [APM]######
from train-ocr.
thank you very much, will try it!! :-)
from train-ocr.
and: so i saw, a swiss configuration was not added until now: openalpr/openalpr#881
from train-ocr.
OpenALPR seems to have a bug with TESSDATA_xxx variable: openalpr/openalpr#882
The only possible way seems to be that:
cp /usr/share/openalpr/runtime_data/ocr/tessdata/leu.traineddata /usr/share/openalpr/runtime_data/ocr
Act of resignation!!!!!!!!!!!!!!
from train-ocr.
OK, so:
1. wget https://github.com/openalpr/train-ocr/files/1597439/traineddata.zip
2. unzip traineddata.zip
3. cp ./leu.traineddata /usr/share/openalpr/runtime_data/ocr (So NO tessdata directory due to this [CENSORED] bug!!!)
4. alpr -c eu n.jpg -> "No license plates found."
So: Doesn't work, all in all...
from train-ocr.
I think it's a product strategy to make the opensource version completely unusable, so the people buy it because they are resignated.
I think i'm right with that.
from train-ocr.
So the OS version is just a decoy, nothing else....!!
from train-ocr.
And i don't like that strategy. Because it's not honest.
Because of that, now i try it with https://platerecognizer.com, hehe!! :-)
from train-ocr.
OK thx...
from train-ocr.
Related Issues (20)
- Tesseract Path in Linux/Ubuntu HOT 18
- Train.py for windows HOT 2
- Train for two different kind of license plates HOT 29
- Getting the training set HOT 1
- What is the difference between train-oct and train-detector? HOT 1
- Failed to create .traineddata file from box and tif for Indonesian license plate HOT 2
- Multiline license plate
- Plates with varying character height HOT 1
- Training Tesseract 4 HOT 6
- Instructions on adding a country
- Outdated Instructions
- trained new data
- Issues in path of tesseract in train.py HOT 3
- Installation of Tesseract in Local Directory HOT 1
- Error in train.py specifying tesseract-ocr HOT 3
- Where is openalpr-utils-prepcharsfortraining ? HOT 2
- can train-orc work with tesseract 3.05
- Error: You have not tagged any characters HOT 2
- openalpr-utils-binarizefontsheet program
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from train-ocr.