Are you sure you want to delete this access key?
comments | description | keywords |
---|---|---|
true | Learn how to run YOLO11 on AzureML. Quickstart instructions for terminal and notebooks to harness Azure's cloud computing for efficient model training. | YOLO11, AzureML, machine learning, cloud computing, quickstart, terminal, notebooks, model training, Python SDK, AI, Ultralytics |
Azure is Microsoft's cloud computing platform, designed to help organizations move their workloads to the cloud from on-premises data centers. With the full spectrum of cloud services including those for computing, databases, analytics, machine learning, and networking, users can pick and choose from these services to develop and scale new applications, or run existing applications, in the public cloud.
Azure Machine Learning, commonly referred to as AzureML, is a fully managed cloud service that enables data scientists and developers to efficiently embed predictive analytics into their applications, helping organizations use massive data sets and bring all the benefits of the cloud to machine learning. AzureML offers a variety of services and capabilities aimed at making machine learning accessible, easy to use, and scalable. It provides capabilities like automated machine learning, drag-and-drop model training, as well as a robust Python SDK so that developers can make the most out of their machine learning models.
For users of YOLO (You Only Look Once), AzureML provides a robust, scalable, and efficient platform to both train and deploy machine learning models. Whether you are looking to run quick prototypes or scale up to handle more extensive data, AzureML's flexible and user-friendly environment offers various tools and services to fit your needs. You can leverage AzureML to:
In the subsequent sections, you will find a quickstart guide detailing how to run YOLO11 object detection models using AzureML, either from a compute terminal or a notebook.
Before you can get started, make sure you have access to an AzureML workspace. If you don't have one, you can create a new AzureML workspace by following Azure's official documentation. This workspace acts as a centralized place to manage all AzureML resources.
From your AzureML workspace, select Compute > Compute instances > New, select the instance with the resources you need.
Start your compute and open a Terminal:
Create your conda virtualenv with your favorite python version and install pip in it: Python 3.13.1 is having some issues with some dependencies in AzureML.
conda create --name yolo11env -y python=3.12
conda activate yolo11env
conda install pip -y
Install the required dependencies:
cd ultralytics
pip install -r requirements.txt
pip install ultralytics
pip install onnx
Predict:
yolo predict model=yolo11n.pt source='https://ultralytics.com/images/bus.jpg'
Train a detection model for 10 epochs with an initial learning_rate of 0.01:
yolo train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01
You can find more instructions to use the Ultralytics CLI here.
Open the compute Terminal.
From your compute terminal, you need to create a new ipykernel (with a specific python version - because Python 3.13.1 is having some issues with some dependencies in AzureML) that will be used by your notebook to manage your dependencies:
conda create --name yolo11env -y python=3.12
conda activate yolo11env
conda install pip -y
conda install ipykernel -y
python -m ipykernel install --user --name yolo11env --display-name "yolo11env"
Close your terminal and create a new notebook. From your Notebook, you can select the new kernel.
Then you can open a Notebook cell and install the required dependencies:
%%bash
source activate yolo11env
cd ultralytics
pip install -r requirements.txt
pip install ultralytics
pip install onnx
Note that we need to use the source activate yolo11env
for all the %%bash cells, to make sure that the %%bash cell uses environment we want.
Run some predictions using the Ultralytics CLI:
%%bash
source activate yolo11env
yolo predict model=yolo11n.pt source='https://ultralytics.com/images/bus.jpg'
Or with the Ultralytics Python interface, for example to train the model:
from ultralytics import YOLO
# Load a model
model = YOLO("yolo11n.pt") # load an official YOLO11n model
# Use the model
model.train(data="coco8.yaml", epochs=3) # train the model
metrics = model.val() # evaluate model performance on the validation set
results = model("https://ultralytics.com/images/bus.jpg") # predict on an image
path = model.export(format="onnx") # export the model to ONNX format
You can use either the Ultralytics CLI or Python interface for running YOLO11 tasks, as described in the terminal section above.
By following these steps, you should be able to get YOLO11 running quickly on AzureML for quick trials. For more advanced uses, you may refer to the full AzureML documentation linked at the beginning of this guide.
This guide serves as an introduction to get you up and running with YOLO11 on AzureML. However, it only scratches the surface of what AzureML can offer. To delve deeper and unlock the full potential of AzureML for your machine learning projects, consider exploring the following resources:
Running YOLO11 on AzureML for model training involves several steps:
Create a Compute Instance: From your AzureML workspace, navigate to Compute > Compute instances > New, and select the required instance.
Setup Environment: Start your compute instance, open a terminal, and create a conda environment, and don't forget to set your python version (python 3.13.1 is not supported yet) :
conda create --name yolo11env -y python=3.12
conda activate yolo11env
conda install pip -y
pip install ultralytics onnx
Run YOLO11 Tasks: Use the Ultralytics CLI to train your model:
yolo train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01
For more details, you can refer to the instructions to use the Ultralytics CLI.
AzureML provides a robust and efficient ecosystem for training YOLO11 models:
These advantages make AzureML an ideal platform for projects ranging from quick prototypes to large-scale deployments. For more tips, check out AzureML Jobs.
Troubleshooting common issues with YOLO11 on AzureML can involve the following steps:
requirements.txt
file for dependencies.For additional guidance, review our YOLO Common Issues documentation.
Yes, AzureML allows you to use both the Ultralytics CLI and the Python interface seamlessly:
CLI: Ideal for quick tasks and running standard scripts directly from the terminal.
yolo predict model=yolo11n.pt source='https://ultralytics.com/images/bus.jpg'
Python Interface: Useful for more complex tasks requiring custom coding and integration within notebooks.
from ultralytics import YOLO
model = YOLO("yolo11n.pt")
model.train(data="coco8.yaml", epochs=3)
For step-by-step instructions, refer to the CLI quickstart guide and the Python quickstart guide.
Ultralytics YOLO11 offers several unique advantages over competing object detection models:
To explore more about YOLO11's features, visit the Ultralytics YOLO page for detailed insights.
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?