Closed nicolaspavlotsky closed 3 years ago
Since all images appear to have exactly four characters that are always in the same locations, and since the background appears to be identical across all images, you could probably get away with just using fixed_blob_locations
.
<div class="main">
<div id="debugPreprocessed"></div>
<div id="debugSegmented"></div>
<div id="solution"></div>
<div id="visualizeModel"></div>
</div>
<script>
var cbl = new CBL({
fixed_blob_locations: [
{ x1: 20, y1: 14, x2: 39, y2: 33 },
{ x1: 40, y1: 14, x2: 59, y2: 33 },
{ x1: 60, y1: 14, x2: 79, y2: 33 },
{ x1: 80, y1: 14, x2: 99, y2: 33 }
],
character_set: "abcdefghijklmnopqrstuvwxyz0123456789",
blob_min_pixels: 50,
blob_max_pixels: 400,
pattern_width: 20,
pattern_height: 20,
allow_console_log: true,
perceptive_colorspace: true,
exact_characters: 4,
blob_console_debug: true,
blob_debug: "debugSegmented"
});
cbl.train("0avp.jpg");
cbl.train("7wmv.jpg");
cbl.train("8hog.jpg");
cbl.train("26j7.jpg");
cbl.train("51fo.jpg");
cbl.train("56t1.jpg");
var saveModel = function() {
cbl.condenseModel();
cbl.sortModel();
cbl.visualizeModel("visualizeModel");
cbl.saveModel();
}
</script>
The serialized model (created by calling saveModel()
after training) is really clean. You'll just need to make sure you train on enough sample images to cover all the characters.
Thanks!! You're a life saver!
Hi, I'm trying to solve this captchas:
Without success. Here's my config: