captcha-tensorflow icon indicating copy to clipboard operation
captcha-tensorflow copied to clipboard

How to test using a single image

Open WilliamSMendes opened this issue 3 years ago • 1 comments

Hey, i found this code and it's amazing, thanks for all! I have a issue... how to pass a single captcha per time? In the example you pass a batch.

plus issue: how can i gerenate a black and white captcha? In this case you pass the number 3 on the argument C (RGB), i need to generate more collored type of captchas.

WilliamSMendes avatar Feb 04 '22 14:02 WilliamSMendes

For the black and white captcha I think you need to process the image generated to be grayscaled using PIL

from PIL import Image
 
img = Image.open('captcha.png').convert('L')
img.save('captcha-blackwhite.png')

If you want to pass one image you can refer to this notebook https://github.com/JackonYang/captcha-tensorflow/blob/master/captcha-solver-model-restore.ipynb

snowfluke avatar Feb 08 '22 11:02 snowfluke