소스 검색

--rect test bug fix

5.0
Glenn Jocher 4 년 전
부모
커밋
6649770001
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      test.py
  2. +1
    -0
      utils/datasets.py

+ 1
- 1
test.py 파일 보기

@@ -59,7 +59,7 @@ def test(data,
_ = model(img.half() if half else img) if device.type != 'cpu' else None # run once
path = data['test'] if opt.task == 'test' else data['val'] # path to val/test images
dataloader = create_dataloader(path, imgsz, batch_size, model.stride.max(), opt,
hyp=None, augment=False, cache=False, pad=0.5, rect=False)[0]
hyp=None, augment=False, cache=False, pad=0.5, rect=True)[0]

seen = 0
names = model.names if hasattr(model, 'names') else model.module.names

+ 1
- 0
utils/datasets.py 파일 보기

@@ -343,6 +343,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
irect = ar.argsort()
self.img_files = [self.img_files[i] for i in irect]
self.label_files = [self.label_files[i] for i in irect]
self.labels = [self.labels[i] for i in irect]
self.shapes = s[irect] # wh
ar = ar[irect]


Loading…
취소
저장