Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
eef3095
readd test export
jtsodapop Feb 7, 2022
f20387d
updating upload_annotations to have validate turned off. this was mor…
jtsodapop Feb 11, 2022
9ec85f1
update to remove colab key request and instead just request user to i…
jtsodapop Feb 11, 2022
a03be0e
removal of endpoint too
jtsodapop Feb 11, 2022
e59a6cd
update to test case
jtsodapop Feb 11, 2022
fd2ce14
nit update
jtsodapop Feb 11, 2022
743737b
update to allow tiled image epsg transformer to recursively call itse…
jtsodapop Feb 11, 2022
0e379ce
update on another test
jtsodapop Feb 11, 2022
a2cdae4
Add resourceTag GET and projectResourceTag CREATE for project tagging
manibox Feb 9, 2022
0a355cd
review comments
manibox Feb 9, 2022
f0cdbbd
add tests
manibox Feb 11, 2022
f621146
update to how to grab all vector tools
jtsodapop Feb 11, 2022
ec3a71e
update to documentation link
jtsodapop Feb 11, 2022
7176d2b
nit
jtsodapop Feb 11, 2022
ca01b32
Merge pull request #435 from Labelbox/jtso/validoff
jtsodapop Feb 11, 2022
376ed20
removal of getpass and extra installs
jtsodapop Feb 14, 2022
650e749
removal of extra spaces and some additional getpasses
jtsodapop Feb 14, 2022
1d27b92
Merge pull request #436 from Labelbox/al-677-colab-key
jtsodapop Feb 14, 2022
08b5346
additional markdown line to properly show that you need to add in API…
jtsodapop Feb 14, 2022
6ccf681
update to mal basics notebook and quick docstring update to metadata …
jtsodapop Feb 15, 2022
f37fdb8
update to mal basics notebook and quick docstring update to metadata …
jtsodapop Feb 15, 2022
459f46c
Merge pull request #423 from Labelbox/jtso/testexport
jtsodapop Feb 15, 2022
90708e9
better structure
manibox Feb 11, 2022
b3f0d3d
fix
manibox Feb 16, 2022
3bec330
Merge pull request #442 from Labelbox/jtso/nb-updates
jtsodapop Feb 18, 2022
9eb58d5
dropped unnecessary imports and installs from mal_basics.ipynb
raphaeljafriLB Feb 18, 2022
16340b5
Merge pull request #447 from Labelbox/raphael/update_mal_basics
raphaeljafriLB Feb 18, 2022
eb779fb
update to image mal to be image annotation import nb
jtsodapop Feb 18, 2022
25a4e86
small repr update so it shows VideoData and not TextData
jtsodapop Feb 18, 2022
d4570e2
Merge pull request #449 from Labelbox/jtso/fixvideorepr
jtsodapop Feb 18, 2022
24b7a6b
reivew comments
manibox Feb 21, 2022
ce6e678
fix
manibox Feb 21, 2022
5faff5a
Merge branch 'develop' into al-1518
jtsodapop Feb 21, 2022
8ea84d0
fix test
manibox Feb 21, 2022
8b2088d
Merge pull request #437 from Labelbox/al-1518
jtsodapop Feb 22, 2022
10c5c19
restructure of ti mal notebook to be ti annotation import nb with nor…
jtsodapop Feb 22, 2022
bbe6430
Delete test.py
jtsodapop Feb 22, 2022
4f3c010
merge conflict update
jtsodapop Feb 22, 2022
bf2c29f
Delete tiled_imagery_mal.ipynb
jtsodapop Feb 22, 2022
bacd372
Merge pull request #430 from Labelbox/mani/resource-tags
manibox Feb 22, 2022
7be71d9
reinstate old nbs for link references
jtsodapop Feb 23, 2022
bfe4de6
Merge pull request #448 from Labelbox/al-1560
jtsodapop Feb 23, 2022
6c69e76
classification confusion matrix notebook
Feb 25, 2022
a55cc58
classification confusion matrix notebook
Feb 25, 2022
f8ee85e
added install and titles
Feb 25, 2022
a895125
installs
Feb 25, 2022
c7de960
installs
Feb 25, 2022
c817f61
combined installs
Feb 25, 2022
702d98c
Merge pull request #454 from Labelbox/jbuhler/confusion-matrix-notebook
Juanbuhler Feb 25, 2022
846e021
v3.15
jtsodapop Feb 28, 2022
ac1a037
Merge pull request #457 from Labelbox/jtso/13.5
jtsodapop Feb 28, 2022
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# Changelog
# Version 3.15.0 (2022-02-28)
## Added
* Extras folder which contains useful applications using the sdk
* Addition of ResourceTag at the Organization and Project level
* Updates to the example notebooks

## Fix
* EPSGTransformer now properly transforms Polygon to Polygon
* VideoData string representation now properly shows VideoData


# Version 3.14.0 (2022-02-10)
## Added
* Updated metrics for classifications to be per-answer


# Version 3.13.0 (2022-02-07)
## Added
* Added `from_shapely` method to create annotation types from Shapely objects
Expand Down
6 changes: 6 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@ Learn more about annotation types in the [docs](https://docs.labelbox.com/docs/a
| Model Diagnostics Demo | [Github](model_diagnostics/model_diagnostics_demo.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_diagnostics/model_diagnostics_demo.ipynb) |
| Custom Metrics Basics | [Github](model_diagnostics/custom_metrics_basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_diagnostics/custom_metrics_basics.ipynb) | [Docs](https://docs.labelbox.com/docs/model-diagnostics) |
| Custom Metrics Demo | [Github](model_diagnostics/custom_metrics_demo.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_diagnostics/custom_metrics_demo.ipynb) |


## [Extras](extras)
| Notebook | Github | Google Colab | Learn more |
|---------------------------------|------------------------------------------------| ------------ | ---------- |
| Classification Confusion Matrix | [Github](extras/classification-confusion-matrix.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/extras/classification-confusion-matrix.ipynb) | |
524 changes: 438 additions & 86 deletions examples/annotation_types/basics.ipynb

Large diffs are not rendered by default.

168 changes: 114 additions & 54 deletions examples/annotation_types/converters.ipynb

Large diffs are not rendered by default.

334 changes: 287 additions & 47 deletions examples/annotation_types/label_containers.ipynb

Large diffs are not rendered by default.

169 changes: 142 additions & 27 deletions examples/annotation_types/mal_using_annotation_types.ipynb

Large diffs are not rendered by default.

833 changes: 454 additions & 379 deletions examples/annotation_types/tiled_imagery_basics.ipynb

Large diffs are not rendered by default.

118 changes: 87 additions & 31 deletions examples/basics/basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,20 @@
"id": "indie-bracket",
"metadata": {},
"outputs": [],
"source": "!pip install labelbox"
"source": [
"!pip install labelbox"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "everyday-street",
"metadata": {},
"outputs": [],
"source": "from labelbox import Project, Dataset, Client\nfrom getpass import getpass\nimport os"
},
{
"cell_type": "code",
"execution_count": 3,
"id": "crude-receiver",
"metadata": {},
"outputs": [],
"source": "# If you don't want to give google access to drive you can skip this cell\n# and manually set `API_KEY` below.\n\nCOLAB = \"google.colab\" in str(get_ipython())\nif COLAB:\n !pip install colab-env -qU\n from colab_env import envvar_handler\n envvar_handler.envload()\n\nAPI_KEY = os.environ.get(\"LABELBOX_API_KEY\")\nif not os.environ.get(\"LABELBOX_API_KEY\"):\n API_KEY = getpass(\"Please enter your labelbox api key\")\n if COLAB:\n envvar_handler.add_env(\"LABELBOX_API_KEY\", API_KEY)"
"source": [
"from labelbox import Project, Dataset, Client\n",
"import os"
]
},
{
"cell_type": "markdown",
Expand All @@ -109,7 +106,14 @@
"id": "instructional-reply",
"metadata": {},
"outputs": [],
"source": "PROJECT_ID = \"ckk4q1viuc0w20704eh69u28h\"\nDATASET_ID = \"ckk4q1vjznyhu087203wlghfr\"\nPROJECT_NAME = \"Sample Project\"\nDATASET_NAME = \"Example Jellyfish Dataset\"\n# Only update this if you have an on-prem deployment\nENDPOINT = \"https://api.labelbox.com/graphql\""
"source": [
"PROJECT_ID = \"ckk4q1viuc0w20704eh69u28h\"\n",
"DATASET_ID = \"ckk4q1vjznyhu087203wlghfr\"\n",
"PROJECT_NAME = \"Sample Project\"\n",
"DATASET_NAME = \"Example Jellyfish Dataset\"\n",
"# Only update this if you have an on-prem deployment\n",
"ENDPOINT = \"https://api.labelbox.com/graphql\""
]
},
{
"cell_type": "markdown",
Expand All @@ -120,21 +124,38 @@
"* Starting point for all db interactions"
]
},
{
"cell_type": "markdown",
"id": "485451ad",
"metadata": {},
"source": [
"# API Key and Client\n",
"Provide a valid api key below in order to properly connect to the Labelbox Client."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "thick-gasoline",
"metadata": {},
"outputs": [],
"source": "client = Client(api_key=API_KEY, endpoint=ENDPOINT)"
"source": [
"# Add your api key\n",
"API_KEY = None\n",
"client = Client(api_key=API_KEY)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "victorian-consumer",
"metadata": {},
"outputs": [],
"source": "#Client can be used to fetch by id:\nproject = client.get_project(PROJECT_ID)\ndataset = client.get_dataset(DATASET_ID)"
"source": [
"#Client can be used to fetch by id:\n",
"project = client.get_project(PROJECT_ID)\n",
"dataset = client.get_dataset(DATASET_ID)"
]
},
{
"cell_type": "code",
Expand All @@ -153,7 +174,9 @@
"output_type": "execute_result"
}
],
"source": "project"
"source": [
"project"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -181,7 +204,11 @@
]
}
],
"source": "print(project.name)\nprint(project.description)\nprint(dataset.name)"
"source": [
"print(project.name)\n",
"print(project.description)\n",
"print(dataset.name)"
]
},
{
"cell_type": "markdown",
Expand All @@ -197,7 +224,10 @@
"id": "according-subdivision",
"metadata": {},
"outputs": [],
"source": "project.update(description=\"new description field\")\nprint(project.description)"
"source": [
"project.update(description=\"new description field\")\n",
"print(project.description)"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -226,15 +256,23 @@
"output_type": "execute_result"
}
],
"source": "labels_paginated_collection = project.labels()\nlabels_paginated_collection"
"source": [
"labels_paginated_collection = project.labels()\n",
"labels_paginated_collection"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "convinced-force",
"metadata": {},
"outputs": [],
"source": "# Note that if you selected a `project_id` without any labels this will raise `StopIteration`\n# Iterate over them to get the items out.\nnext(labels_paginated_collection)\n# list(paginated...) should be avoided for queries that could return more than a dozen results"
"source": [
"# Note that if you selected a `project_id` without any labels this will raise `StopIteration`\n",
"# Iterate over them to get the items out.\n",
"next(labels_paginated_collection)\n",
"# list(paginated...) should be avoided for queries that could return more than a dozen results"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -263,7 +301,21 @@
]
}
],
"source": "datasets = client.get_datasets(where=Dataset.name == DATASET_NAME)\n\nprojects = client.get_projects(\n where=((Project.name == PROJECT_NAME) &\n (Project.description == \"new description field\")))\n\n# The above two queries return PaginatedCollections because the filter parameters aren't guaranteed to be unique.\n# So even if there is one element returned it is in a paginatedCollection.\nprint(projects)\nprint(next(projects, None))\nprint(next(projects, None))\nprint(next(projects, None))\n# We can see there is only one."
"source": [
"datasets = client.get_datasets(where=Dataset.name == DATASET_NAME)\n",
"\n",
"projects = client.get_projects(\n",
" where=((Project.name == PROJECT_NAME) &\n",
" (Project.description == \"new description field\")))\n",
"\n",
"# The above two queries return PaginatedCollections because the filter parameters aren't guaranteed to be unique.\n",
"# So even if there is one element returned it is in a paginatedCollection.\n",
"print(projects)\n",
"print(next(projects, None))\n",
"print(next(projects, None))\n",
"print(next(projects, None))\n",
"# We can see there is only one."
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -305,7 +357,11 @@
"output_type": "execute_result"
}
],
"source": "# Dataset has a Relationship to a Project so we can use the following\nlist(dataset.projects())\n# This will return all projects that are attached to this dataset"
"source": [
"# Dataset has a Relationship to a Project so we can use the following\n",
"list(dataset.projects())\n",
"# This will return all projects that are attached to this dataset"
]
},
{
"cell_type": "code",
Expand All @@ -324,7 +380,10 @@
"output_type": "execute_result"
}
],
"source": "sample_project_datasets = project.datasets()\nlist(sample_project_datasets)"
"source": [
"sample_project_datasets = project.datasets()\n",
"list(sample_project_datasets)"
]
},
{
"cell_type": "markdown",
Expand All @@ -341,7 +400,12 @@
"id": "persistent-briefs",
"metadata": {},
"outputs": [],
"source": "#Eg.\n##### project.delete()\n##### dataset.delete()\n##### data_row.delete()"
"source": [
"#Eg.\n",
"##### project.delete()\n",
"##### dataset.delete()\n",
"##### data_row.delete()"
]
},
{
"cell_type": "markdown",
Expand All @@ -351,14 +415,6 @@
"* We reccomend using bulk operations where possible.\n",
"* You can find specific deletion instructions in tutorials on each object."
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "thirty-interval",
"metadata": {},
"outputs": [],
"source": ""
}
],
"metadata": {
Expand All @@ -382,4 +438,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Loading