Skip to content
Snippets Groups Projects
Commit c95f06a2 authored by 籍家荣's avatar 籍家荣
Browse files

I5PS6P bug fix

parent e728927e
No related branches found
No related tags found
No related merge requests found
......@@ -38,9 +38,10 @@ def read_ground_truth(gt_file, image_file):
index_list = []
num = 0
for name in names:
image_name = name.replace('.jpg', '')
index_list.append(image_name)
num += 1
if name.endswith('.jpg'):
image_name = name.replace('.jpg', '')
index_list.append(image_name)
num += 1
path = gt_file
names = os.listdir(path)
......
......@@ -248,8 +248,9 @@ def main():
names = os.listdir(args.images_path)
image_paths = []
for name in names:
image_name = name.replace('.jpg', '')
image_paths.append(image_name)
if name.endswith('.jpg'):
image_name = name.replace('.jpg', '')
image_paths.append(image_name)
num_images = len(image_paths)
print(f'done! Found {num_images} images')
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment