> ## Documentation Index
> Fetch the complete documentation index at: https://docs.labelbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import ground truth annotations into a project

> Learn how to import your ground truth data from internal or third-party tools into Labelbox.

This guide will walk you through the process of importing your existing ground truth annotations from other internal or third-party tools into Labelbox.

## What is ground truth?

In machine learning, "ground truth" refers to the data that we consider to be the "true" or accurate labels for a given dataset. This data is often created by human annotators and is used to train and evaluate machine learning models.

By importing your ground truth annotations into Labelbox, you can consolidate all of your labeled data in one place, creating a single source of truth for your machine learning projects. This is particularly useful when you are migrating from another labeling platform to Labelbox.

## How to import your ground truth annotations?

You can generate Python SDK code snippets directly from your project's "Import labels" tab to help you with the import process. These snippets will serve as a great starting point for the steps below.

1. **Import your data rows**: Before you can import your annotations, you need to have the corresponding data rows (the raw data you want to label, such as images, videos, or text) in Labelbox. If you haven't already, you'll need to [create a dataset](/docs/datasets-datarows) and import your data rows into the Catalog.
2. **Create or select an ontology**: An ontology (also known as a taxonomy) defines the set of classes and attributes that can be used to label your data. For example, an ontology for an image classification project might include classes like "cat," "dog," and "car." You'll need to either [create a new ontology](/docs/labelbox-ontology) or select an existing one that matches the annotations you want to import.
3. **Create a labeing project**: Your annotations need to be associated with a labeling project in Labelbox. If you don't already have a project set up with the correct ontology, you will need to [create a project](/docs/create-a-project).
4. **Send a batch of data rows to your project**: Now that your project and ontology are configured, you need to [send a batch of data rows](/docs/batches) to the project's labeling queue. This will be the specific set of data rows that you will be attaching your imported annotations to.
5. **Create the annotations payload**: This is where you'll prepare the annotations themselves for import. Each annotation in your payload needs to reference a specific annotation class from your ontology and a specific data row ID. Labelbox supports two formats for the annotation payload: **Python Annotation Types** and **NDJSON**. Go to the **Import labels** tab and select **Import ground truth**. There you will find a sample code snippet you can use to import your ground truth annotations.
6. **Import your annotation payload**: Once you have created your annotation payload, the final step is to submit the import job. After the job is complete, your ground truth annotations will appear in your project, and the corresponding data rows will be marked as "Done." Under **Import labels** → **Import ground truth**, copy the code snippet for **Import annotations payload**.

Check out these end-to-end developer guides to learn how to import ground truth annotations based on your data type.

<CardGroup>
  <Card title="Import image annotations" icon="image" horizontal href="/reference/import-image-annotations#example-import-pre-labels-or-ground-truths" />

  <Card title="Import video annotations" icon="video" horizontal href="/reference/import-video-annotations#example-import-pre-labels-or-ground-truths" />

  <Card title="Import text annotations" icon="file-lines" horizontal href="/reference/import-text-annotations#example-import-pre-labels-or-ground-truths" />

  <Card title="Import geospatial annotations" icon="map" horizontal href="/reference/import-geospatial-annotations#example-import-pre-labels-or-ground-truths" />

  <Card title="Import document annotations" icon="file-pdf" horizontal href="/reference/import-document-annotations#example-import-pre-labels-or-ground-truths" />

  <Card title="Import conversational text annotations" icon="message" horizontal href="/reference/import-conversational-text-annotations#example-import-pre-labels-or-ground-truths" />

  <Card title="Import audio annotations" icon="music" horizontal href="/reference/import-audio-annotations#example-import-pre-labels-or-ground-truths" />

  <Card title="Import HTML annotations" icon="code" horizontal href="/reference/import-html-annotations#example-import-pre-labels-or-ground-truths" />
</CardGroup>

## Best practices

* Before starting a new import job, ensure that there are no existing model-assisted labeling (MAL) annotations on the data rows. Duplicate import jobs can overwrite existing labels or cause unexpected behavior.
* The activity page in Labelbox will not show any changes until the entire import job is complete.
