openalpr / train-detector

Input files and scripts necessary to train the license plate detector.
GNU Affero General Public License v3.0
125 stars 166 forks source link

crop_plates.py #23

Open sescolb opened 6 years ago

sescolb commented 6 years ago

hello, can you please send me an example on the arguments used on crop_plates.py for full function

thank you

raedhellal commented 6 years ago

python crop_plates.py --input_dir=/home/raed/Desktop/PlateTN/plates --out_dir=/home/raed/Desktop/PlateTN/outputcrop --plate_width=180 --plate_height=46

debMan commented 6 years ago

Hello , I'm getting error, nothing found with search, I've problem with cv.Moments() on line 61, it seems depreciated , how should i fix ? which openCV should i install ? moment = cv.Moments(points) i've replace above line with : moment = cv2.moments(points) but another error occurred: File "./crop_plates.py", line 61, in get_box moment = cv2.moments(points) TypeError: array is not a numpy array, neither a scalar

zhouhao27 commented 6 years ago

Got exactly the same problem.

wiemrachman commented 6 years ago

hello, can you please send me an example of yaml file? and how to create yaml fie

thank you

zhouhao27 commented 6 years ago

Fixed the problem. Refer to my fix in:

https://github.com/zhouhao27/train-detector

alucard079 commented 5 years ago

File "crop_plates.py", line 34 print "input_dir (%s) doesn't exist" ^ SyntaxError: invalid syntax

what to do if this happens?

alucard079 commented 5 years ago

I'm having a problem with this, I randomly guess the value of template_max_width_px = 163 template_max_height_px = 63 I don't know what to consider about this, would you help me?

` ; 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.3 segmentation_min_box_width_px = 4 segmentation_min_charheight_percent = 0.4; segmentation_max_segment_width_percent_vs_average = 1.6;

plate_width_mm = 390 plate_height_mm = 140 multiline = 0

char_height_mm = 70 char_width_mm = 35 char_whitespace_top_mm = 22 char_whitespace_bot_mm = 35

template_max_width_px = 163 template_max_height_px = 63

; Higher sensitivity means less lines plateline_sensitivity_vertical = 22 plateline_sensitivity_horizontal = 50

; Regions smaller than this will be disqualified min_plate_size_width_px = 85 min_plate_size_height_px = 38

; Results with fewer or more characters will be discarded postprocess_min_characters = 4 postprocess_max_characters = 8

ocr_language = lph

; Override for postprocess letters/numbers regex. postprocess_regex_letters = [A-Z] 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 `

cannonball0608 commented 5 years ago

File "crop_plates.py", line 34 print "input_dir (%s) doesn't exist" ^ SyntaxError: invalid syntax

what to do if this happens?

i have same problem to this. any solution to suggest?

Hunain-Gillani commented 5 years ago

File "crop_plates.py", line 34 print "input_dir (%s) doesn't exist" ^ SyntaxError: invalid syntax what to do if this happens?

i have same problem to this. any solution to suggest?

add brackets after print, like this print()