yuto3o / yolox

More Than YOLO(v3, v4, v3-tiny, v4-tiny)
150 stars 46 forks source link

Getting Error while executing yolo_utils.non_max_suppression(predictions) #1

Closed aashishd closed 5 years ago

aashishd commented 6 years ago

Hi, A really great piece of work done by you here. I was able to successfully convert my weights and cfg files from darknet to tensorflow ckpt. I was using 3 classes so, I had to change filters in a few layers from 255 to 24 and I was able to get a prediction using the model. But after getting the prediction when I am using yolo_utils.non_max_suppression, I am getting the following error :

_File "/Users/asdhiman/DataAnalysis/darkflow_yolo/yolov3-tensorflow/yolo_utils.py", line 92, in non_max_suppression image_pred = imagepred.reshape(-1, shape[-1]) ValueError: cannot reshape array of size 722 into shape (8)

I am using an input image of shape 608 X 608 as my model was trained on the same dimensions in the darknet yolov3. Do I need to change anything in order for non_max_suppression to run?

yuto3o commented 5 years ago

sorry, that's a long time I haven't login my github since my last submission.

The error may be caused by that 722 can not be divisible by 8. The variable "image_pred" may have a unavailable shape or dtype. Your customize outputs may lead to this error.

In my old code, I have done much hard coding. It's a bad coding style that causes many bugs. I will reconstruct this repository soon.