pip install -r requirements.txtCodebase developed on Python-2.7.15
We need to prepare the raw SVHN dataset
- Go to the cloned
multi_digit_classification_attentionfolder and run the following command:
cd SVHN
mkdir dataset-
Download the SVHN dataset and extract the train and test SVHN data into the
datasetfolder insidemulti_digit_classification_attentionfolder. -
Select which type to data to curate and run the following command:
python gen_crop_dataset.py --dataset_type=<train/test>- Select which type to data to generate attention mask and run the following command:
python gen_attn_truth.py --dataset_type=<train/test>- To train detection model run the following command:
python train.py- To train classification model run the following command:
python train_classify_net.pyTo test and visualize results run the following command:
jupyter notebookand open and run:
> evaluate_and_viz.ipynb- To train full model for both detection and classification run the following command:
python train_end2end.py- To test and visualize results run the following command:
jupyter notebookand open and run:
> evaluate_and_viz_end2end.ipynbWe need to generate raw CAPTCHA dataset
- Go to the cloned
multi_digit_classification_attentionfolder and run the following command:
cd other/
mkdir dataset- Generate dataset by running the following command:
python gen_captcha_dataset.py- Move the generated dataset into
CAPTCHAfolder.
- To train detection model run the following command:
python train.py- To train classification model run the following command:
python train_classify_net.pyTo test and visualize results run the following command:
jupyter notebookand open and run:
> evaluate_and_viz.ipynb- To train full model for both detection and classification run the following command:
python train_end2end.py- To test and visualize results run the following command:
jupyter notebookand open and run:
> evaluate_and_viz_end2end.ipynbAny improvements would be appreciated, send a merge request if you would like to contribute.
