Comments (4)
No Opkernel means there is no implementation for the hardware running this .pb
.
To resolve this, look at class reorg
of ./net/ops/convolution.py
. It has two methods _forward
and forward
. The current default option is using forward
, which has extract_image_patches
- a built-in method of tensorflow.
Swap the names of two methods and you will be using my manual implementation, which should have no problem with Opkernel implementation.
from darkflow.
i have change the code, but can not generate .pb
/usr/bin/python3 ./flow.py --model /home/qkj/projects/dark_flow/darkflow/cfg/yolo-voc.cfg --load /home/qkj/projects/dark_flow/darkflow/bin/yolo-voc.weights --savepb
Traceback (most recent call last):
File "./flow.py", line 42, in
tfnet = TFNet(FLAGS)
File "/home/qkj/projects/dark_flow/darkflow/net/build.py", line 50, in init
self.build_forward()
File "/home/qkj/projects/dark_flow/darkflow/net/build.py", line 70, in build_forward
state = op_create(*args)
File "/home/qkj/projects/dark_flow/darkflow/net/ops/init.py", line 27, in op_create
return op_typeslayer_type
File "/home/qkj/projects/dark_flow/darkflow/net/ops/baseop.py", line 42, in init
self.forward()
File "/home/qkj/projects/dark_flow/darkflow/net/ops/convolution.py", line 13, in forward
for i in range(h/s):
TypeError: 'float' object cannot be interpreted as an integer
class reorg(BaseOp):
def forward(self):
inp = self.inp.out
shape = inp.get_shape().as_list()
_, h, w, c = shape
s = self.lay.stride
out = list()
for i in range(h/s):
row_i = list()
for j in range(w/s):
si, sj = s * i, s * j
boxij = inp[:, si: si+s, sj: sj+s,:]
flatij = tf.reshape(boxij, [-1,1,1,css])
row_i += [flatij]
out += [tf.concat(2, row_i)]
self.out = tf.concat(1, out)
def _forward(self):
inp = self.inp.out
s = self.lay.stride
self.out = tf.extract_image_patches(
inp, [1,s,s,1], [1,s,s,1], [1,1,1,1], 'VALID')
from darkflow.
Hey, that's a bug when translating from Python2 to Python3. Thanks for pointing it out, I updated the code.
from darkflow.
I got same problem and I swapped 2 function's names but the yolo.pb file is still cause error in Android. Please help me fix this!!!
[[Node: ExtractImagePatches = ExtractImagePatches[T=DT_FLOAT, ksizes=[1, 2, 2, 1], padding="VALID", rates=[1, 1, 1, 1], strides=[1, 2, 2, 1]] (47-leaky)]]
Thanks
from darkflow.
Related Issues (20)
- [Documentation] Link to the Android demo is broken
- tiny yolo predict a lot of bounding boxes for one class problem HOT 1
- Result is empty HOT 2
- PermissionError: [Errno 13] Permission denied: './ckpt/checkpoint' HOT 1
- How to put a darkflow model into Android Studio
- Importing to external project
- Accuracy HOT 1
- error in getting started
- Version of yolo from the yolo.cfg file
- Shrikant@ can you help in in regard of this.
- What's wrong with Darkflow?
- can't import darkflow
- Build Error darkflow on 20.04 Ubuntu
- Training own model
- How to convert tensorflow to darknet?
- Convert annotation video mat files to COCO
- Tensorflow update to TF 2.x
- python setup.py build_ext --inplace HOT 3
- pip install -e .
- NMS.pxd not found
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 darkflow.