Skip to main content
Apidly Cloud
Cookie policy

Analytics and ad cookies stay off unless you accept. Cookie policy

We would like to use Google Analytics and Microsoft Clarity to understand how the public pages are used, including page views and session recordings, and the Reddit Pixel to measure whether our ads on Reddit lead to visits and sign-ups. You choose here whether they are on. Rejecting changes nothing about how the site works.

Train a YOLO object detector on a cloud GPU

Teach YOLO to find your own objects in pictures: start the Ultralytics notebook on a rented GPU, train on your labelled images, save the model and stop paying.

Published November 27, 20266 min read

An object detector looks at a picture or a video frame and draws a box around each thing it knows, with a label: a pallet, a helmet, a weed, a damaged part. A model trained on everyday objects will not know your products or your site, so the usual route is to take a pretrained YOLO model and train it further on a few hundred of your own labelled pictures. That is a short job for a GPU and a slow one for a laptop. This guide shows how to start the Ultralytics YOLO notebook on a rented GPU, train on your dataset, check the result, copy the model home and stop paying.

When this is worth it

  • You have your own pictures of the objects you want to find, or you can take them.
  • Training on your computer is too slow or it has no suitable GPU. Training is the heavy step; running the finished model on a few pictures is light.
  • You retrain now and then, for example when a new object or camera is added. You pay by the second only while the server runs.

A licence note first

The Ultralytics software is licensed AGPL-3.0, and its authors sell a separate commercial licence. If you will use the trained model in a product you sell or a service you run for others, read the licence terms and decide before you start. This is not legal advice.

What you need

  • An Apidly account with some credit.
  • Labelled images. Each picture needs a text file next to it that lists the boxes in YOLO format: one line per object with the class number and the box centre, width and height, all as fractions of the picture size. Labelling tools can export this format. The Label Studio template is one you can run on Apidly for the labelling step, and it needs no GPU.
  • A few hundred pictures per class is a common starting point, with some pictures that contain none of your objects. More varied pictures beat more near-copies.
  • No SSH key is required. Add one if you want to copy files with scp.

Step 1: Choose the GPU

The YOLO template needs at least 4 GB of GPU memory (VRAM) and recommends 8 GB. Small models and small pictures train on a small card; larger models, larger pictures and bigger batches want more memory. The template does not run on RTX 50-series and other Blackwell GPUs, and Deploy marks those, so you cannot choose one by mistake.

Prices follow supply and change often. In our public price list on 27 November 2026 at 07:11 UTC, a single GTX 1070 (8 GB) was $0.094 per hour, an RTX 3060 (12 GB) $0.137 and an RTX 3090 (24 GB) $0.364, all available. Check live pricing before you plan a run.

Step 2: Start the server

  1. Open Deploy, sort by Price, low to high and filter by the GPU memory you want. Select Continue.
  2. Select Notebooks and coding above the template cards, then the YOLO object detection (Ultralytics) card, then Continue.
  3. Name the server, for example yolo-train, and keep the suggested disk size. Your pictures, the pretrained model and the results all live on it.
  4. On the review step check Per hour, keep the automatic stop under Automation (optional) on, and select Start my server.

The template installs Ultralytics on the first start, which the template says takes about two minutes. You are billed from the moment the server runs.

Step 3: Open JupyterLab and run the sample

  1. Open the server and select the Connect tab, then Open Jupyter.
  2. Open quickstart.ipynb in the yolo folder. It loads a small pretrained model, runs it on a sample picture and shows the boxes. The model is downloaded from its publisher the first time, so the server needs internet access.

If the sample picture shows boxes, the GPU and the software work and you can move on to your own data.

Step 4: Upload your dataset

Put your pictures and label files in a folder under /workspace/yolo, in the layout Ultralytics expects: an images folder and a labels folder, each split into train and val (the validation pictures are held back to measure the result). Then write a small data.yaml that names the folders and your classes:

path: /workspace/yolo/my-dataset
train: images/train
val: images/val
names:
  0: helmet
  1: vest

Upload a zip through the JupyterLab file browser and unzip it in a terminal, or copy it with scp as in Move data to and from a server. The Ultralytics documentation describes the dataset format in full; it belongs to that project, so check it if a detail has changed.

Step 5: Train a short run first

In a new notebook cell, start with a tiny test, so a mistake costs minutes and not hours:

from ultralytics import YOLO

model = YOLO("yolo11n.pt")  # small pretrained model
model.train(data="/workspace/yolo/my-dataset/data.yaml", epochs=3, imgsz=640)

Check that it finds your pictures and labels, that the memory is enough and that the numbers appear. If you run out of memory, lower batch or imgsz, or pick a larger GPU. When the test is healthy, train for real with more epochs; the training output shows how long each epoch takes on your GPU, so you can estimate the total yourself before you leave it running.

Ultralytics writes each run into a runs folder, with the best model so far as weights/best.pt. Keep a run in /workspace/yolo, since that folder is on the server disk.

Step 6: Check the result before you trust it

metrics = model.val()
results = model("/workspace/yolo/my-dataset/images/val/example.jpg")
results[0].show()

Look at pictures the model has not seen, not only at the numbers. Check for missed objects, for boxes on the wrong thing and for classes it mixes up. The usual fixes are more pictures of the failures, cleaner labels and a few more epochs. Change one thing at a time and keep notes, as in the fine-tuning checklist.

Step 7: Copy the model out

Download best.pt from the JupyterLab file browser, or copy it with scp. Replace PORT and HOST with the values on the Connect tab, which also has a ready command:

scp -P PORT root@HOST:/workspace/yolo/runs/detect/train/weights/best.pt ./

The run folder can have another number if you trained more than once; check the path in the notebook output. Open the file on your computer to make sure it copied fully before you destroy anything.

Control the cost

A server has two charges: compute while it runs, and the disk for as long as it exists. A made-up example, to show the arithmetic and not a measurement: a 2-hour session on an RTX 3060 at $0.137 per hour with the template's 60 GB disk at $0.000706 per GB per hour is about $0.27 for compute plus $0.08 for the disk, about $0.36 in total.

  • Stop when the model is copied. Stopping ends the compute charge; the disk is still billed.
  • Destroy when you are done. That ends every charge and deletes your dataset and results, so copy them first.
  • Add an automatic stop so a forgotten server does not run all night. See Automation.

How billing by the second works has more worked examples, and Control costs covers budgets and warnings.

Common problems

  • Out of memory. Lower batch or imgsz, or choose a card with more memory.
  • "No labels found" or zero objects. The label files must have the same name as their pictures and sit in the matching labels folder.
  • The notebook link does not open right after the start. The first start is still installing. Wait a minute and refresh.
  • Results vanished after a destroy. Anything only on the server is lost when you destroy it. Copy first.

Next steps

Run a notebook on a cloud GPU covers the notebook basics, and How much VRAM do you need? helps you size larger models. When you are ready, start a YOLO server.

Try what this guide shows

Start one of these templates on a rented GPU server. You see the price per hour before you start, and you pay by the second.

  • CustomOpens in your browser

    Label Studio (data labeling)

    Label images, text, audio and video to build training data, with an easy browser interface.

    Minimum GPU memory
    No minimum
    Default disk
    40 GB
  • NotebooksJupyter workspaceRecommended

    PyTorch + JupyterLab

    PyTorch and CUDA with JupyterLab, opened straight from your browser (JupyterLab is set up on the first start).

    Minimum GPU memory
    8 GB
    Default disk
    80 GB

Try it on a real GPU server

Create a free account and add a balance from $10. Servers are billed by the second, and the review step shows the price per hour before you request one.

Related guides