Closed Akshaypatil15 closed 4 years ago
ValueError: cannot reshape array of size 291081 into shape (256,128,3,3)
I have met the same problem here:
I have change the cfg file : w ,height to 224,224 Then I change the src code:
#inputs = tf.placeholder(tf.float32, [None, FLAGS.size, FLAGS.size, 3], "inputs")
inputs = tf.placeholder(tf.float32, [None, 224, 224, 3], "inputs")
Is there anyone who can solve the problem? Please help me. Thanking You.
I have seen the same issue with 1 class YoloV3 & tiny YoloV3. My conclusion is that the converter works without error only with standard Yolo configuartion -> COCO & VOC. My workaround is that I trained a 20 class (VOC) Yolov3 with just a single class. During inference I filter out all the other class erroneous detentions.
@gcharko2018 Did you fill you names file with dummy categories ?
@ashuezy Yes I did but you may leave them as they are except category 0 that is the custom name. Since categories >0 can be filtered out using 2 lines of code, the name of the other categories are never shown.
ValueError: cannot reshape array of size 291081 into shape (256,128,3,3)
I have met the same problem here:
I have change the cfg file : w ,height to 224,224 Then I change the src code:
placeholder for detector inputs
#inputs = tf.placeholder(tf.float32, [None, FLAGS.size, FLAGS.size, 3], "inputs") inputs = tf.placeholder(tf.float32, [None, 224, 224, 3], "inputs")
Is there anyone who can solve the problem? Please help me. Thanking You.
@xiayq1 In my case, the cfg file contains default : w ,height as 416 ,416
Thank you guys for your efforts but I found that changing upsample strides=2 to strides=3 create problem. My other model which is basically trained on default strides=2 is successfully converted to ckpt file but with loss in accuracy.
Change your labels.txt to appropriate length.
Change your labels.txt to appropriate length.
Thank you.. but already checked label.txt and removed all possible blank newline... Issue was number of upsample strides in cfg file.
This happens for problem in (.names) file. You should check tow things to solve this.
just set the number of classes with number of classes that you have in convert.py
Already saw #15 solution but didn't worked. I had made change in default yolov3.cfg file. Final layer consist of 24 filters instead if 255.
my.cfg
yolov3.cfg
I am also using custom anchors =>
anchors = 41,11, 63,14, 87,18, 113,19, 143,27, 108,45, 166,44, 207,41, 267,74
So what changes should I do? Please help me. Thanking You.