mxnet-im2rec_tutorial icon indicating copy to clipboard operation
mxnet-im2rec_tutorial copied to clipboard

Encounter sample with no valid label

Open liferlisiqi opened this issue 6 years ago • 2 comments

你好,我按照你的方法制作了多目标检测的.rec和.idx文件,但是读取的时候出现 Encounter sample with no valid label 错误,能帮我看一下吗?多谢了 这是我生成.lst文件的程序 with open('dataset/dataset.lst', 'w+') as f: ----f.truncate() ----for i in range(len(labels)): --------lst = str(i) + '\t' + str(4) + '\t' + str(5) + '\t' + str(1360) + '\t' + str(800) + '\t' --------for label in labels[i]: ------------lst += str(label[4]) + '\t' + str(round(label[0]/1360, 4)) + '\t' + str(round(label[1]/800,4)) + '\t' ------------lst += str(round(label[2]/1360,4)) + '\t' +str(round(label[3]/800,4)) + '\t' --------lst += str(i).zfill(5) + '.jpg\n' --------f.write(lst)

liferlisiqi avatar May 15 '18 08:05 liferlisiqi

hello 你可以給我你的labels 的 sample嗎

leocvml avatar May 17 '18 04:05 leocvml

@leocvml 好的,labels如下形式,图片尺寸是1360x800 [[[774, 411, 815, 446, 11]], [[983, 388, 1024, 432, 40], [386, 494, 442, 552, 38], [973, 335, 1031, 390, 13]], [[892, 476, 1006, 592, 39]], ,,,,,,]

在.lst文件中如下形式 0 4 5 1360 800 11 0.5691 0.5138 0.5993 0.5575 00000.jpg 1 4 5 1360 800 40 0.7228 0.485 0.7529 0.54 38 0.2838 0.6175 0.325 0.69 13 0.7154 0.4188 0.7581 0.4875 00001.jpg 2 4 5 1360 800 39 0.6559 0.595 0.7397 0.74 00002.jpg ................ 以‘\t’隔开,多谢了

liferlisiqi avatar May 17 '18 09:05 liferlisiqi