All Projects → potterhsu → Svhnclassifier Pytorch

potterhsu / Svhnclassifier Pytorch

Licence: mit
A PyTorch implementation of Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks (http://arxiv.org/pdf/1312.6082.pdf)

Projects that are alternatives of or similar to Svhnclassifier Pytorch

Sketchy
Stars: ✭ 141 (+0%)
Mutual labels:  jupyter-notebook
Geometric Intuition
Understanding ML and deep learning through geometry
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Textrank text summarization
A tutorial for Automatic Text Summarization using TextRank algorithm.
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Notebook
Collection of jupyter notebooks for demonstrating software.
Stars: ✭ 141 (+0%)
Mutual labels:  jupyter-notebook
Kdd winniethebest
KDD Cup 2020 Challenges for Modern E-Commerce Platform: Multimodalities Recall first place
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Data Analysis
主要是爬虫与数据分析项目总结,外加建模与机器学习,模型的评估。
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Glmnet python
Stars: ✭ 140 (-0.71%)
Mutual labels:  jupyter-notebook
Cutout Random Erasing
Cutout / Random Erasing implementation, especially for ImageDataGenerator in Keras
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Vtubestudio
Placeholder for VTube Studio
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Deep learning
added all materials
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Byte Sized Code
A collection of Jupyter notebooks for learning Python from the ground up.
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Lessonmaterials
Open Sourced Curriculum and Lessons for an Introductory AI/ML Course
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Jupytext.vim
Vim plugin for editing Jupyter ipynb files via jupytext
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Dse210 probability statistics python
Probability and Statistics Using Python Data Science Masters Course at UCSD (DSE 210)
Stars: ✭ 141 (+0%)
Mutual labels:  jupyter-notebook
Natural Language Processing Tutorials
Natural Language Processing Tutorials(NLP) with Julia and Python
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Makeyourownneuralnetwork
Code for the Make Your Own Neural Network book
Stars: ✭ 1,859 (+1218.44%)
Mutual labels:  jupyter-notebook
Lacmus
Lacmus is a cross-platform application that helps to find people who are lost in the forest using computer vision and neural networks.
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Mlnd distracted driver detection
基于深度学习的驾驶员状态检测,不仅仅可以识别出疲劳驾驶,还能够识别出各种各样的状态
Stars: ✭ 141 (+0%)
Mutual labels:  jupyter-notebook
Machine Learning
Notes for machine learning
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook
Torchtext Summary
torchtext使用总结,从零开始逐步实现了torchtext文本预处理过程,包括截断补长,词表构建,使用预训练词向量,构建可用于PyTorch的可迭代数据等步骤。并结合Pytorch实现LSTM.
Stars: ✭ 142 (+0.71%)
Mutual labels:  jupyter-notebook

SVHNClassifier-PyTorch

A PyTorch implementation of Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks

If you're interested in C++ inference, move HERE

Results

Steps GPU Batch Size Learning Rate Patience Decay Step Decay Rate Training Speed (FPS) Accuracy
54000 GTX 1080 Ti 512 0.16 100 625 0.9 ~1700 95.65%

Sample

$ python infer.py -c=./logs/model-54000.pth ./images/test-75.png
length: 2
digits: 7 5 10 10 10

$ python infer.py -c=./logs/model-54000.pth ./images/test-190.png
length: 3
digits: 1 9 0 10 10

Loss

Requirements

  • Python 3.6

  • torch 1.0

  • torchvision 0.2.1

  • visdom

    $ pip install visdom
    
  • h5py

    In Ubuntu:
    $ sudo apt-get install libhdf5-dev
    $ sudo pip install h5py
    
  • protobuf

    $ pip install protobuf
    
  • lmdb

    $ pip install lmdb
    

Setup

  1. Clone the source code

    $ git clone https://github.com/potterhsu/SVHNClassifier-PyTorch
    $ cd SVHNClassifier-PyTorch
    
  2. Download SVHN Dataset format 1

  3. Extract to data folder, now your folder structure should be like below:

    SVHNClassifier
        - data
            - extra
                - 1.png 
                - 2.png
                - ...
                - digitStruct.mat
            - test
                - 1.png 
                - 2.png
                - ...
                - digitStruct.mat
            - train
                - 1.png 
                - 2.png
                - ...
                - digitStruct.mat
    

Usage

  1. (Optional) Take a glance at original images with bounding boxes

    Open `draw_bbox.ipynb` in Jupyter
    
  2. Convert to LMDB format

    $ python convert_to_lmdb.py --data_dir ./data
    
  3. (Optional) Test for reading LMDBs

    Open `read_lmdb_sample.ipynb` in Jupyter
    
  4. Train

    $ python train.py --data_dir ./data --logdir ./logs
    
  5. Retrain if you need

    $ python train.py --data_dir ./data --logdir ./logs_retrain --restore_checkpoint ./logs/model-100.pth
    
  6. Evaluate

    $ python eval.py --data_dir ./data ./logs/model-100.pth
    
  7. Visualize

    $ python -m visdom.server
    $ python visualize.py --logdir ./logs
    
  8. Infer

    $ python infer.py --checkpoint=./logs/model-100.pth ./images/test1.png
    
  9. Clean

    $ rm -rf ./logs
    or
    $ rm -rf ./logs_retrain
    
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].