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

Can't segment image #2

Open
neilyoung opened this issue Jun 4, 2024 · 3 comments
Open

Can't segment image #2

neilyoung opened this issue Jun 4, 2024 · 3 comments

Comments

@neilyoung
Copy link

neilyoung commented Jun 4, 2024

First of all: Thanks for sharing.

I was running it under Python 3.10 and found these issues:

  • from sklearn.externals import joblib failed all the time and was successfully replaced by import joblib
  • There are some places where .as_grey is used. Needs to be .as_gray
  • During training I saw this:
>>> TRAININ USING: mlp
STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.

Increase the number of iterations (max_iter) or scale the data as shown in:
    https://scikit-learn.org/stable/modules/preprocessing.html
  self.n_iter_ = _check_optimize_result("lbfgs", opt_res, self.max_iter)
>>> FINISHED TRAINING

Other than that: I was successfully predicting with "-a", but not with my own image, like this one or others:

image

I always got Can't segment image for all own images.

EDIT: Came over the mlp training by increasing the limit to 300

@neilyoung
Copy link
Author

I also see a possible ambiguity problem for German plates at least.

In your data set you have B EW 742. This is recognized as

BEW742
Local Thresholding, with closing
LABEL:                 BEW742
mlp        PREDICTION: B5W742 
svm_rbf    PREDICTION: BLW742 
sgd        PREDICTION: D5W742 
kneighbors PREDICTION: BEW742 
mlp_adam   PREDICTION: B5W742 
mlp_sgd    PREDICTION: BEW742 
svm_linear PREDICTION: B5W742 

Plain BEW742, without spaces, is simply ambiguous, because it could be a Berlin numberplate (B EW 742) or even a Beckum number plate (BE W 742). And there are many, many other ambiguities in German number plate recognition, if you not even detect the space between the first 1 to 3 letters and the rest.

@neilyoung
Copy link
Author

Confused now: Tried this:

python predict.py -t /Users/decades/Documents/tmp/SimpleLPR/imgs/plates/BEW742.png 

and it brought me the same "Can't segment...". But it was OK with python predict -a

@neilyoung
Copy link
Author

neilyoung commented Jun 4, 2024

Oh, that's crazy... You don't really support the provisioning of arbitrary images somewhere in the paths...

I copied my "auto5.png" as "BRD1891.png" into "./imgs/plates" and ran...

 python predict.py -t BRD1891.png

And look what I've got:

Otsu Thresholding, with closing
LABEL:                 BRD1891 
mlp        PREDICTION: 5GD25V2 
svm_rbf    PREDICTION: BRD1B71 
sgd        PREDICTION: BGD2BV1 
kneighbors PREDICTION: BRD1B21 
mlp_adam   PREDICTION: BRD2372 
mlp_sgd    PREDICTION: 5RD23R2 
svm_linear PREDICTION: 5PD2572 

What kind of higher nonsense is this? (besides the fact, that there is not even one correct prediction?)

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

1 participant