yolov4-custom-functions icon indicating copy to clipboard operation
yolov4-custom-functions copied to clipboard

How can i predict on more than 1 image on a custom yolov4 model?

Open atharva-bhagwat opened this issue 4 years ago • 1 comments

When i try to pass a numpy array of a list of images, i have this error. In this case the batch size was 2. Error Log: ''' tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 23 values, but the requested shape requires a multiple of 2 [[{{node StatefulPartitionedCall/functional_1/tf_op_layer_Reshape_14/Reshape_14}}]] [Op:__inference_signature_wrapper_5588]

Function call stack: signature_wrapper '''

atharva-bhagwat avatar Jan 02 '21 07:01 atharva-bhagwat

is it okay if you use darknet instead of tensorflow? if yes you can use https://github.com/AlexeyAB/darknet

./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -ext_output -dont_show -out result.json < filelist.txt > result.txt

or

darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -ext_output -dont_show -out result.json < filelist.txt > result.txt

shubham-shahh avatar Feb 11 '21 10:02 shubham-shahh