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

Need help with captcha #63

Open
sk- opened this issue Feb 28, 2021 · 1 comment
Open

Need help with captcha #63

sk- opened this issue Feb 28, 2021 · 1 comment
Assignees
Labels

Comments

@sk-
Copy link

sk- commented Feb 28, 2021

Please provide at least 10 example images of the CAPTCHA system:
c1
c2
c3
c4
c5
c6
c7
c8
c9
c10

Please provide the full JavaScript source to what you've already tried:

var cbl = new CBL({
    model_string: 'NoJQvATArFB01wfGzEqR9W09XpALAOywAMZFmuV+2t1dAjNLMayQBwXnk1939cjAGwkiATlgT4knt3mD6SiKTji1cNnO3y5ijAGZGsZiVOwOJHdd0L0BLowIGTzkyNs2vtpCIKeA728VK0Cw7wJjNggCOCCwxhIjWGTU42SICBIaeO8nF30BIrjbAn8IA0k/AMc4RjqG+EZeYoDolESS3IoDLkzJHNLsxmMof26dYQGDApQbRKljCdtGSvg3JGWt+AqlbeXM2dwDyWlpA3GAw6UtBP9mBjre9hNQvV39WQDpQqF6lPSgJ22VaFS+Nh+oKhj2UMAAusAAOKQVq3fYvX5KIguLjo8hcNjY2F1UjGcHhCmScQtDTuCno/6benMnRmLIsjl4+RrMqcsIGCAvNhserGarCpKCrmdZQGbIfBUFAx1DiIFwMogwkZLeTqPCMcQ67Yymja2xqcgGo0ck1MEbfKqGhKaprm/xnSQXK7+KDknRIZJc7xVX36tz/IMrGG+CADSM6RwbVojQUGvnxTHiKqXePEpTNIFpExdDmYssddn7BHiFHR6F58slxt58yt9ltkF1uqVigdhvoUjZQdhELwYeDGyY/4RgLTmHBVp67YTnxMF0a46zl1Mrk7h3p3vbjrrlYn+b2s1myeta8luQZG8+RU7dWru+UcePnQSl632fsxQGQAuYrnHMC3mZdpN3mRoZwONZTVDXN/XraRkKkAZ6z3SNm18M8+RlW0uxbC97W6S97VwrC6CLWjC2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XdUxEAA==',
    preprocess: function(img) {
    },
    character_set: "0123456789abcdefghijklmnopqrstuvwxyz",
    exact_characters: 5,
    pattern_width: 24,
    pattern_height: 24,
    blob_min_pixels: 1,
    blob_max_pixels: 10000,
    allow_console_log: true,
    blob_console_debug: true,
});  

I'm getting an error due to exact_characters it fails while trying to access orig_width of one of the non-existent blobs.

@sk- sk- added the question label Feb 28, 2021
@skotz
Copy link
Owner

skotz commented Feb 28, 2021

First of all, thanks for providing images and your existing code.

Looks like something is wrong with your model.

image

Which is probably due to the missing preprocessing. Since there's a border I'd at least crop that out.

img.cropRelative(1, 1, 1, 1);

Also, this image is interesting since it has a transparent black background, meaning technically the entire image is the same color. The characters are black and the background is transparent black. To get this to work I had to add a new method to the library. You'll need to download the latest version to use this.

img.removeTransparency();

image

So your training script would be something like this.

var cbl = new CBL({
    preprocess: function(img) {
        img.debugImage("debugPreprocessed");
        img.cropRelative(1, 1, 1, 1);
        img.debugImage("debugPreprocessed");
        img.removeTransparency();
        img.debugImage("debugPreprocessed");
        img.colorRegions(1, true);
        img.debugImage("debugPreprocessed");
    },
    character_set: "0123456789abcdefghijklmnopqrstuvwxyz",
    exact_characters: 5,
    pattern_width: 24,
    pattern_height: 24,
    blob_min_pixels: 1,
    blob_max_pixels: 10000,
    allow_console_log: true,
    blob_console_debug: true,
    blob_debug: "debugSegmented"
});

And then your solving script would use the same preprocess steps and have the trained model_string like you did in your example.

@skotz skotz self-assigned this Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants