mirror of
https://github.com/ultralytics/ultralytics.git
synced 2025-09-15 15:48:41 +08:00
Fix YOLOE prompt-free validation example in docs (#21745)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Laughing-q <1185102784@qq.com>
This commit is contained in:
parent
8fb9ef8c20
commit
ebb447c681
@ -448,10 +448,10 @@ Model validation on a dataset is streamlined as follows:
|
||||
from ultralytics import YOLOE
|
||||
|
||||
# Create a YOLOE model
|
||||
model = YOLOE("yoloe-11l-seg.pt") # or select yoloe-11s/m-seg.pt for different sizes
|
||||
model = YOLOE("yoloe-11l-seg-pf.pt") # or select yoloe-11s/m-seg-pf.pt for different sizes
|
||||
|
||||
# Conduct model validation on the COCO128-seg example dataset
|
||||
metrics = model.val(data="coco128-seg.yaml")
|
||||
metrics = model.val(data="coco128-seg.yaml", single_cls=True)
|
||||
```
|
||||
|
||||
### Export Usage
|
||||
|
||||
@ -181,7 +181,7 @@ class YOLOEDetectValidator(DetectionValidator):
|
||||
else:
|
||||
if refer_data is not None:
|
||||
assert load_vp, "Refer data is only used for visual prompt validation."
|
||||
self.device = select_device(self.args.device)
|
||||
self.device = select_device(self.args.device, verbose=False)
|
||||
|
||||
if isinstance(model, (str, Path)):
|
||||
from ultralytics.nn.tasks import attempt_load_weights
|
||||
|
||||
Loading…
Reference in New Issue
Block a user