Skip to content

Enhancing YOLO11 Experiment Tracking and Visualization with Weights & Biases

Object detection models like Ultralytics YOLO11 have become integral to many computer vision applications. However, training, evaluating, and deploying these complex models introduce several challenges. Tracking key training metrics, comparing model variants, analyzing model behavior, and detecting issues require significant instrumentation and experiment management.



Regarde : How to use Ultralytics YOLO11 with Weights and Biases

This guide showcases Ultralytics YOLO11 integration with Weights & Biases for enhanced experiment tracking, model-checkpointing, and visualization of model performance. It also includes instructions for setting up the integration, training, fine-tuning, and visualizing results using Weights & Biases' interactive features.

Weights & Biases

Weights & Biases Vue d'ensemble

Weights & Biases is a cutting-edge MLOps platform designed for tracking, visualizing, and managing machine learning experiments. It features automatic logging of training metrics for full experiment reproducibility, an interactive UI for streamlined data analysis, and efficient model management tools for deploying across various environments.

YOLO11 Training with Weights & Biases

You can use Weights & Biases to bring efficiency and automation to your YOLO11 training process.

Installation

Pour installer les paquets nécessaires, exécute :

Installation

# Install the required packages for Ultralytics YOLO and Weights & Biases
pip install -U ultralytics wandb

For detailed instructions and best practices related to the installation process, be sure to check our YOLO11 Installation guide. While installing the required packages for YOLO11, if you encounter any difficulties, consult our Common Issues guide for solutions and tips.

Configurer Weights & Biases

Après avoir installé les paquets nécessaires, l'étape suivante consiste à configurer ton environnement Weights & Biases . Cela comprend la création d'un compte Weights & Biases et l'obtention de la clé API nécessaire pour une connexion fluide entre ton environnement de développement et la plateforme W&B.

Commence par initialiser l'environnement Weights & Biases dans ton espace de travail. Tu peux le faire en exécutant la commande suivante et en suivant les instructions qui te sont données.

Configuration initiale du SDK

import wandb

# Initialize your Weights & Biases environment
wandb.login(key="<API_KEY>")
# Initialize your Weights & Biases environment
wandb login <API_KEY>

Va sur la page d'autorisation Weights & Biases pour créer et récupérer ta clé API. Utilise cette clé pour authentifier ton environnement auprès de W&B.

Usage: Training YOLO11 with Weights & Biases

Before diving into the usage instructions for YOLO11 model training with Weights & Biases, be sure to check out the range of YOLO11 models offered by Ultralytics. This will help you choose the most appropriate model for your project requirements.

Usage: Training YOLO11 with Weights & Biases

from ultralytics import YOLO

# Load a YOLO model
model = YOLO("yolo11n.pt")

# Train and Fine-Tune the Model
model.train(data="coco8.yaml", epochs=5, project="ultralytics", name="yolo11n")
# Train a YOLO11 model with Weights & Biases
yolo train data=coco8.yaml epochs=5 project=ultralytics name=yolo11n

W&B Arguments

Argument DĂ©faut Description
projet None Specifies the name of the project logged locally and in W&B. This way you can group multiple runs together.
name None The name of the training run. This determines the name used to create subfolders and the name used for W&B logging

Enable or Disable Weights & Biases

If you want to enable or disable Weights & Biases logging, you can use the wandb command. By default, Weights & Biases logging is enabled.

# Enable Weights & Biases logging
wandb enabled

# Disable Weights & Biases logging
wandb disabled

Comprendre les résultats

En exécutant l'extrait de code d'utilisation ci-dessus, tu peux t'attendre à obtenir les résultats clés suivants :

  • La mise en place d'une nouvelle manche avec son identifiant unique, indiquant le dĂ©but du processus de formation.
  • Un rĂ©sumĂ© concis de la structure du modèle, y compris le nombre de couches et de paramètres.
  • Regular updates on important metrics such as box loss, cls loss, dfl loss, precision, recall, and mAP scores during each training epoch.
  • At the end of training, detailed metrics including the model's inference speed, and overall accuracy metrics are displayed.
  • Liens vers le tableau de bord Weights & Biases pour une analyse et une visualisation approfondies du processus de formation, ainsi que des informations sur l'emplacement des fichiers journaux locaux.

Visualisation du tableau de bord Weights & Biases

After running the usage code snippet, you can access the Weights & Biases (W&B) dashboard through the provided link in the output. This dashboard offers a comprehensive view of your model's training process with YOLO11.

Principales caractéristiques du tableau de bord Weights & Biases

  • Suivi des mesures en temps rĂ©el: Observe les mesures telles que la perte, la prĂ©cision et les scores de validation au fur et Ă  mesure qu'elles Ă©voluent pendant la formation, offrant ainsi des informations immĂ©diates pour la mise au point du modèle. Vois comment les expĂ©riences sont suivies Ă  l'aide de Weights & Biases.

  • Hyperparameter Optimization: Weights & Biases aids in fine-tuning critical parameters such as learning rate, batch size, and more, enhancing the performance of YOLO11.

  • Analyse comparative: La plateforme permet de comparer cĂ´te Ă  cĂ´te diffĂ©rentes formations, ce qui est essentiel pour Ă©valuer l'impact de diverses configurations de modèles.

  • Visualisation des progrès de la formation: Les reprĂ©sentations graphiques des paramètres clĂ©s permettent de comprendre intuitivement les performances du modèle au fil des Ă©poques. DĂ©couvre comment Weights & Biases t'aide Ă  visualiser les rĂ©sultats de la validation.

  • Surveillance des ressources: Garde une trace de CPU, GPU, et de l'utilisation de la mĂ©moire pour optimiser l'efficacitĂ© du processus de formation.

  • Gestion des artefacts du modèle : Accède aux points de contrĂ´le des modèles et partage-les, ce qui facilite le dĂ©ploiement et la collaboration.

  • Visualisation des rĂ©sultats de l'infĂ©rence avec une superposition d'images: Visualise les rĂ©sultats de la prĂ©diction sur des images Ă  l'aide de superpositions interactives sur Weights & Biases, ce qui permet d'obtenir une vue claire et dĂ©taillĂ©e de la performance du modèle sur des donnĂ©es rĂ©elles. Pour obtenir des informations plus dĂ©taillĂ©es sur les capacitĂ©s de superposition d'images de Weights & Biases', consulte ce lien. Vois comment Weights & Biases' image overlays aide Ă  visualiser les infĂ©rences du modèle.

By using these features, you can effectively track, analyze, and optimize your YOLO11 model's training, ensuring the best possible performance and efficiency.

Résumé

This guide helped you explore the Ultralytics YOLO integration with Weights & Biases. It illustrates the ability of this integration to efficiently track and visualize model training and prediction results.

Pour plus de détails sur l'utilisation, visite Weights & Biases' documentation officielle.

N'oublie pas non plus de consulter la page du guide d'intégration deUltralytics , pour en savoir plus sur différentes intégrations passionnantes.

FAQ

How do I integrate Weights & Biases with Ultralytics YOLO11?

To integrate Weights & Biases with Ultralytics YOLO11:

  1. Installe les paquets nécessaires :
pip install -U ultralytics wandb
  1. Log in to your Weights & Biases account:
import wandb

wandb.login(key="<API_KEY>")
  1. Train your YOLO11 model with W&B logging enabled:
from ultralytics import YOLO

model = YOLO("yolo11n.pt")
model.train(data="coco8.yaml", epochs=5, project="ultralytics", name="yolo11n")

This will automatically log metrics, hyperparameters, and model artifacts to your W&B project.

What are the key features of Weights & Biases integration with YOLO11?

The key features include:

  • Real-time metrics tracking during training
  • Hyperparameter optimization tools
  • Comparative analysis of different training runs
  • Visualization of training progress through graphs
  • Resource monitoring (CPU, GPU, memory usage)
  • Model artifacts management and sharing
  • Viewing inference results with image overlays

These features help in tracking experiments, optimizing models, and collaborating more effectively on YOLO11 projects.

How can I view the Weights & Biases dashboard for my YOLO11 training?

After running your training script with W&B integration:

  1. A link to your W&B dashboard will be provided in the console output.
  2. Click on the link or go to wandb.ai and log in to your account.
  3. Navigate to your project to view detailed metrics, visualizations, and model performance data.

The dashboard offers insights into your model's training process, allowing you to analyze and improve your YOLO11 models effectively.

Can I disable Weights & Biases logging for YOLO11 training?

Yes, you can disable W&B logging using the following command:

wandb disabled

To re-enable logging, use:

wandb enabled

This allows you to control when you want to use W&B logging without modifying your training scripts.

How does Weights & Biases help in optimizing YOLO11 models?

Weights & Biases helps optimize YOLO11 models by:

  1. Providing detailed visualizations of training metrics
  2. Enabling easy comparison between different model versions
  3. Offering tools for hyperparameter tuning
  4. Allowing for collaborative analysis of model performance
  5. Facilitating easy sharing of model artifacts and results

These features help researchers and developers iterate faster and make data-driven decisions to improve their YOLO11 models.


📅C réé il y a 9 mois ✏️ Mis à jour il y a 3 jours

Commentaires