DataGym.ai
  • DataGym.ai
  • Getting Started
  • Project
    • What is a project?
    • Create a new project
    • Update a project
    • Delete a project
    • Connect a dataset
    • Export data
    • Import Data
  • Dataset
    • What is a dataset?
    • Create a new dataset
    • Update a dataset
    • Connect with AWS S3
    • Delete a dataset
    • Manage images
      • Upload to DataGym.ai
      • Add public links
      • Synchronize with AWS S3
    • Connect to a project
    • Use the review mode
  • Label configuration
    • What is a label configuration?
    • Configuration entry
    • Entry types
    • Creating an entry
    • Editing an entry
    • Duplicating an entry
  • Label mode
    • What is the label mode?
    • Entry-list
    • Value-list
    • Task control
    • Toolbar
    • Workspace
    • AI-assisted labeling
    • Video labeling
  • Tasks
    • What is a task?
    • Process a task
    • Manage Tasks
  • AI-Assistant
    • AI-assisted pre-labeling
    • Object Classes
  • API Token
    • API
    • Manage API Token
  • Account-Management
    • Account Settings
    • Organisation-Management
  • Python API
    • Getting Started
    • Projects
    • Labeled data
    • Datasets
    • Images
    • Label configuration
    • Uploading COCO
  • Changelog
Powered by GitBook
On this page
  • Export Labels
  • Fetch your labeled data from a Project:
  • Generate a download link to your data
  • Import Labels

Was this helpful?

  1. Python API

Labeled data

Access the labeled data of your DataGym Projects

PreviousProjectsNextDatasets

Last updated 4 years ago

Was this helpful?

Export Labels

Fetch your labeled data from a Project:

Wouldn't it be pretty convenient to load the data of our labeled images directly into our python project? In this example we fetch our Dummy Project by providing its name and download the labeled data into our python app. Therefore, we use the export_labels method of the Client that requires the Project ID.

dummy_project = client.get_project_by_name(project_name="Dummy_Project")

labeled_data = client.export_labels(project_id=dummy_project.id) 

export_labels returns the labels as a Python Dictionary that resembles the JSON format introduced in the section.

Generate a download link to your data

You can also generate a hyperlink to the JSON file if you want to download it with your browser or another programmatic solution.

exported_labels_url = client.export_labels_url(project_id=dummy_project.id)

print(exported_labels_url)
Output:
http://app.datagym.ai/api/v1/export/<PROJECT_ID>?token=<API_KEY>

Import Labels

You can not only export your labels but also import annotated image data into your DataGym.ai Project using our feature.

project = client.get_project_by_name("<project_name>")

client.import_label_data(project_id=project.id, label_data=label_data)

import_label_data returns a List of Errors if JSON is malformed or data is invalid

Visit our to learn how to to upload label predictions into DataGym.ai

Use the import_label_data method of the Client class to import labels. The method takes a Project ID and your pre-labeled image data as Dictionary. Visit our or to learn how to format your labels into a valid JSON format.

Export Data
Import Label
Jupyter Notebook on GitHub
Jupyter Notebook
API documentation