<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/04_annotation_2d.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/04_annotation_2d.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/04_annotation_2d.ipynb" download>
            <img src="https://cdn.voxel51.com/cloud-icon-256px.png"> &nbsp; Download notebook
        </a>
    </td>
</table>

# Step 4: 2D Annotation + QA

Now we annotate the selected batch. This step covers:

1. Setting up a consistent annotation schema (KITTI classes)
2. Annotating 2D detections on the **left camera slice**
3. QA checks before moving to 3D annotation

> **Time commitment:** Plan 1-2 minutes per scene for careful annotation. Start with 10-20 scenes to get the workflow, then continue or use the fast-forward option.

## Define Your Schema (KITTI Classes)

Before labeling, define the rules. This prevents class drift and maintains consistency.

We use the standard KITTI classes for autonomous driving.

## Annotate 2D Detections in the App

**This is the real labeling step.** Open the App and annotate the left camera images.

### Setup (one time)

1. Launch the App with your batch
2. Click a sample to open the modal
3. **Select the \`\`left\`\` slice** from the slice dropdown
4. Click the **Annotate** tab (pencil icon)
5. Click **Schema** -> **New Field** -> name it `human_detections`
6. Set type to **Detections** and add the KITTI classes above

### For each scene

1. Ensure you’re on the **left** slice
2. Review the image
3. Click **Detection** button (square icon)
4. Draw boxes around all vehicles, pedestrians, cyclists
5. Assign the correct KITTI class
6. Move to the next scene

### Labeling Guidelines

- **Car**: Sedans, SUVs, hatchbacks
- **Van**: Minivans, cargo vans
- **Truck**: Pickup trucks, semi-trucks
- **Pedestrian**: Standing or walking people
- **Person_sitting**: Seated people (benches, ground)
- **Cyclist**: Person on bicycle
- **Tram**: Streetcars, light rail
- **Misc**: Ambiguous or other vehicles

### Stop here and annotate samples

Take 15-30 minutes to label some scenes. This is the core skill.

When you’re done (or want to fast-forward), continue below.

---

## Fast-Forward Option

If you want to proceed without labeling everything manually, set `FAST_FORWARD = True` below. This copies `ground_truth` labels to `human_detections` to simulate completed annotation.

> **Note:** In real projects, there’s no shortcut. Label quality determines model quality.

## Mark Annotated Samples

**Important:** We only mark samples as “annotated” if they actually have labels.

## QA Checks

Before moving to 3D annotation, verify 2D label quality.

## Summary

You annotated 2D detections on the left camera slice:

- Defined KITTI schema for consistency
- Labeled samples in the App (or fast-forwarded)
- **Only samples with actual labels** were marked as annotated
- Ran QA checks: coverage, class distribution, schema compliance

**Artifacts:**

- `human_detections` field with 2D bounding boxes
- `annotated_2d:v0` tag on left camera samples with labels
- `annotated:v0` tag on all slices of annotated groups

**Next:** Step 5 - 3D Annotation (cuboids on point clouds)
