docs/en/datasets/segment/carparts-seg.md
<a href="https://colab.research.google.com/github/ultralytics/notebooks/blob/main/notebooks/how-to-train-ultralytics-yolo-on-carparts-segmentation-dataset.ipynb" target="_blank"></a>
The Ultralytics Carparts Segmentation Dataset provides 3,833 annotated images across 23 car-part classes — including bumpers, doors, lights, mirrors, hood, and trunk — for training instance segmentation models on automotive computer vision tasks. Captured from multiple perspectives and annotated with pixel-level masks, it pairs directly with Ultralytics YOLO for use cases ranging from automotive quality control and auto repair to insurance-claim damage assessment and autonomous-vehicle perception.
<p align="center"> <iframe loading="lazy" width="720" height="405" src="https://www.youtube.com/embed/FvWl00sD4rc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen> </iframe><strong>Watch:</strong> How to Segment Carparts with Ultralytics Platform | Train, Deploy & Inference | Ultralytics YOLO26 🚀
</p>The Carparts Segmentation Dataset splits its 3,833 images as follows:
object class for parts outside those categories.Carparts Segmentation finds applications in various domains including:
The complete Carparts Segmentation Dataset can also be browsed and managed on Ultralytics Platform.
A YAML file defines the dataset configuration, including paths, class names, and other essential details. For the Carparts Segmentation dataset, the carparts-seg.yaml file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/carparts-seg.yaml. You can learn more about the YAML format at yaml.org.
!!! example "ultralytics/cfg/datasets/carparts-seg.yaml"
```yaml
--8<-- "ultralytics/cfg/datasets/carparts-seg.yaml"
```
To train an Ultralytics YOLO26 model on the Carparts Segmentation dataset for 100 epochs with an image size of 640, use the following code snippets. Refer to the model Training guide for a comprehensive list of available arguments and explore model training tips for best practices.
!!! example "Train Example"
=== "Python"
```python
from ultralytics import YOLO
# Load a pretrained segmentation model like YOLO26n-seg
model = YOLO("yolo26n-seg.pt") # load a pretrained model (recommended for training)
# Train the model on the Carparts Segmentation dataset
results = model.train(data="carparts-seg.yaml", epochs=100, imgsz=640)
# After training, you can validate the model's performance on the validation set
results = model.val()
# Or perform prediction on new images or videos
results = model.predict("path/to/your/image.jpg")
```
=== "CLI"
```bash
# Start training from a pretrained *.pt model using the Command Line Interface
# Specify the dataset config file, model, number of epochs, and image size
yolo segment train data=carparts-seg.yaml model=yolo26n-seg.pt epochs=100 imgsz=640
# Validate the trained model using the validation set
yolo segment val data=carparts-seg.yaml model=path/to/best.pt
# Predict using the trained model on a specific image source
yolo segment predict model=path/to/best.pt source=path/to/your/image.jpg
```
Below is an example image from the Carparts Segmentation Dataset with its object segmentation masks overlaid, showing how individual car parts are outlined and labeled:
The dataset spans varied locations, lighting conditions, and object densities, giving models trained on it exposure to the range of real-world scenes they'll need to generalize across.
If you utilize the Carparts Segmentation dataset in your research or development efforts, please cite the original source:
!!! quote ""
=== "BibTeX"
```bibtex
@misc{car-seg-un1pm_dataset,
title = { car-seg Dataset },
type = { Open Source Dataset },
author = { Gianmarco Russo },
url = { https://universe.roboflow.com/gianmarco-russo-vt9xr/car-seg-un1pm },
year = { 2023 },
month = { nov },
note = { visited on 2024-01-24 },
}
```
We acknowledge the contribution of Gianmarco Russo and the Roboflow team in creating and maintaining this valuable dataset for the computer vision community. For more datasets, visit the Ultralytics Datasets collection.
The Carparts Segmentation Dataset is a curated collection of 3,833 annotated images spanning 23 car-part classes — bumpers, doors, lights, mirrors, hood, trunk, and more — for training and evaluating instance segmentation models. It's built for automotive computer vision applications like quality control, auto repair, and damage assessment, and is used directly with Ultralytics YOLO26 via the carparts-seg.yaml configuration file.
The dataset totals 3,833 images — 3,156 for training, 401 for validation, and 276 for testing — across 23 classes: 22 named car-part categories plus a catch-all object class for parts outside them. The full archive downloads automatically as a ~133 MB .zip on first use.
Load a pretrained segmentation model (e.g., yolo26n-seg.pt) and train it with the carparts-seg.yaml configuration using the Python or CLI snippets in the Usage section above. See the Training guide for the full list of available arguments.
Carparts segmentation supports automotive quality control, auto repair, e-commerce cataloging, traffic monitoring, autonomous-vehicle perception, insurance damage assessment, recycling, and smart-city initiatives — see the Applications section above for details on each use case.
The dataset configuration file, carparts-seg.yaml, which contains details about the dataset paths and classes, is located in the Ultralytics GitHub repository: carparts-seg.yaml.
This dataset offers rich, annotated data crucial for developing accurate segmentation models for automotive applications. Its diversity helps improve model robustness and performance in real-world scenarios like automated vehicle inspection, enhancing safety systems, and supporting autonomous driving technology. Using high-quality, domain-specific datasets like this accelerates AI development.