Labelbox / labelbox-python

A data-centric AI Platform for Building & Using AI

Home Page:https://labelbox.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release Notes CI) Downloads Dependency Status Open Issues Changelog License: Apache 2.0 Twitter Follow LinkedIn Follow Supported Python Versions

Labelbox

Labelbox is a powerful data-centric AI platform that empowers enterprises to develop, optimize, and leverage AI to solve complex problems and drive innovation in their products and services.

With Labelbox, enterprises can easily curate and annotate data, generate high-quality human feedback data for computer vision and language models, evaluate and improve model performance, and automate tasks by seamlessly combining AI and human-centric workflows. The academic and research community also relies on Labelbox for cutting-edge AI research and experimentation.

Visit Labelbox for more information.

Table of Contents

Quick Start

Sign Up

If you haven't already, create a free account at Labelbox.

Generate an API key

Log into Labelbox and navigate to Account > API Keys to generate an API key.

Install

To install the SDK, run the following command.

pip install labelbox

If you'd like to install the SDK with enhanced functionality, which additional optional capabilities surrounding data processing, run the following command.

pip install "labelbox[data]"

Please note that if you prefer to build and install your own version of the SDK, it is important to be aware that only tagged commits have been thoroughly tested. Building from the head of develop branch carries some level of risk.

Validate Installation and API Key

After installing the SDK and getting an API Key, it's time to validate them both.

import labelbox as lb

client = lb.Client(API_KEY) # API_KEY = API Key generated from labelbox.com
dataset = client.create_dataset(name="Test Dataset")
data_rows = [{"row_data": "My First Data Row", "global_key": "first-data-row"}]
task = dataset.create_data_rows(data_rows)
task.wait_till_done()

You should be set! Running the snippet above should create a dataset called Test Dataset with its content being My First Data Row. You can log into Labelbox to verify this. If you have any issues please file a Github Issue or contact Labelbox Support directly. For more advanced examples and information on the SDK, see Documentation below.

Contribution Guidelines

We encourage anyone to contribute to this repository to help improve it. Please refer to Contributing Guide for detailed information on how to contribute. This guide also includes instructions for how to build and run the SDK locally.

Develop with AI assistance

Use the codebase as context for large language models

Using the GPT repository loader, we have created lbx_prompt.txt that contains data from all .py and .md files. The file has about 730k tokens. We recommend using Gemini 1.5 Pro with 1 million context length window.

Documentation

The SDK is well-documented to help developers get started quickly and use the SDK effectively. Here are links to that documentation:

Jupyter Notebooks

We have samples in the examples directory to help you get started with the SDK.

Make sure your notebook will use your source code:

  1. ipython profile create
  2. ipython locate - will show where the config file is. This is the config file used by the Jupyter server, since it runs via ipython
  3. Open the file (this should be ipython_config.py and it is usually located in ~/.ipython/profile_default) and add the following line of code:
c.InteractiveShellApp.exec_lines = [
  'import sys; sys.path.insert(0, "<labelbox-python root folder>")'
]
  1. Go to the root of your project and run jupyter notebook to start the server.

About

A data-centric AI Platform for Building & Using AI

https://labelbox.com/

License:Apache License 2.0


Languages

Language:Python 99.9%Language:Dockerfile 0.1%