ultralytics 8.0.30 Docker, rect, data=*.zip updates (#832)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-02-06 21:57:10 +04:00
committed by GitHub
parent 09265b17d7
commit 64f247d692
17 changed files with 67 additions and 43 deletions

View File

@ -33,14 +33,14 @@ class DetectionTrainer(BaseTrainer):
augment=mode == "train",
cache=self.args.cache,
pad=0 if mode == "train" else 0.5,
rect=self.args.rect,
rect=self.args.rect or mode=="val",
rank=rank,
workers=self.args.workers,
close_mosaic=self.args.close_mosaic != 0,
prefix=colorstr(f'{mode}: '),
shuffle=mode == "train",
seed=self.args.seed)[0] if self.args.v5loader else \
build_dataloader(self.args, batch_size, img_path=dataset_path, stride=gs, rank=rank, mode=mode)[0]
build_dataloader(self.args, batch_size, img_path=dataset_path, stride=gs, rank=rank, mode=mode, rect=mode=="val")[0]
def preprocess_batch(self, batch):
batch["img"] = batch["img"].to(self.device, non_blocking=True).float() / 255