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 Carparts Segmentation Dataset is a curated collection of images and videos designed for computer vision applications, specifically focusing on segmentation tasks. This dataset provides a diverse set of visuals captured from multiple perspectives, offering valuable annotated examples for training and testing segmentation models.
Whether you're working on automotive research, developing AI solutions for vehicle maintenance, or exploring computer vision applications, the Carparts Segmentation Dataset serves as a valuable resource for enhancing the accuracy and efficiency of your projects using models like Ultralytics YOLO.
<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 data distribution within the Carparts Segmentation Dataset is organized as follows:
Carparts Segmentation finds applications in various domains including:
By accurately identifying and categorizing different vehicle components, carparts segmentation streamlines processes and contributes to increased efficiency and automation across these industries.
A YAML (Yet Another Markup Language) 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
```
The Carparts Segmentation dataset includes a diverse array of images and videos captured from various perspectives. Below are examples showcasing the data and its corresponding annotations:
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 specialized collection of images and videos for training computer vision models to perform segmentation on car parts. It includes diverse visuals with detailed annotations, suitable for automotive AI applications.
You can train an Ultralytics YOLO26 segmentation model using this dataset. Load a pretrained model (e.g., yolo26n-seg.pt) and initiate training using the provided Python or CLI examples, referencing the carparts-seg.yaml configuration file. Check the Training Guide for detailed instructions.
!!! example "Train Example Snippet"
=== "Python"
```python
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n-seg.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="carparts-seg.yaml", epochs=100, imgsz=640)
```
=== "CLI"
```bash
yolo segment train data=carparts-seg.yaml model=yolo26n-seg.pt epochs=100 imgsz=640
```
Carparts Segmentation is useful in:
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.