Skip to content

Commit

Permalink
fix loading error in folder format
Browse files Browse the repository at this point in the history
  • Loading branch information
guanjunwu committed Jan 22, 2024
1 parent c95c9e7 commit 4a961cb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
NormalizeImage(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
PrepareForNet(),
])

if os.path.isfile(args.img_path):
if args.img_path.endswith('txt'):
with open(args.img_path, 'r') as f:
Expand All @@ -66,8 +65,8 @@
filenames = [args.img_path]
else:
filenames = os.listdir(args.img_path)
filenames = [os.path.join(args.img_path, filename) for filename in filenames]
filenames.sort()
filenames = [os.path.join(args.img_path, filename) for filename in filenames]

for filename in tqdm(filenames):
raw_image = cv2.imread(filename)
Expand Down

0 comments on commit 4a961cb

Please sign in to comment.