Git Product home page Git Product logo

slim_cnn_test's Introduction

slim_cnn_test

Use tensorflow.contrib.slim to training a simple CNN classification model

代码将更新

Usage:

1.1 git clone this project

1.2 create a directory ./datasets/images/

1.3 generate training images:

python3 generate_train_data.py

1.4 generate tfrecord file:

python3 generate_tfrecord.py \
    --images_path ./datasets/images/ \
    --output_path ./datasets/train.record

1.5 create a directory ./training/

1.6 train CNN model:

python3 train.py \
    --record_path ./datasets/train.record \
    --logdir ./training/

1.7 visulize the loss curves:

tensorboard --logdir /home/.../training/

1.8 export frozen inference graph:

python3 export_inference_graph.py \
    --input_type image_tensor \
    --trained_checkpoint_prefix ./training/model.ckpt-xxx(num_steps) \
    --output_directory path/to/exported_model_directory

1.9 evaluate the trained model:

python3 evaluate.py \
    --frozen_graph_path path/to/exported_model_directory/frozen_inference_graph.pb

slim_cnn_test's People

Contributors

shirhe-lyh avatar

Stargazers

 avatar 蔡的一p avatar  avatar  avatar  avatar  avatar  avatar Caesar Hu avatar  avatar calvinxuli avatar  avatar  avatar tony_dd avatar  avatar 嗷呜 avatar 薛强 avatar  avatar  avatar Chandle avatar  avatar  avatar  avatar  avatar Hongshuai Fu avatar  avatar heng.zhang@miivii.com avatar  avatar  avatar  avatar  avatar Nan avatar  avatar  avatar csuzhao avatar flappy bird avatar KAN KAN avatar  avatar

Watchers

 avatar

slim_cnn_test's Issues

About export_inference_graph.py

I want to analyze the detail of how to write a export_inference_graph.py for my own model. So can you push your ckpt file to release. Then I could just try the export_inference_graph.py instead of the whole process.
Thank you

pb文件的生成问题

我想将自己的ckpt模型生成pb文件,但是出错了,请问您也可以给我提供一份您当时的ckpt文件吗?或者应该怎么去调试呢?

error

Hi,thanks for your shares,but I encountered the following error:
Traceback (most recent call last):
File "export_inference_graph.py", line 64, in
tf.app.flags.mark_flag_as_required('trained_checkpoint_prefix')
AttributeError: module 'tensorflow.python.platform.flags' has no attribute 'mark_flag_as_required'

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.