Giter Site home page Giter Site logo

peleenet's Introduction

PeleeNet

Architecture in paper

  • Architecture of peleenet

  • Net block: stem block & dense block

Architecture in tensorboard

  • stem block

  • dense block

Configuration

  • GPU: Geforce GTX 1080Ti
  • ubuntu16.04

Requirements

  • tensorflow >= 1.0
  • python 2.* or python 3.*
  • numpy
  • scipy
  • cPickle
  • Pillow

Notes: Python2 is default. If you have python3.*, cifar10.py, cache.py dataset.py should be replaced by files stored in python3 folder. Any problems, you can email me!!!

Repo Structure

The following structure show the main frame of this repo.

  PeleeNet
  |———— data/                                 # store cifar10 dataset
          |———— cifar10/
  |———— python/                               # python3 support
          |———— cifar10.py              
          |———— cache.py
          |———— dataset.py
  |———— main.py                               # repo entry
  |———— PeleeNet.py                           # mobilenet class
  |———— layers.py                             # stem block, dense_block, transition_layer
  |———— config.py                             # parameters setting
  |———— utils.py                              # generate datasource
  |———— cifar10.py                            # cifar10.py, cache.py dataset.py  for cifar10 reading
  |———— cache.py
  |———— datatset.py
  
  # if you want to use your own datasets, add your datasets type in line 38 in utils.py. 
  # Images are [input_height, input_width, input_channel] formats and labels are one_hot encoding formats.

Usages

Download Repo

$ git clone https://github.com/nnuyi/PeleeNet.git
$ cd PeleeNet

Datasets

In this repo, since the computation, I mainly focus on CIFAR10 datasets.

  • CIFAR10: You are required to download CIFAR10 datasets here, unzip it and store it in './data/cifar10/' , note that CIFAR-10 python version is required. You can unzip it in './data/cifar10/' using the following command:

    $ tar -zxvf cifar-10-python.tar.gz
    # you will see that data_batch_* are stored in './data/cifar10/cifar-10-batches-py/'
    

Training

  $ python main.py --batchsize=128 \
                   --is_training=True \
                   --is_testing=False \ 
                   --datasets=cifar10 \
                   --input_height=32 \
                   --input_width=32 \
                   --input_channels=3 \
                   --num_class=10
  
  # If GPU options is avaiable, you can use it as the instruction shows below:
  $ CUDA_VISIBLE_DEVICES=[no] \
    python main.py --batchsize=128 \
                   --is_training=True \
                   --is_testing=False \ 
                   --datasets=cifar10 \
                   --input_height=32 \
                   --input_width=32 \
                   --input_channels=3 \
                   --num_class=10
  
  # notes: [no] is the device number of GPU, you can set it according to you machine
  $ CUDA_VISIBLE_DEVICES=0 \
    python main.py --batchsize=128 \
                   --is_training=True \
                   --is_testing=False \ 
                   --datasets=cifar10 \
                   --input_height=32 \
                   --input_width=32 \
                   --input_channels=3 \
                   --num_class=10

Results

Classification

  • After training, you can see that the testing accuracy rate can reach to 89.83%.

  • loss function and training accuracy shows below:

TODO

  • Continute to fine-tuning hyperparameters to improve its accuracy!!!
  • Train in cifar100
  • Train in Caltech101

References

Contact

Email: [email protected]

peleenet's People

Contributors

nnuyi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.