Python application to break captcha of URP(University Resource Plan)System , using OpenCV(2.1)
- pip
- python-opencv (see python-opencv tutorial for more details)
Clone the code to your local project by
# git clone git@github.com:JetMuffin/urp-decaptcha.git
Install dependencies
# cd urp-decaptcha
# pip install -r requirements
Run
# python decaptcha.py <image_to_decaptcha>
Complete usage:
Usage: decaptcha.py [options]
Options:
-h, --help show this help message and exit
-s SHOW, --show=SHOW show input image
-b SHOW_BINARY, --show_binary=SHOW_BINARY
show binary image of input
-t TRAIN_DATA, --train_data=TRAIN_DATA
path of train data
Use existing image to train classification model
segmenter = NormalSegmenter()
extractor = SimpleFeatureExtractor(feature_size=20, stretch=False)
analyzer = KNNAnalyzer(segmenter, extractor)
analyzer.train('data/features.jpg')
- Use classification model to test your own images
result = analyzer.analyze('data/example.jpg')
Welcome to fork my code and add more segmentation, feature_extraction, or classification to this project.