https://github.com/zjcv/rotnet
Image rotation correction based on DeepLearning
https://github.com/zjcv/rotnet
convolutional-neural-network deep-learning pytorch rotnet zcls
Last synced: 6 months ago
JSON representation
Image rotation correction based on DeepLearning
- Host: GitHub
- URL: https://github.com/zjcv/rotnet
- Owner: ZJCV
- License: apache-2.0
- Created: 2020-08-22T02:04:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-14T03:19:31.000Z (about 4 years ago)
- Last Synced: 2023-03-05T19:29:24.493Z (about 2 years ago)
- Topics: convolutional-neural-network, deep-learning, pytorch, rotnet, zcls
- Language: Python
- Homepage:
- Size: 12.5 MB
- Stars: 13
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
«RotNet» realizes image rotation correction based on deep learning
![]()
![]()
![]()

## Table of Contents
- [Table of Contents](#table-of-contents)
- [Background](#background)
- [Installation](#installation)
- [Usage](#usage)
- [How to use](#how-to-use)
- [How to add dataset](#how-to-add-dataset)
- [Maintainers](#maintainers)
- [Thanks](#thanks)
- [Contributing](#contributing)
- [License](#license)## Background
Looking for information on the Internet, we found that the image rotation angle can be detected by deep learning algorithm. Refer to
* [d4nst/RotNet](https://github.com/d4nst/RotNet)
* [Correcting Image Orientation Using Convolutional Neural Networks](https://d4nst.github.io/2017/01/12/image-orientation/)
* [Image Orientation Estimation with Convolutional Networks](https://lmb.informatik.uni-freiburg.de/Publications/2015/FDB15/image_orientation.pdf)
* [UNSUPERVISED REPRESENTATION LEARNING BY PREDICTING IMAGE ROTATIONS](https://arxiv.org/pdf/1803.07728.pdf)The corresponding implementation can't meet the current performance requirements, so I implement one myself
## Installation
```angular2html
$ pip install -r requirements.txt
```## Usage
### How to use
* train
```
$ export PYTHONPATH=
$ CUDA_VISIBLE_DEVICES=0 python tools/train.py -cfg=configs/xxx.yaml
```* test
```
$ export PYTHONPATH=
$ CUDA_VISIBLE_DEVICES=0 python demo/demo.py -cfg=demo/xxx.yaml
```### How to add dataset
Suppose your dataset is in the following format
```
root/dog/xxx.png
root/dog/xxy.png
root/dog/xxz.pngroot/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)
```## Maintainers
* zhujian - *Initial work* - [zjykzj](https://github.com/zjykzj)
## Thanks
* [d4nst/RotNet](https://github.com/d4nst/RotNet)
* [ZJCV/ZCls](https://github.com/ZJCV/ZCls)## Contributing
Anyone's participation is welcome! Open an [issue](https://github.com/ZJCV/RotNet/issues) or submit PRs.
Small note:
* Git submission specifications should be complied
with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
* If versioned, please conform to the [Semantic Versioning 2.0.0](https://semver.org) specification
* If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme)
specification.## License
[Apache License 2.0](LICENSE) © 2020 zjykzj