Simple KCAPTCHA solver using YOLOv8
-
Install requirements with below command
pip3 install ultralytics
-
Generate KCAPTCHA dataset
- Generate Image-label set with kcaptcha-generator
- Recommand to generate >50K image-label set for training
- Split them into train, test, val set
- Reformat BBOX label to YOLO label format using
bbox2yolo.py
python3 bbox2yolo.py --path <dataset root path>
- Generate Image-label set with kcaptcha-generator
-
Configure your training config files as you want
-
Train YOLO with below command
python3 train.py
There is also options for training. You can get option by this command.
python3 train.py --help
Pretrained checkpoint available in this link.
- Inference KCAPTCHA with below command
python3 inference.py --model-path <checkpoint path> \ --input-file <CAPTCHA image path>