Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme for caffe2fluid #839

Merged
merged 6 commits into from
Apr 13, 2018
Merged

Update readme for caffe2fluid #839

merged 6 commits into from
Apr 13, 2018

Conversation

walloollaw
Copy link
Contributor

add more info about how to use this tool

1) generate it from caffe.proto using protoc
bash ./proto/compile.sh
- download one from github directly
cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看这里 https://github.com/walloollaw/models/tree/update-readme-for-caffe2fluid/fluid/image_classification/caffe2fluid 文档格式有问题。

需要使用code格式:

cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py

@@ -3,19 +3,27 @@ This tool is used to convert a Caffe model to Fluid model

### Howto
1, Prepare caffepb.py in ./proto if your python has no 'pycaffe' module, two options provided here:
- generate it from caffe.proto using protoc
bash ./proto/compile.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要使用code格式,统一改下吧,同时给所有的*.sh文件,添加+x模式吧。

./proto/compile.sh

@@ -3,19 +3,27 @@ This tool is used to convert a Caffe model to Fluid model

### Howto
1, Prepare caffepb.py in ./proto if your python has no 'pycaffe' module, two options provided here:
- generate it from caffe.proto using protoc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generate pycaffe from caffe.proto by protoc

@@ -3,19 +3,27 @@ This tool is used to convert a Caffe model to Fluid model

### Howto
1, Prepare caffepb.py in ./proto if your python has no 'pycaffe' module, two options provided here:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1, -> 1. 逗号,换成.吧。
'pycaffe' -> pycaffe

'' -> ``

./proto -> proto directory.


2) download one from github directly
cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py
2, Convert the caffe model to fluid model
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caffe -> Caffe
fluid -> Fluid

专有名字,请正确书写格式。 需要统一修改下。

python convert.py alexnet.prototxt \
--caffemodel alexnet.caffemodel \
--data-output-path alexnet.npy \
--code-output-path alexnet.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用code格式

python convert.py  ....


2, Convert the caffe model using 'convert.py' which will generate a python script and a weight(in .npy) file
- save weights as fluid model file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

save weights as fluid model file -> Save weights as Fluid model file

3, Use the converted model to predict

see more detail info in 'examples/xxx'
4, Use the converted model to predict
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4, -> 4.
5, -> 5.

predict -> infer.


see more detail info in 'examples/xxx'
4, Use the converted model to predict
- see more detail info in 'examples/imagenet/run.sh'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detail info -> details


5, compare the inference results with caffe
- see more detail info in 'examples/imagenet/diff.sh'

### Tested models
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下面的模型链接地址,我用不用代理,都没打开。

@qingqing01 qingqing01 merged commit d300e5e into PaddlePaddle:develop Apr 13, 2018
@walloollaw walloollaw deleted the update-readme-for-caffe2fluid branch April 19, 2018 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants