Open sk- opened 3 years ago
First of all, thanks for providing images and your existing code.
Looks like something is wrong with your model.
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();
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.
Please provide at least 10 example images of the CAPTCHA system:
![c10](https://user-images.githubusercontent.com/911768/109427096-89adec00-79cf-11eb-970b-2a725e7c2bc5.png)
Please provide the full JavaScript source to what you've already tried:
I'm getting an error due to
exact_characters
it fails while trying to accessorig_width
of one of the non-existent blobs.