«RotNet» realizes image rotation correction based on deep learning
Looking for information on the Internet, we found that the image rotation angle can be detected by deep learning algorithm. Refer to
The corresponding implementation can't meet the current performance requirements, so I implement one myself
$ pip install -r requirements.txt
$ export PYTHONPATH=<root path>
$ CUDA_VISIBLE_DEVICES=0 python tools/train.py -cfg=configs/xxx.yaml
$ export PYTHONPATH=<root path>
$ CUDA_VISIBLE_DEVICES=0 python demo/demo.py -cfg=demo/xxx.yaml
Suppose your dataset is in the following format
root/dog/xxx.png
root/dog/xxy.png
root/dog/xxz.png
root/cat/123.png
root/cat/nsdf3.png
root/cat/asd932_.png
modify config_file like this
DATASET:
NAME: 'GeneralDataset'
TRAIN_ROOT: /path/to/train_root
TEST_ROOT: /path/to/test_root
TOP_K: (1, 5)
Anyone's participation is welcome! Open an issue or submit PRs.
Small note:
Apache License 2.0 © 2020 zjykzj