thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

Unable to execute on raspberry pi #678

Open monupurohit opened 6 years ago

monupurohit commented 6 years ago

Installed all dependencies pi@raspberrypi:/usr/local/lib/python3.5/site-packages $ python3 Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170124] on linux Type "help", "copyright", "credits" or "license" for more information.

import numpy import cv2 import tensorflow as tf

While executing the pre-trained model, getting the below error. "TypeError: batch_norm() got an unexpected keyword argument 'param_initializers'"

snippet : pi@raspberrypi:/usr/local/lib/python3.5/site-packages $ python3 flow --imgdir sample_img/ --model cfg/tiny-yolo-voc.cfg --load bin/tiny-yolo-voc.weights

Parsing ./cfg/tiny-yolo-voc.cfg Parsing cfg/tiny-yolo.cfg Loading bin/tiny-yolo-voc.weights ... Successfully identified 63471556 bytes Finished in 0.09866046905517578s Model has a coco model name, loading coco labels.

Building net ... Source | Train? | Layer description | Output size -------+--------+----------------------------------+--------------- Traceback (most recent call last): File "flow", line 6, in cliHandler(sys.argv) File "/usr/local/lib/python3.5/site-packages/darkflow/cli.py", line 26, in cliHandler tfnet = TFNet(FLAGS) File "/usr/local/lib/python3.5/site-packages/darkflow/net/build.py", line 75, in init self.build_forward() File "/usr/local/lib/python3.5/site-packages/darkflow/net/build.py", line 115, in build_forward state = op_create(args) File "/usr/local/lib/python3.5/site-packages/darkflow/net/ops/init.py", line 27, in op_create return op_types[layer_type](args) File "/usr/local/lib/python3.5/site-packages/darkflow/net/ops/baseop.py", line 42, in init self.forward() File "/usr/local/lib/python3.5/site-packages/darkflow/net/ops/convolution.py", line 73, in forward temp = self.batchnorm(self.lay, temp) File "/usr/local/lib/python3.5/site-packages/darkflow/net/ops/convolution.py", line 90, in batchnorm return slim.batch_norm(inp, *args) File "/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args return func(args, **current_args) TypeError: batch_norm() got an unexpected keyword argument 'param_initializers'

Can anyone help..

rij12 commented 6 years ago

Have you changed any of darkflow code? or just the config?