将没有边界框的图像添加到 tflite 模型制造商对象检测数据集

Adding images with no bounding box to tflite model maker object detection dataset

我想将没有任何边界框的图像添加到用于使用 tflite model maker 训练对象检测器的数据集。

根据docs我可以加

one row for each image with no bounding box (such as row 4 below).

 TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,,
 TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,,
 UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3
 TEST,gs://folder/im3.png,,,,,,,,,

这样做时,我收到一个 ValueError“无法将字符串转换为浮点数”,这是由于试图在以下 line 中将 None 对象转换为浮点数造成的:

    xmin, ymin = float(line[3]) * width, float(line[4]) * height

有谁知道如何在没有边界框的情况下正确添加此类图像?这些空图像对训练模型有帮助吗?

Model Maker 不支持没有任何边界框的图像。训练中使用的图像也不会。因此请避免此类数据。