<table class="fo-notebook-links" align="left">
    <td>
        <a target="_blank" href="https://colab.research.google.com/github/voxel51/fiftyone/blob/main/docs/source/getting_started/annotation/06_train_evaluate.ipynb">
            <img src="https://cdn.voxel51.com/colab-logo-256px.png"> &nbsp; Run in Google Colab
        </a>
    </td>
    <td>
        <a target="_blank" href="https://github.com/voxel51/fiftyone/blob/main/docs/source/getting_started/annotation/06_train_evaluate.ipynb">
            <img src="https://cdn.voxel51.com/github-logo-256px.png"> &nbsp; View source on GitHub
        </a>
    </td>
    <td>
        <a target="_blank" href="https://raw.githubusercontent.com/voxel51/fiftyone/main/docs/source/getting_started/annotation/06_train_evaluate.ipynb" download>
            <img src="https://cdn.voxel51.com/cloud-icon-256px.png"> &nbsp; Download notebook
        </a>
    </td>
</table>

# Step 6: Train + Evaluate

Train a 2D detector on your labeled data and evaluate it properly. Understanding **where** the model fails tells you what to label next.

> **Note:** We train on `human_detections` (2D labels from Step 4) using the **left camera slice**. For evaluation, we need labels on the val set too.

## Get Training Data

**Important:** We train on the **left camera slice** of annotated groups. Only samples with actual labels are included.

## Export for Training

Export the left camera images and labels in YOLO format.

## Train YOLOv8

## Run Inference on Validation

## Evaluate

## Analyze Failures

Understanding failures is more important than the mAP number.

In the App:

1. Filter by `failure:high_fn` to see where model missed objects
2. Filter by `failure:high_fp` to see where model hallucinated
3. Look for patterns: specific classes? distances? occlusions?

These patterns tell you what to label next.

## Summary

You trained and evaluated a 2D detector:

- Used **left camera slice** from annotated groups
- Exported in YOLO format
- Trained YOLOv8n for 10 epochs
- Evaluated with FiftyOne: mAP + per-sample FP/FN
- Tagged failure cases for next iteration

**Key insight:** The failure tags tell you what to label next.

**Artifacts:**

- `predictions` field with model outputs
- `eval_v0` evaluation results
- Failure tags: `failure:high_fn`, `failure:high_fp`
- `eval_v0_failures` saved view

**Next:** Step 7 - Iteration Loop
