ultralytics 8.0.226 Validator Path and Tuner space (#6901)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Muhammad Rizwan Munawar <chr043416@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: DennisJ <106725464+DennisJcy@users.noreply.github.com> Co-authored-by: Kirill Ionkin <56236621+kirill-ionkin@users.noreply.github.com>
This commit is contained in:
parent
6e660dfaaf
commit
412eb57fca
12 changed files with 60 additions and 22 deletions
|
|
@ -64,7 +64,7 @@ import torch
|
|||
from ultralytics.cfg import get_cfg
|
||||
from ultralytics.data.dataset import YOLODataset
|
||||
from ultralytics.data.utils import check_det_dataset
|
||||
from ultralytics.nn.autobackend import check_class_names
|
||||
from ultralytics.nn.autobackend import check_class_names, default_class_names
|
||||
from ultralytics.nn.modules import C2f, Detect, RTDETRDecoder
|
||||
from ultralytics.nn.tasks import DetectionModel, SegmentationModel
|
||||
from ultralytics.utils import (ARM64, DEFAULT_CFG, LINUX, LOGGER, MACOS, ROOT, WINDOWS, __version__, callbacks,
|
||||
|
|
@ -172,6 +172,8 @@ class Exporter:
|
|||
self.device = select_device('cpu' if self.args.device is None else self.args.device)
|
||||
|
||||
# Checks
|
||||
if not hasattr(model, 'names'):
|
||||
model.names = default_class_names()
|
||||
model.names = check_class_names(model.names)
|
||||
if self.args.half and onnx and self.device.type == 'cpu':
|
||||
LOGGER.warning('WARNING ⚠️ half=True only compatible with GPU export, i.e. use device=0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue