Skip to content

Examples #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5accbec
added mal subclass example
Mar 25, 2021
ca1130e
Merge branch 'ms/bug-fix' of https://github.com/Labelbox/labelbox-pyt…
Mar 25, 2021
2f74fe2
added deps for colab
Mar 29, 2021
ab0ef82
minor notebook cleanup
Mar 29, 2021
06c12b5
added mal intro notebook
Mar 29, 2021
df1c1ba
easier fetch bulk import ndjson
Mar 29, 2021
6c16ee5
added tests and cache for ndjson file fetching
Mar 29, 2021
2cd9a4e
more test coverage
Mar 29, 2021
8169d0a
merge ms/bulk-export-status
Mar 29, 2021
8c1ca40
updated ndjson fetching to include latest helper functions
Mar 29, 2021
8e2b4cc
added table describing bulk import errors to sphinx docs
Mar 29, 2021
01239f6
bulk_import_uploads errors and statuses can't be None
Mar 29, 2021
766dbb1
Merge branch 'ms/bulk-export-status' of https://github.com/Labelbox/l…
Mar 29, 2021
7ec6f9e
format and cleanup notebooks
Mar 29, 2021
a76f0b6
credential management
Mar 30, 2021
4a6e044
minor bugs
Mar 30, 2021
1a97a11
webhook tested in colab
Mar 30, 2021
5fe2890
add colab to readme
Mar 30, 2021
62cee9f
format readme
Mar 30, 2021
fce29c0
mal basics
Mar 30, 2021
88a2b34
clean up readme
Mar 30, 2021
80d42fb
Update README.md
Mar 30, 2021
ac7d6bb
Add TOC and beak out authentication section
Mar 30, 2021
9292a17
yapf
Mar 30, 2021
b187d96
Merge branch 'examples' of https://github.com/Labelbox/labelbox-pytho…
Mar 30, 2021
f27ed21
formatted, added table to readme, small style changes
Mar 30, 2021
223384d
small README update
Mar 30, 2021
b1c2457
yapf
Mar 30, 2021
287ddbe
unflatten notebooks
Mar 30, 2021
94ff9c3
yapf
Mar 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
# Labelbox Python SDK

Labelbox is the enterprise-grade training data solution with fast AI enabled labeling tools, labeling automation, human workforce, data management, a powerful API for integration & SDK for extensibility. Visit http://labelbox.com/ for more information.
Labelbox is the enterprise-grade training data solution with fast AI enabled labeling tools, labeling automation, human workforce, data management, a powerful API for integration & SDK for extensibility. Visit [Labelbox](http://labelbox.com/) for more information.

The Labelbox Python API offers a simple, user-friendly way to interact with the Labelbox back-end.

## Table of Contents

* [Requirements](#requirements)
* [Installation](#installation)
* [Authentication](#authentication)
* [Documentation](#documentation)
* [Contribution](#contribution)
* [Testing](#testing)

## Requirements

* Use Python 3.6, 3.7 or 3.8.
* Create an account by visiting http://app.labelbox.com/.
* [Generate an API key](https://labelbox.com/docs/api/getting-started#create_api_key).
* Use Python 3.6, 3.7 or 3.8
* [Create an account](http://app.labelbox.com/)
* [Generate an API key](https://labelbox.com/docs/api/getting-started#create_api_key)

## Installation & authentication
## Installation

0. Prerequisite: Install pip
Prerequisite: Install pip

`pip` is a package manager for Python. **On macOS**, you can set it up to use the default python3 install via -
```
Expand All @@ -26,12 +35,15 @@ If the installation completes with a warning re: pip not being in your path, you
export PATH=/Users/<your-macOS-username>/Library/Python/3.8/bin:$PATH
```

1. Install using Python's Pip manager.
Install using Python's Pip manager.
```
pip install labelbox
```

2. Pass your API key as an environment variable. Then, import and initialize the API Client.
## Authentication

Labelbox uses API keys to validate requests. You can create and manage API keys on [Labelbox](https://app.labelbox.com/account/api-keys). Pass your API key as an environment variable. Then, import and initialize the API Client.

```
user@machine:~$ export LABELBOX_API_KEY="<your api key here>"
user@machine:~$ python3
Expand All @@ -44,7 +56,7 @@ client = Client()

[Visit our docs](https://labelbox.com/docs/python-api) to learn how to [create a project](https://labelbox.com/docs/python-api/create-first-project), read through some helpful user guides, and view our [API reference](https://labelbox.com/docs/python-api/api-reference).

## Repo Organization and Contribution
## Contribution
Please consult `CONTRIB.md`

## Testing
Expand Down
65 changes: 43 additions & 22 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,47 @@
## Labelbox SDK Examples

* Learn how to use the SDK by following along
* Run in google colab, view the notebooks on github, or clone the repo and run locally

Structure:

1. basics
* [Fundamentals](basics/basics.ipynb)
* CRUD
* [Data rows](basics/data_rows.ipynb)
* [Datasets](basics/datasets.ipynb)
* [Labels](basics/labels.ipynb)
* [Ontologies](basics/ontologies.ipynb)
* [Projects](basics/projects.ipynb)
2. label_export
* [Image annotation export](label_export/images.ipynb)
* [Text annotation export](label_export/text.ipynb)
* [Video annotation export](label_export/video.ipynb)
3. model_assisted_labeling
* [Image mal example](model_assisted_labeling/image_mal.ipynb)
* [Named entity recognition mal example](model_assisted_labeling/ner_mal.ipynb)
* [Debugging mal](model_assisted_labeling/debugging_mal.ipynb)
4. project_configuration
* [Project setup](project_configuration/project_setup.ipynb)
* [Queue management](project_configuration/queue_management.ipynb)
* [Webhooks](project_configuration/webhooks.ipynb)

------

## [Basics](basics)

| Notebook | Github | Google Colab |
| --------------------------- | --------------------------------- | ------------ |
| Fundamentals | [Github](basics/basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/basics/basics.ipynb) |
| Data Rows | [Github](basics/data_rows.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/basics/data_rows.ipynb) |
| Datasets | [Github](basics/datasets.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/basics/datasets.ipynb) |
| Labels | [Github](basics/labels.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/basics/labels.ipynb) |
| Ontologies | [Github](basics/ontologies.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/basics/ontologies.ipynb) |
| Projects | [Github](basics/projects.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/basics/projects.ipynb) |
------

## [Label Export](label_export)

| Notebook | Github | Google Colab |
| --------------------------- | --------------------------------- | ------------ |
| Image Annotation Export | [Github](label_export/images.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/label_export/images.ipynb) |
| Text Annotation Export | [Github](label_export/text.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/label_export/text.ipynb) |
| Video Annotation Export | [Github](label_export/video.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/label_export/video.ipynb) |
------

## [Model Assisted Labeling](model_assisted_labeling)

| Notebook | Github | Google Colab |
| --------------------------- | --------------------------------- | ------------ |
| MAL Basics | [Github](model_assisted_labeling/mal_basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/mal_basics.ipynb) |
| Image MAL | [Github](model_assisted_labeling/image_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/image_mal.ipynb) |
| Named Entity Recognition MAL | [Github](model_assisted_labeling/ner_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/ner_mal.ipynb) |
| Debugging MAL | [Github](model_assisted_labeling/debugging_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/debugging_mal.ipynb) |
| MAL with Subclasses | [Github](model_assisted_labeling/mal_with_subclasses.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/mal_with_subclasses.ipynb) |
------

## [Project Configuration](project_configuration)

| Notebook | Github | Google Colab |
| --------------------------- | --------------------------------- | ------------ |
| Project Setup | [Github](project_configuration/project_setup.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/project_configuration/project_setup.ipynb) |
| Debugging MAL | [Github](project_configuration/queue_management.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/project_configuration/queue_management.ipynb) |
| MAL with Subclasses | [Github](project_configuration/webhooks.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/project_configuration/webhooks.ipynb) |
Loading