# RotNet
**Repository Path**: fkgeek/RotNet
## Basic Information
- **Project Name**: RotNet
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-12-02
- **Last Updated**: 2021-12-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## 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.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)
```
## 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