YOLO v3模型没有边界框

时间:2020-05-12 09:50:09

标签: python tensorflow computer-vision yolo

我已经使用此https://github.com/AntonMu/TrainYourOwnYOLO实现了YOLO v3模型,并对该模型进行了训练,并损失了1.05,但是在测试过程中,尽管如果我给模型提供训练后的图像,它也无法预测标签和无法在其上绘制边框。

所以我开始调试并找到错误的根源:


 out_boxes, out_scores, out_classes = self.sess.run(
            [self.boxes, self.scores, self.classes],
            feed_dict={
                self.yolo_model.input: image_data,
                self.input_image_shape: [image.size[1], image.size[0]],
                K.learning_phase(): 0
            },
        )

 print("out_boxes",out_boxes)      #prints [ ]
 print("out_classes",out_classes)  # prints [ ]
 print("out_scores",out_scores)    # prints [ ]

where:

self.boxes= Tensor("concat_11:0", shape=(?, 4), dtype=float32)
self.scores=Tensor("concat_12:0", shape=(?,), dtype=float32)
self.classes=Tensor("concat_13:0", shape=(?,), dtype=int32)

我在168个班级上训练了YOLO v3模型,每个班级都有36张图像。

有人可以帮忙吗? self.boxes / self.scores / self.classes有问题吗? 如果他们没有问题,那么self.sess.run有什么问题?

1 个答案:

答案 0 :(得分:1)

我也遇到了类似的问题,用更多的时代来训练模型可以解决问题。 我不确定为什么YOLOv3不会以更少的no:of epochs来生成边界框