ValueError:无效的框数据。数据必须是N [y_min,x_min,y_max,x_max]的numpy数组
我正在使用extraneous code从csv文件中提取tfrecord(谷歌表示这是唯一的方法),这部分具有正确的坐标顺序:
for index, row in group.object.iterrows():
ymins.append(row['ymin'] / width)
xmins.append(row['xmin'] / width)
ymaxs.append(row['ymax'] / height)
xmaxs.append(row['xmax'] / height)
classes_text.append(row['class'].encode('utf8'))
classes.append(class_text_to_int(row['class']))
tf_example = tf.train.Example(features=tf.train.Features(feature={
'image/height': dataset_util.int64_feature(height),
'image/width': dataset_util.int64_feature(width),
'image/filename': dataset_util.bytes_feature(filename),
'image/source_id': dataset_util.bytes_feature(filename),
'image/encoded': dataset_util.bytes_feature(encoded_jpg),
'image/format': dataset_util.bytes_feature(image_format),
'image/object/bbox/ymin': dataset_util.float_list_feature(ymins),
'image/object/bbox/xmin': dataset_util.float_list_feature(xmins),
'image/object/bbox/ymax': dataset_util.float_list_feature(ymaxs),
'image/object/bbox/xmax': dataset_util.float_list_feature(xmaxs),
'image/object/class/text': dataset_util.bytes_list_feature(classes_text),
'image/object/class/label': dataset_util.int64_list_feature(classes)
我在做什么错?所有的tf对象检测教程都使用了浣熊检测器中的generate_tfrecord.py。我在github上找到了一个可以按正确顺序放置坐标的助手,但这根本没有帮助我(上面给出了代码)。