Remove-captcha-security-features-by-Pix2Pix

47 阅读1分钟

简单验证码仅500样本既可收敛 框架实用且通用性高

参考

f_pix2pix.png

failed_pix2pix.png

Go for code -> Out of the box Step one Real Captcha image like this real_a.png Step two Using PIL Make fake image like this real_b.png

Step three Combine Paired data BCXY.PNG

python datasets/combine_A_and_B.py --fold_A /pix2pix_working/sf --fold_B /pix2pix_working/sf_fake --fold_AB /pix2pix_working/sf_A_B

Step last Train Model

cost 10min ,about 50 epoch when convergence

python train.py --dataroot  /pix2pix_working/sf_A_B --name sf_pix2pix --model pix2pix --direction AtoB --batch_size 32 --preprocess none --no_flip 

Inference

python test.py --dataroot  /pix2pix_working/sf/test --name sf_pix2pix --model test --direction AtoB --dataset_mode single --norm batch --preprocess none