@@ -522,7 +522,7 @@ class LoadImagesAndLabels(Dataset): | |||
self.im_hw0, self.im_hw = [None] * n, [None] * n | |||
fcn = self.cache_images_to_disk if cache_images == 'disk' else self.load_image | |||
results = ThreadPool(NUM_THREADS).imap(fcn, range(n)) | |||
pbar = tqdm(enumerate(results), total=n, bar_format=BAR_FORMAT) | |||
pbar = tqdm(enumerate(results), total=n, bar_format=BAR_FORMAT, disable=LOCAL_RANK > 0) | |||
for i, x in pbar: | |||
if cache_images == 'disk': | |||
gb += self.npy_files[i].stat().st_size |