yolo val detect data=coco.yaml device=0
yolo val detect data=coco.yaml batch=1 device=0|cpu
Train YOLO11n on the COCO8 dataset for 100 epochs at image size 640. For a full list of available arguments see the Configuration page.
예
from ultralytics import YOLO
# Load a model
model = YOLO("yolo11n.yaml") # build a new model from YAML
model = YOLO("yolo11n.pt") # load a pretrained model (recommended for training)
model = YOLO("yolo11n.yaml").load("yolo11n.pt") # build from YAML and transfer weights
# Train the model
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
# Build a new model from YAML and start training from scratch
yolo detect train data=coco8.yaml model=yolo11n.yaml epochs=100 imgsz=640
# Start training from a pretrained *.pt model
yolo detect train data=coco8.yaml model=yolo11n.pt epochs=100 imgsz=640
# Build a new model from YAML, transfer pretrained weights to it and start training
yolo detect train data=coco8.yaml model=yolo11n.yaml pretrained=yolo11n.pt epochs=100 imgsz=640
YOLO 탐지 데이터 세트 형식은 데이터 세트 가이드에서 자세히 확인할 수 있습니다. 기존 데이터셋을 다른 형식(예: COCO 등)에서 YOLO 형식으로 변환하려면 JSON2YOLO 도구( Ultralytics)를 사용하세요.
Validate trained YOLO11n model accuracy on the COCO8 dataset. No arguments are needed as the model
교육 유지 data
및 인수를 모델 속성으로 사용합니다.
예
from ultralytics import YOLO
# Load a model
model = YOLO("yolo11n.pt") # load an official model
model = YOLO("path/to/best.pt") # load a custom model
# Validate the model
metrics = model.val() # no arguments needed, dataset and settings remembered
metrics.box.map # map50-95
metrics.box.map50 # map50
metrics.box.map75 # map75
metrics.box.maps # a list contains map50-95 of each category
Use a trained YOLO11n model to run predictions on images.
예
전체 보기 predict
모드 세부 정보에서 예측 페이지로 이동합니다.
Export a YOLO11n model to a different format like ONNX, CoreML, etc.
예
Available YOLO11 export formats are in the table below. You can export to any format using the format
인수, 즉 format='onnx'
또는 format='engine'
. 내보낸 모델에서 직접 예측하거나 유효성을 검사할 수 있습니다. yolo predict model=yolo11n.onnx
. 내보내기가 완료된 후 모델에 대한 사용 예가 표시됩니다.
형식 | format 인수 | 모델 | 메타데이터 | 인수 |
---|---|---|---|---|
PyTorch | - | yolo11n.pt | ✅ | - |
TorchScript | torchscript | yolo11n.torchscript | ✅ | imgsz , optimize , batch |
ONNX | onnx | yolo11n.onnx | ✅ | imgsz , half , dynamic , simplify , opset , batch |
OpenVINO | openvino | yolo11n_openvino_model/ | ✅ | imgsz , half , int8 , batch |
TensorRT | engine | yolo11n.engine | ✅ | imgsz , half , dynamic , simplify , workspace , int8 , batch |
CoreML | coreml | yolo11n.mlpackage | ✅ | imgsz , half , int8 , nms , batch |
TF SavedModel | saved_model | yolo11n_saved_model/ | ✅ | imgsz , keras , int8 , batch |
TF GraphDef | pb | yolo11n.pb | ❌ | imgsz , batch |
TF Lite | tflite | yolo11n.tflite | ✅ | imgsz , half , int8 , batch |
TF Edge TPU | edgetpu | yolo11n_edgetpu.tflite | ✅ | imgsz |
TF.js | tfjs | yolo11n_web_model/ | ✅ | imgsz , half , int8 , batch |
PaddlePaddle | paddle | yolo11n_paddle_model/ | ✅ | imgsz , batch |
NCNN | ncnn | yolo11n_ncnn_model/ | ✅ | imgsz , half , batch |
전체 보기 export
세부 정보에서 내보내기 페이지로 이동합니다.
Training a YOLO11 model on a custom dataset involves a few steps:
train
메서드 또는 Python 또는 yolo detect train
명령으로 CLI.예
자세한 구성 옵션은 구성 페이지를 참조하세요.
Ultralytics YOLO11 offers various pretrained models for object detection, segmentation, and pose estimation. These models are pretrained on the COCO dataset or ImageNet for classification tasks. Here are some of the available models:
자세한 목록과 성능 지표는 모델 섹션을 참조하세요.
To validate the accuracy of your trained YOLO11 model, you can use the .val()
메서드 또는 Python 또는 yolo detect val
CLI명령을 실행합니다. 그러면 mAP50-95, mAP50 등과 같은 메트릭이 제공됩니다.
예
자세한 인증 정보는 Val 페이지에서 확인하세요.
Ultralytics YOLO11 allows exporting models to various formats such as ONNX, TensorRT, CoreML, and more to ensure compatibility across different platforms and devices.
예
내보내기 페이지에서 지원되는 형식의 전체 목록과 지침을 확인하세요.
Ultralytics YOLO11 is designed to offer state-of-the-art performance for object detection, segmentation, and pose estimation. Here are some key advantages:
Explore our Blog for use cases and success stories showcasing YOLO11 in action.