Skip to content

Commit

Permalink
imap bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Nov 7, 2020
1 parent 194f168 commit d3e7778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def img2label_paths(img_paths):
if cache_images:
gb = 0 # Gigabytes of cached images
self.img_hw0, self.img_hw = [None] * n, [None] * n
results = ThreadPool(8).imap_unordered(lambda x: load_image(*x), zip(repeat(self), range(n))) # 8 threads
results = ThreadPool(8).imap(lambda x: load_image(*x), zip(repeat(self), range(n))) # 8 threads
pbar = tqdm(enumerate(results), total=n)
for i, x in pbar:
self.imgs[i], self.img_hw0[i], self.img_hw[i] = x # img, hw_original, hw_resized = load_image(self, i)
Expand Down

0 comments on commit d3e7778

Please sign in to comment.