- Ubuntu 16.04 or upper (need a nvidia GPU).
- Pytorch with a CUDA. https://varhowto.com/install-pytorch-cuda-10-0/.
- pytorch 1.6.0
- torchvision 0.7.0
- torchnet 0.0.4
- visdom 0.1.8.9
- scipy 1.5.0
- ipdb 0.13.3
- Unzip "more_good_img.zip" and "more_bad_img.zip" to "./data/text_data/" in this repository.
- Run the commend "python -m visdom.server -port 8099" to start a visdom server to visualize.
- Run "python train.py" to train the model.
- Model checkpoints will be saved in the "./checkpoints/"
- Download trained model from "https://drive.google.com/drive/folders/1DSQTTkYGYVvKLzT_D3oQVW4VHFq7BBlk?usp=sharing" and put it in the "./checkpoints/"
- Run the commend "python -m visdom.server -port 8099" to start a visdom server to visualize.
- Put test data (*.png files) to "./data/test_text_data/".
- Run "python test.py" to generate a result file, where each line contains test file's name and predictive label.