All Projects → d4nst → Rotnet

d4nst / Rotnet

Licence: mit

Projects that are alternatives of or similar to Rotnet

Data Science Online
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Road lane line detection
Find lane lines on the road using Python and OpenCV, applying Canny edge detectors and Hough line transforms
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Ml Web App
Train and Deploy Simple Machine Learning Model With Web Interface - Docker, PyTorch & Flask
Stars: ✭ 204 (+0.99%)
Mutual labels:  jupyter-notebook
Csa Inpainting
Coherent Semantic Attention for image inpainting(ICCV 2019)
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Automl service
Deploy AutoML as a service using Flask
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Data Kit
Devenez Data-Scientist sur Le Wagon On Demand
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Fastpages
An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
Stars: ✭ 2,888 (+1329.7%)
Mutual labels:  jupyter-notebook
Bayesian Modelling In Python
A python tutorial on bayesian modeling techniques (PyMC3)
Stars: ✭ 2,332 (+1054.46%)
Mutual labels:  jupyter-notebook
Neurotech Course
CS198-96: Intro to Neurotechnology @ UC Berkeley
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Swapnet
Virtual Clothing Try-on with Deep Learning. PyTorch reproduction of SwapNet by Raj et al. 2018. Now with Docker support!
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Face toolbox keras
A collection of deep learning frameworks ported to Keras for face analysis.
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Release
Deep Reinforcement Learning for de-novo Drug Design
Stars: ✭ 201 (-0.5%)
Mutual labels:  jupyter-notebook
Scikit Allel
A Python package for exploring and analysing genetic variation data
Stars: ✭ 201 (-0.5%)
Mutual labels:  jupyter-notebook
Zaoqi Python
公众号:早起Python
Stars: ✭ 202 (+0%)
Mutual labels:  jupyter-notebook
Machine Learning Deep Learning Notes
机器学习、深度学习的学习路径及知识总结
Stars: ✭ 203 (+0.5%)
Mutual labels:  jupyter-notebook
Joyful Pandas
pandas中文教程
Stars: ✭ 2,788 (+1280.2%)
Mutual labels:  jupyter-notebook
Docker Course Xgboost
Materials for an online-course - "Practical XGBoost in Python"
Stars: ✭ 201 (-0.5%)
Mutual labels:  jupyter-notebook
Alpha Zero General
A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more
Stars: ✭ 2,617 (+1195.54%)
Mutual labels:  jupyter-notebook
Uc2 Git
Respository for Open-Science modular microscope system.
Stars: ✭ 203 (+0.5%)
Mutual labels:  jupyter-notebook
Tensorflow Deep Learning
All course materials for the Zero to Mastery Deep Learning with TensorFlow course.
Stars: ✭ 170 (-15.84%)
Mutual labels:  jupyter-notebook

RotNet

This repository contains the code necessary to train and test convolutional neural networks (CNNs) for predicting the rotation angle of an image to correct its orientation. There are scripts to train two models, one on MNIST and another one on the Google Street View dataset. Since the data for this application is generated on-the-fly, you can also train using your own images in a similar way. A detailed explanation of the code and motivation for this project can be found in my blog.

Requirements

The code mainly relies on Keras to train and test the CNN models, and OpenCV for image manipulation.

You can install all the required packages using pip: pip install -r requirements.txt

The recommended way to use Keras is with the TensorFlow backend. If you want to use it with the Theano backend you will need to make some minor modifications to the code to make it work.

Train

Run either python train/train_mnist.py to train on MNIST or python train/train_street_view.py to train on the Google Street View dataset. Note that the first time you run the scripts will take longer since the datasets will be automatically downloaded. Also, you will need a decent GPU to train the ResNet50 model that is used in train_street_view.py, otherwise it will take quite long to finish.

If you only want to test the models, you can download pre-trained versions here.

Note also that the regression models (train_mnist_regression.py and train_street_view_regression.py) don't provide a good accuracy and are only included for illustration purposes.

Test

You can evaluate the models and display examples using the provided Jupyter notebooks. Simply run jupyter notebook from the root directory and navigate to test/test_mnist.ipynb or test/test_street_view.ipynb.

Finally, you can use the correct_rotation.py script to correct the orientation of your own images. You can run it as follows:

python correct_rotation.py <path_to_hdf5_model> <path_to_input_image_or_directory>

You can also specify the following command line arguments:

  • -o, --output to specify the output image or directory.
  • -b, --batch_size to specify the batch size used to run the model.
  • -c, --crop to crop out the black borders after rotating the images.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].