You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我也是类似的问题。我在运行video_demo.py时,只有第一帧预测正确后面都是nan。我怀疑是utils.load_weights(model, "./yolov3.weights")这一句的问题,于是把这一句放到了while True里,如代码所示,结果预测正确,但视频速度非常慢了,因为每次都要加载一次权重。然后我就按您所说的改成model(image_data)就可以了,但速度肯定没有model.predict(image_data)或model.predict_on_batch(image_data)快。我怀疑是tensorflow版本的问题,我是2.7.0,gtx1070。或许这就是个bug.不能用model.predict()进行循环操作。别人也有类似的问题。Successive prediction (loop) in keras model generate NaN values
把test.py里的
model.load_weights("checkpoint/yolov3_debris")
移动到
for num, line in enumerate(annotation_file):
循环内可以测试所有图片。
但这明显不是根本原因,不知道哪位大神知道原因?
The text was updated successfully, but these errors were encountered: