skotz / cbl-js

JavaScript CAPTCHA solving library
MIT License
155 stars 47 forks source link

Help for this kind of CAPTCHA #68

Open arthurbh opened 2 years ago

arthurbh commented 2 years ago

Its a exect 6 number/letter captcha, background white, letters/numbers, noises and lines are black. this is where I get so far. But i cant identify a lot of letters and numbers. U could help me.

1AkDBA 2LjXTB 4c5VsC 5A9EYc 64kQCH 79zqTL 84fpEm 99gses 312VN7 a1F2CW b6iSJP CcQ2c4 tTXNDM

train result

train-result

var cbl = new CBL({
            /* Define a method that takes an input CAPTCHA and performs a set of image operations to remove noise. */
            preprocess: function (img) {
                img.debugImage("debugPreprocessed");
                //remove lines
                img.convolute([
                    [1, 0, 1],
                    [0, 1, 0],
                    [1, 0, 1]
                ], 1);
                img.cropRelative(10, 7, 0, 8);
                img.binarize(180);
                img.debugImage("debugPreprocessed");
            },
            /* The set of characters that could potentially be in this CAPTCHA system. */
            character_set: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
            exact_characters: 6,
            exact_characters_width: 2,
            exact_characters_play: 1,
            blob_min_pixels: 4,
            blob_max_pixels: 10000,
            pattern_width: 30,
            pattern_height: 30,
            pattern_maintain_ratio: true,
            /* The ID of the element to output all work-in-progress images of segmented characters from each image. */
            blob_debug: "debugSegmented"
        });

        // Queue up a few images for training. This will run the preprocess and segmentation steps on each image and 
        // display a modal popup prompting you to classify each character.
        // Note that if your browser gives you a Cross Origin Request error in the console log it's because you're attempting to load an
        // image via the file:// protocol which is a security concern. You either need to set up a local server and use http:// or
        // find some way to disable that security setting during development (not recommended).
        cbl.train("../captchas/rfb/1AkDBA.png");
        cbl.train("../captchas/rfb/2LjXTB.png");
        cbl.train("../captchas/rfb/312VN7.png");
        cbl.train("../captchas/rfb/4c5VsC.png");
        cbl.train("../captchas/rfb/5A9EYc.png");

        var saveModel = function () {
            // Download the model after training!
            // Note that if your browser doesn't automatically prompt you to download the model file (for security reasons), you can
            // get the serialized model using clb.serializeModel() instead and manually saving it to a file.
            cbl.saveModel();
        }
skotz commented 2 years ago

This one might be a bit of a challenge due to the complexity. See #29