Simplify augmentations (#93)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
249dfbdc05
commit
ae05d44877
5 changed files with 36 additions and 68 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from itertools import repeat
|
||||
from multiprocessing.pool import Pool
|
||||
from pathlib import Path
|
||||
from typing import OrderedDict
|
||||
|
||||
import torchvision
|
||||
from tqdm import tqdm
|
||||
|
|
@ -126,7 +125,7 @@ class YOLODataset(BaseDataset):
|
|||
def build_transforms(self, hyp=None):
|
||||
if self.augment:
|
||||
mosaic = self.augment and not self.rect
|
||||
transforms = mosaic_transforms(self.imgsz, hyp) if mosaic else affine_transforms(self.imgsz, hyp)
|
||||
transforms = mosaic_transforms(self, self.imgsz, hyp) if mosaic else affine_transforms(self.imgsz, hyp)
|
||||
else:
|
||||
transforms = Compose([LetterBox(new_shape=(self.imgsz, self.imgsz))])
|
||||
transforms.append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue