Skip to content

Commit

Permalink
Update mapillary_resize.py
Browse files Browse the repository at this point in the history
  • Loading branch information
w1oves authored May 29, 2024
1 parent f3448bb commit d7e841f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/convert_datasets/mapillary_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import os.path as osp

import mmcv
import mmengine
from PIL import Image


Expand Down Expand Up @@ -41,8 +41,8 @@ def parse_args():

def main():
args = parse_args()
mmcv.mkdir_or_exist(args.dst_image_folder)
mmcv.mkdir_or_exist(args.dst_label_folder)
mmengine.mkdir_or_exist(args.dst_image_folder)
mmengine.mkdir_or_exist(args.dst_label_folder)
imgs = []
for filename in mmcv.scandir(args.image_folder, suffix=".jpg"):
id = osp.splitext(filename)[0]
Expand All @@ -58,9 +58,9 @@ def main():
for id in imgs
]
if args.nproc > 1:
mmcv.track_parallel_progress(resize_half, tasks, args.nproc)
mmengine.track_parallel_progress(resize_half, tasks, args.nproc)
else:
mmcv.track_progress(resize_half, tasks)
mmengine.track_progress(resize_half, tasks)


if __name__ == "__main__":
Expand Down

0 comments on commit d7e841f

Please sign in to comment.