ultralytics 8.0.209 fix P6 model validation (#6261)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Jie Li <32835610+jedi007@users.noreply.github.com>
Co-authored-by: Haruto Watahiki <43723360+WATA-Haru@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-11-14 00:54:30 +01:00 committed by GitHub
parent 87233ea17c
commit 9a5891444e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 95 additions and 92 deletions

View file

@ -12,7 +12,6 @@ from ultralytics.utils import LOGGER, ops
from ultralytics.utils.checks import check_requirements
from ultralytics.utils.metrics import ConfusionMatrix, DetMetrics, box_iou
from ultralytics.utils.plotting import output_to_target, plot_images
from ultralytics.utils.torch_utils import de_parallel
class DetectionValidator(BaseValidator):
@ -191,8 +190,7 @@ class DetectionValidator(BaseValidator):
mode (str): `train` mode or `val` mode, users are able to customize different augmentations for each mode.
batch (int, optional): Size of batches, this is for `rect`. Defaults to None.
"""
gs = max(int(de_parallel(self.model).stride if self.model else 0), 32)
return build_yolo_dataset(self.args, img_path, batch, self.data, mode=mode, stride=gs)
return build_yolo_dataset(self.args, img_path, batch, self.data, mode=mode, stride=self.stride)
def get_dataloader(self, dataset_path, batch_size):
"""Construct and return dataloader."""