> 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.md).

# Custom Petoi vision model

Use this guide to build, train, and deploy a custom Petoi vision model.

### Getting started

* [Object detection](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/getting-started/object-detection.md) - Explain the basics of object detection.
* [How We Teach a Robot to "See"](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/getting-started/how-we-teach-a-robot-to-see.md) — Explains datasets, models, SenseCraft, and the end-to-end vision workflow.

### Steps on how to get started

* **Step 1:** [**Choose or make your own dataset**](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started.md#step-1-choose-or-make-your-own-dataset)
  * [Choose a pre-labeled dataset](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-1-choose-or-make-your-own-dataset/choose-a-pre-labeled-dataset.md) - Finds, verifies, and downloads pre-labeled object-detection datasets using Roboflow or Kaggle.
  * [Creating custom training datasets](/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) — Creates, labels, and exports object-detection datasets with Label Studio.
    * [Mac](/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) — Installs and starts Label Studio on macOS with Homebrew.
    * [Windows](/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) — Installs and starts Label Studio on Windows.
* **Step 2:** [**Train Model**](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started.md#step-2-train-model)
  * [Train model on Google Colab](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-2-train-model/train-model-on-google-colab.md) - Loads datasets, trains models, and exports quantized files using Google Colab.
  * [Training models on the cloud](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-2-train-model/train-model-on-the-cloud.md) — Train YOLOv8 in Google Colab. Exports and Vela optimize a TFLite model.
  * [Train models locally on Windows](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started/step-2-train-model/train-model-locally-on-windows-advanced.md) — Connects Colab to a local Jupyter runtime and GPU. Keeps training files on Windows.
* **Step 3:** [**Deploy the model**](/extensible-modules/petoi-ai-vision-module/custom-petoi-vision-model/steps-on-how-to-get-started.md#step-3-deploy-model-to-sensecraft)
  * Deploy model to SenseCraft — Uploads a trained model to SenseCraft and tests it with the Petoi camera.

### Workflow

This guide covers the complete workflow:

{% stepper %}
{% step %}

## Create a dataset

Collect images and draw bounding boxes around each target object.
{% endstep %}

{% step %}

## Train a model

Train a YOLOv8 object-detection model locally or in Google Colab.
{% endstep %}

{% step %}

## Optimize the model

Export the model to quantized TFLite and optimize it with Vela.
{% endstep %}

{% step %}

## Deploy the model

Upload the model to Grove Vision AI V2 through SenseCraft.
{% endstep %}

{% step %}

## Connect the robot

Use detection results to trigger Petoi robot actions
{% 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.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.
