tensorflow-yolo-v3 icon indicating copy to clipboard operation
tensorflow-yolo-v3 copied to clipboard

Error while running demo.py

Open shrybht opened this issue 6 years ago • 6 comments

Hi,

I'm facing the error: UnimplementedError (see above for traceback): Generic conv implementation only s upports NHWC tensor format for now. [[Node: detector/darknet-53/Conv/Conv2D = Conv2D[T=DT_FLOAT, data_forma t="NCHW", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudn n_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](detector/ transpose, ArithmeticOptimizer/detector/darknet-53/Conv/weights_scaled_detector/ darknet-53/Conv/Conv2D)]]

Could you please tell me how to solve the error and run the detector on CPU?

shrybht avatar Jan 07 '19 18:01 shrybht

Got the same error. Tried changing the format to NHWC in demo.py, but no difference. Would you please kindly point us to where to look at? =)

hc625ma avatar Jan 09 '19 16:01 hc625ma

I have the same problem.

corlov avatar Jan 09 '19 16:01 corlov

@mystic123 please help us out.

shrybht avatar Jan 10 '19 00:01 shrybht

having the same issue as well.

anhminh3105 avatar Jan 13 '19 23:01 anhminh3105

You need the parameter --data_format NHWC when you call convert_weights_pb.py and also when you call demo.py for running the demo on CPU.

camilo912 avatar Jan 17 '19 00:01 camilo912

camilo912, thank you a lot! The code works wonderfully! I have run it so:

python3 ./convert_weights.py --data_format NHWC
python3 ./convert_weights_pb.py --data_format NHWC
python3 demo.py --data_format NHWC --frozen_model frozen_darknet_yolov3_model.pb --input_img img2.jpg --output_img out2.jpg

All significant and large objects were found and processed.

corlov avatar Jan 17 '19 07:01 corlov