Clean validator (#144)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Laughing
2023-01-05 21:14:01 +08:00
committed by GitHub
parent 46cb657b64
commit 19334ebb16
9 changed files with 88 additions and 74 deletions

View File

@ -895,7 +895,7 @@ class LoadImagesAndLabels(Dataset):
batch_idx, cls, bboxes = torch.cat(label, 0).split((1, 1, 4), dim=1)
return {
'ori_shape': tuple((x[0] if x else None) for x in shapes),
'resized_shape': tuple(tuple(x.shape[1:]) for x in im),
'ratio_pad': tuple((x[1] if x else None) for x in shapes),
'im_file': path,
'img': torch.stack(im, 0),
'cls': cls,