GithubHelp home page GithubHelp logo

caffe_cls_demo's Introduction

caffe_cls_demo

Introduction

train image classfication network by caffe

This repo is organized as follows:

caffe_cls_demo/
    ├── data
        ├── imgs
        └── labels
    ├── README.md
    ├── caffe_pred.py
    ├── lmdb_io.py
    ├── deploy.prototxt
    └── solver.prototxt

Requirements

  1. caffe==1.0.0
  2. python==3.6.8
  3. numpy
  4. opencv==3.4.1
  5. Python packages might missing. pls fix it according to the error message.

Installation, Prepare data, Training

Installation

  1. Clone the caffe_cls_caffe repository.
git clone https://github.com/vicwer/caffe_cls_caffe.git
  1. Create data, lmdb and models directory.

Prepare data

data should be organized as follows:

data/
    |->labels/train.txt
    |->labels/test.txt
    |->imgs/*.png
  1. Download dataset

  2. Generate img_list.txt formatted as "img_path label"

  3. Generate train.txt and test.txt formatted as "img_path label"

  4. Generate lmdb:

python3 lmdb_io.py

Train

caffe train --solver=deploy.prototxt -gpu 0

Test:

python3 caffe_pred.py

GOOD LUCK...

caffe_cls_demo's People

Contributors

vicwer avatar

Watchers

James Cloos avatar

Forkers

hongchow

caffe_cls_demo's Issues

Missing res34.prototxt file and caffe file

I have this problem when training, someone HELP me please?
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.SolverParameter: 1:5: Message type "caffe.SolverParameter" has no field named "name".
F0530 15:47:43.124903 2723 upgrade_proto.cpp:1095] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse SolverParameter file: deploy.prototxt
*** Check failure stack trace: ***
@ 0x7f247e77ab5d google::LogMessage::Fail()
@ 0x7f247e77eb77 google::LogMessage::SendToLog()
@ 0x7f247e77c9f9 google::LogMessage::Flush()
@ 0x7f247e77ccfd google::LogMessageFatal::~LogMessageFatal()
@ 0x7f247ee26381 caffe::ReadSolverParamsFromTextFileOrDie()
@ 0x409ae2 train()
@ 0x406728 main
@ 0x7f247d1c1f45 (unknown)
@ 0x406f8c (unknown)
Aborted (core dumped)

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.