Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crop_plates.py #23

Open
sescolb opened this issue Jan 6, 2018 · 9 comments
Open

crop_plates.py #23

sescolb opened this issue Jan 6, 2018 · 9 comments

Comments

@sescolb
Copy link

sescolb commented Jan 6, 2018

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

thank you

@raedhellal
Copy link

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
Copy link

debMan commented Jun 8, 2018

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
Copy link

Got exactly the same problem.

@wiemrachman
Copy link

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

thank you

@zhouhao27
Copy link

Fixed the problem. Refer to my fix in:

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

@alucard079
Copy link

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

what to do if this happens?

@alucard079
Copy link

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
Copy link

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
Copy link

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants