拉·塞·尔:这里的预测为单张预测,需要手动输入图片的名字,可以把while True一下的所有内容改为:
fi = open('VOCdevkit/VOC2007/ImageSets/Main/test.txt')
txt = fi.readlines()
im_names = 【】
for line in txt:
line = line.strip('\n')
line = ('VOCdevkit/VOC2007/JPEGImages/'+line+'.jpg')
im_names.append(line)
print(im_names)
fi.close()
for im_name in im_names:
image = Image.open(im_name)
r_image = frcnn.detect_image(image)
r_image.show()
frcnn.close_session()
进行批量测试
andyxu123:期待楼主讲解Mask RCNN,这可是two-stage的集大成者。
Gentle_Lee:F tensorflow/stream_executor/lib/statusor.cc:34] Attempting to fetch value instead of handling error Internal: failed to get device attribute 13 for device 0: CUDA_ERROR_UNKNOWN: unknown error 。up主好,我在运行train.py的时候出现了这个问题,弄了好久都不知道怎么解决