Skip to content

Updated composite notebook #1672

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 5 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
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
32 changes: 12 additions & 20 deletions examples/exports/composite_mask_export.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@
"\n",
"Composite masks are a combination of mask instances grouped in a single mask URL. \n",
"\n",
"The purpose of this demo is to demonstrate how to transition from exporting single masks to exporting composite masks. "
"This demo aims to demonstrate how to transition from exporting single masks to exporting composite masks. "
],
"cell_type": "markdown"
},
{
"metadata": {},
"source": [
"## Imports"
"## Set up"
],
"cell_type": "markdown"
},
{
"metadata": {},
"source": "%pip install -q \"labelbox[data]\"",
"source": "%pip install -q --upgrade \"labelbox[data]\"",
"cell_type": "code",
"outputs": [],
"execution_count": null
Expand All @@ -63,14 +63,14 @@
{
"metadata": {},
"source": [
"## API Key and Client\n",
"See the developer guide for [creating an API key](https://docs.labelbox.com/reference/create-api-key)."
"## API key and client\n",
"Provide a valid API key below to properly connect to the Labelbox client. Please review [Create API key guide](https://docs.labelbox.com/reference/create-api-key) for more information."
],
"cell_type": "markdown"
},
{
"metadata": {},
"source": "API_KEY = \"\"\nclient = lb.Client(api_key=API_KEY)\nclient.enable_experimental = (\n True ## This is required if using the export() streamable method\n)",
"source": "API_KEY = None\nclient = lb.Client(api_key=API_KEY)",
"cell_type": "code",
"outputs": [],
"execution_count": null
Expand All @@ -85,10 +85,10 @@
{
"metadata": {},
"source": [
"#### Composite masks\n",
"### Composite masks\n",
"**IMPORTANT :** The URL for the ```composite_mask``` from exports older than 30 days will no longer be accessible. To obtain a functional URL after this period, please generate a new export for the mask.\n",
"1. A single mask url contains all mask instances from a single label. For videos a composite mask contains all mask instances for the frame in each label. \n",
"2. The export and mask URL adhere to the following convention:\n",
"1. A composite URL contains all mask instances from a single label. For videos a composite mask contains all mask instances per frame in each label. \n",
"2. The export and mask URL adheres to the following convention:\n",
" - ***Image example***\n",
"```json \n",
" {\n",
Expand Down Expand Up @@ -157,16 +157,8 @@
{
"metadata": {},
"source": [
"---"
],
"cell_type": "markdown"
},
{
"metadata": {},
"source": [
"#### Single mask instance:\n",
"We are planning on removing single mask instances, but for now they will be displayed adjecent to the composite mask.\n",
"1. A single mask instance and mask url is generated for each individual annotation for each label.\n",
"### Single mask instance:\n",
"1. A single mask instance and mask url is generated for each individual annotation per label.\n",
"2. The export and mask URL adhere to the following convention: \n",
"```json\n",
" {\n",
Expand All @@ -183,7 +175,7 @@
{
"metadata": {},
"source": [
"## Create an export from an Image project with mask annotations\n",
"## Create an export from a project with mask annotations\n",
"To better showcase composite masks, make sure you have different mask tools and mask annotations in your project"
],
"cell_type": "markdown"
Expand Down
Loading