资源算法SVHNClassifier

SVHNClassifier

2019-09-10 | |  188 |   0 |   0

SVHNClassifier-PyTorch

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

Results

Accuracy

Accuracy

Accuracy 95.32% on test dataset after 721,000 steps

Requirements

  • Python 2.7

  • PyTorch

  • h5py

    In Ubuntu:
    $ sudo apt-get install libhdf5-dev
    $ sudo pip install h5py
  • Protocol Buffers 3

  • LMDB

  • Visdom

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.tar
  6. Evaluate

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

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

    $ rm -rf ./logs
    or
    $ rm -rf ./logs_retrain


上一篇:dragan-pytorch

下一篇:translagent

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...