Comments (3)
@liuguoyou 这个出错信息的意思是你没有安装 Python caffe module,需要你用原始的 caffe 代码编译安装。使用 protobin 能够大幅度缩小 app 的大小,并且提升初始化速度。
from caffe-mobile.
也可以把build/include/caffe/proto/caffe_pb2.py拷贝到tools路径下,修改prototxt2bin.py为:
#!/usr/bin/env python
import sys
from os import path
import caffe_pb2
from google.protobuf import text_format
if len(sys.argv) < 2:
print("Usage: ./prototxt2bin.py net.prototxt")
for filename in sys.argv[1:]:
basename, extname = path.splitext(filename)
if extname == '.prototxt':
print("Read Caffe net text from: " + filename)
params = caffe_pb2.NetParameter()
with open(filename, 'rt') as f:
text_format.Merge(f.read(), params)
print("Write Caffe net binary to: " + basename + '.protobin')
with open(basename + '.protobin', 'wb') as f:
f.write(params.SerializeToString())
运行即可
from caffe-mobile.
@yanghuanflc 非常感谢,而且我觉得不用拷贝文件,可以直接用 importlib 。既然是你的提议,不知是否愿意发个 pull request?
from caffe-mobile.
Related Issues (20)
- 定制版caffe HOT 4
- Mac系统下编译.build_android.sh问题 HOT 1
- I replaced a new test_image but the result is still 8? Does it really work? HOT 2
- 能提供下net.protobin的原文件net.prototxt HOT 1
- 请问加载forward模型占用的内存可以释放掉吗 HOT 5
- Errors in building for android: <stdio.h> not found and openBlas failed to compile HOT 6
- 编译失败 HOT 1
- Is SSD model supported? HOT 2
- How to build caffe.so? HOT 4
- compile libcaffe-jni.so issue HOT 1
- Failed to parse NetParameter file: /storage/emulated/0/lenet.protobin HOT 2
- ./tools/build_android.sh HOT 3
- protobin to prototxt HOT 1
- can not resolve protobin? HOT 2
- use protobin and caffemodel to inference, the inference result is not what i want? HOT 1
- ./build-openblas.sh: line 127: make: command not found HOT 1
- Porting network caffe on mobile caffe.
- caffe simple has been stoped HOT 3
- Faster-R-CNN with vgg16
- .so file for arm 64-bit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caffe-mobile.