diff --git a/utils/datasets.py b/utils/datasets.py index 4061af81..4c0e3b20 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -499,7 +499,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing @staticmethod def collate_fn(batch): - img, label, path, shapes = list(zip(*batch)) # transposed + img, label, path, shapes = zip(*batch) # transposed for i, l in enumerate(label): l[:, 0] = i # add target image index for build_targets() return torch.stack(img, 0), torch.cat(label, 0), path, shapes