naisy / train_ssd_mobilenet

Train ssd_mobilenet of the Tensorflow Object Detection API with your own data.
MIT License
61 stars 24 forks source link

InvalidArgumentError (see above for trackback): assertion failed: [Incorrect scores field length: ... #4

Closed scbean closed 5 years ago

scbean commented 5 years ago

I am getting the following error, I am pretty sure it has to be with something mismatched with my data set and the config setting but can't figure out where. I say this because I am able to train a frozen graph and get it to work correctly with the road sign data but not my own.

I found this line in the object detection folder / utils/np_box_mask_list_ops.py

 if num_boxes != num_scores:
    raise ValueError('Incorrect scores field length: actual vs expected.')

I just don't know what num_boxes and num_scores are and what that might mean for me and a quick google search didn't seem to help...

The following is the error.

InvalidArgumentError (see above for traceback): assertion failed: [Incorrect scores field length: actual vs expected.] [7668] [1917]
     [[node Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Assert/Assert (defined at /home/nvidia/Downloads/realtime_object_detection-master/lib/load_graph_nms_v1.py:197)  = Assert[T=[DT_STRING, DT_INT32, DT_INT32], summarize=3, _device="/job:localhost/replica:0/task:0/device:CPU:0"](Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Equal, Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Assert/Assert/data_0, Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/strided_slice_1, Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/strided_slice)]]

And it keeps going but I am typing it out by hand since I am away from my Xavier. Any ideas what to take a look at or change

scbean commented 5 years ago

It looks like the problem was either the number of classes in the config file didn't match the actual number, or it had something to do with the file extension of the .jpg's being .JPG instead, or it was some combination of these.