Code Monkey home page Code Monkey logo

-keras's Introduction

图像分类集成以下模型:ResNet18、ResNet34、ResNet50、ResNet101、ResNet152、VGG16、VGG19、InceptionV3、Xception、MobileNet、AlexNet、LeNet、ZF_Net、DenseNet、mnist_net、TSL16,在config.py里面选择使用哪种模型.

the project apply the following models:

  • VGG16
  • VGG19
  • InceptionV3
  • Xception
  • MobileNet
  • AlexNet
  • LeNet
  • ZF_Net
  • ResNet18
  • ResNet34
  • ResNet50
  • ResNet101
  • ResNet152
  • DenseNet(dismissed this time)
  • mnist_net
  • TSL16

train or test dataset

classes name contained in folder name

"training or testing dataset folder is:"

/path/classes1/cat*.jpg,

/path/classes2/dog*.jpg,

/path/classes3/people*.jpg,

/path/classes4/*.jpg,

  • Attentions ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
  • classes name must be contained in folder name

environment

My environment is based on

  • ubuntu16
  • cuda8 (cuda9.0)
  • tensorflow_gpu1.4 (tensorflow_gpu1.10 )
  • keras2.0.8
  • numpy
  • tqdm
  • opencv-python
  • scikit-learn

Install packages

  • pip3 install tensorflow_gpu==1.4
  • pip3 install keras==2.0.8
  • pip3 install numpy
  • pip3 install tqdm
  • pip3 install opencv-python
  • pip3 install scikit-learn

1.confirm config.py

  • choose model and change parameter in config.py

2.train or test dataset prepare

  • python3 mk_class_idx.py

3.train your model

  • Train sigle model : python3 train.py modelName
  • Train All model : run " sh trainAll.sh " to train all model (in ubuntu)
  • Tensorboard : take LeNet as example, run " tensorboard --logdir=./checkpoints/LeNet " to watch training with tensorboard

4.predict your model

  • predict model: python3 predict.py modelName classesName

5.result of mnist dataset(number 0~9)

Image text

Any Questions???

Author email: [email protected]

-keras's People

Contributors

tslgithub 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.