> For the complete documentation index, see [llms.txt](https://guide.petoi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.petoi.com/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-1-choose-or-make-your-own-dataset/creating-custom-training-datasets.md).

# Creating custom training datasets

Create, label, and export an object-detection dataset with Label Studio.

{% hint style="success" %}
💡 Reminder: All code and scripts for this project are executed in the cloud. Open the [Google Colab Notebook](https://colab.research.google.com/drive/1OPTGxdn03eJU69hFMEPp0hzXAPZfEDNZ?usp=sharing) and select Runtime > Run all to execute the setup.
{% endhint %}

{% hint style="info" %}
A good dataset is like the perfect textbook for teaching a computer how the real world works. It needs to show a wide variety of examples, including messy and everyday situations, so the computer will not get confused when things are not perfect. Everything inside it must be organized and named exactly the same way, with no broken files or careless mistakes. It also needs to have a fair and equal amount of every topic you want the computer to learn, rather than just showing one thing over and over again. Most importantly, the information has to perfectly match the specific job you want the computer to do, so it learns exactly what it needs to succeed.
{% endhint %}

Build a labeled dataset for object detection or image segmentation. Use known examples to train a model for your use case.

## Set up your workspace

Install and launch Label Studio before creating your dataset.

{% hint style="info" %}

#### Choose your platform

<a href="/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-1-choose-or-make-your-own-dataset/creating-custom-training-datasets/mac.md" class="button primary" data-icon="apple">Set up macOS</a><br>

<a href="/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-1-choose-or-make-your-own-dataset/creating-custom-training-datasets/windows.md" class="button secondary" data-icon="windows">Set up Windows</a><br>

Continue when Label Studio opens in your browser.
{% endhint %}

{% stepper %}
{% step %}

## Create a project

Open Label Studio and create a project. Give it a clear name.

Select **Data Import** and upload your images. You can use your own photos or a public dataset.

![Label Studio data import screen](https://content.gitbook.com/content/XLpFdG7mubqEHWylLK3w/blobs/dfL0hQo3Je27qUgm8D12/image)

{% hint style="info" %}
Import images in batches of 100 when working with larger datasets.
{% endhint %}
{% endstep %}

{% step %}

## Configure labels

Open **Labeling Setup**. Choose **Object Detection with Bounding Boxes**, then save the configuration.

![Label Studio labeling template selection](https://content.gitbook.com/content/XLpFdG7mubqEHWylLK3w/blobs/3D4PKWBlEiQyLeciku2m/image)

Add a label for each object class. Save your changes when finished.

![Label Studio label configuration](https://content.gitbook.com/content/XLpFdG7mubqEHWylLK3w/blobs/jJy6EocyCw2IU0Y0ZIWT/image)
{% endstep %}

{% step %}

## Label your images

Open the project and select the first image. Draw a bounding box around each target object.

Use each class shortcut to select its label. For example, press `1` for lavender, `2` for pink, and `3` for purple.

Select a region to resize or delete its bounding box.

![](https://content.gitbook.com/content/XLpFdG7mubqEHWylLK3w/blobs/gcesyQnL1ncAorozDDEn/image)

Submit the label before moving to the next image.
{% endstep %}

{% step %}

## Export the dataset

Open the project export options and select an output format.

![Label Studio export options](https://content.gitbook.com/content/XLpFdG7mubqEHWylLK3w/blobs/nVgVTKRDk5vVfls9Nghv/image)

Use **YOLO with Images** to include uploaded images in the export.

![](https://content.gitbook.com/content/XLpFdG7mubqEHWylLK3w/blobs/G0CPhDwbfl7cjHdCRTBz/image)
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guide.petoi.com/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-1-choose-or-make-your-own-dataset/creating-custom-training-datasets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
