Computer vision answers · Data Labeling
How do I add a new class to an existing computer vision model without losing my labels?
Without starting your dataset over from scratch.
Short answer
Add the new class to your existing Roboflow project for free, label it on the images you already have as well as new ones, then train a new model version. Your existing labels stay, and Auto Label can add the new class to labeled images without replacing them. Label the new class on every image where it appears, including images you labeled before, because an unlabeled object teaches the model that it is background.
Skip the setup. Describe your images.
Describe your images and what you need to find. The agent sets up labeling, training and deployment with you.
Key facts
- What you need
- Your labeled dataset, plus images that show the new class
- What you get
- A new model version that finds the old classes and the new one
- Image sources
- Your existing project, new uploads and Roboflow Universe
- Runs on
- Cloud API, or your own device or server running Docker

How to add a new class, step by step
Six steps from your current dataset to a model that knows one more class.
Connect Roboflow to your coding agent, ChatGPT or Codex
Upload images that show the new class to the same project
Add the new class to the images you already labeled
Label every object on the new images
Create a new dataset version and train
Check the new model finds every class
Pythonimport supervision as sv from collections import Counter from inference import get_model model = get_model("your-project/2") result = model.infer("test_image.jpg", confidence=0.4)[0] detections = sv.Detections.from_inference(result) print(Counter(detections.data["class_name"])) # Counter({'hard-hat': 5, 'vest': 4, 'gloves': 3})Rather not write code? Ask the Roboflow agent to set this up for you
Why 2 million engineers build on Roboflow
Label faster
Auto-label with SAM 3 or your own model, then fix the misses instead of drawing every box.
RF-DETR
Roboflow’s open-source real-time detection model, built for accuracy (opens in a new tab) on small objects.
Logic built in
Counting, zones, tracking and alerts are ready-made Workflow blocks, so there is less code to write.
Your model, your weights
Use your trained weights on every plan, including free, through the open-source Inference package.
Run it anywhere
Self-host on a workstation, Docker, an on-prem GPU or an edge device, or call the cloud API.