添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Introduction

Validation is a critical step in the machine learning pipeline, allowing you to assess the quality of your trained models. Val mode in Ultralytics YOLOv8 provides a robust suite of tools and metrics for evaluating the performance of your object detection models. This guide serves as a complete resource for understanding how to effectively use the Val mode to ensure that your models are both accurate and reliable.

Why Validate with Ultralytics YOLO?

Here's why using YOLOv8's Val mode is advantageous:

  • Precision: Get accurate metrics like mAP50, mAP75, and mAP50-95 to comprehensively evaluate your model.
  • Convenience: Utilize built-in features that remember training settings, simplifying the validation process.
  • Flexibility: Validate your model with the same or different datasets and image sizes.
  • Hyperparameter Tuning: Use validation metrics to fine-tune your model for better performance.
  • Key Features of Val Mode

    These are the notable functionalities offered by YOLOv8's Val mode:

  • Automated Settings: Models remember their training configurations for straightforward validation.
  • Multi-Metric Support: Evaluate your model based on a range of accuracy metrics.
  • CLI and Python API: Choose from command-line interface or Python API based on your preference for validation.
  • Data Compatibility: Works seamlessly with datasets used during the training phase as well as custom datasets.
  • YOLOv8 models automatically remember their training settings, so you can validate a model at the same image size and on the original dataset easily with just yolo val model=yolov8n.pt or model('yolov8n.pt').val()
  • Usage Examples

    Validate trained YOLOv8n model accuracy on the COCO128 dataset. No argument need to passed as the model retains it's training data and arguments as model attributes. See Arguments section below for a full list of export arguments.