Skip to content

Commit 69b56b2

Browse files
committed
perf(dataset): 修改原图和标注文件的读取路径
1 parent fbffc9a commit 69b56b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

py/lib/models/location_dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def __init__(self, root_dir, cate_list, transform=None, S=7, B=2, C=20):
3939
xml_path_list = []
4040
for name in cate_list:
4141
for i in range(1, 61):
42-
jpeg_path_list.append(os.path.join(root_dir, '%s_%d.jpg' % (name, i)))
43-
xml_path_list.append(os.path.join(root_dir, '%s_%d.xml' % (name, i)))
42+
jpeg_path_list.append(os.path.join(root_dir, 'imgs', '%s_%d.jpg' % (name, i)))
43+
xml_path_list.append(os.path.join(root_dir, 'annotations', '%s_%d.xml' % (name, i)))
4444
self.jpeg_path_list = jpeg_path_list
4545
self.xml_path_list = xml_path_list
4646

@@ -128,7 +128,7 @@ def __len__(self):
128128

129129

130130
if __name__ == '__main__':
131-
root_dir = '../../data/training_images/'
131+
root_dir = '../../data/location_dataset/'
132132
transform = transforms.Compose([
133133
transforms.ToPILImage(),
134134
transforms.Resize((448, 448)),

0 commit comments

Comments
 (0)