Open alanxuefei opened 3 years ago
+1 do you solve it?
I met the same problems. @emigmo @alanxuefei @yuxng Have you used the 000001-box.txt files??
Original format doesn't have the box information https://github.com/yuxng/YCB_Video_toolbox
The *-meta.mat file in the YCB-Video dataset contains the following fields:
I solved it temporarily, you can refer to the code.
input_file = 'data/YCB_Video/data'
input_file = osp.join(input_file, '%04d/%06d-box.txt' % (seq_id, frame_id))
names = []
boxes = []
with open(input_file) as f:
while 1:
input_line = f.readline()
if not input_line:
break
if input_line[-1:] == '\n':
input_line = input_line[:-1]
name, b1, b2, b3, b4 = input_line.split(' ')
boxes.append([b1, b2, b3, b4])
names.append(name)
names = np.array(names)
boxes = np.array(boxes).astype(np.float)
# gt_box_blob[0, 1:] = gt['box'][j, :]
gt_box_blob[0, 1:] = boxes[names == self._classes_all[cls_index]][0]
After run
The following error shows
The reason is that the ground truth boxes are not stored in YCB_Video/data/0048/000001-meta.mat. The keys of 000001-meta.mat is listed as below.
Are boxes stored in 000001-box.txt?