Skip to content

Commit ca65831

Browse files
author
Matt Sokoloff
committed
added tiled imagery example
1 parent 7c44e40 commit ca65831

File tree

3 files changed

+649
-2
lines changed

3 files changed

+649
-2
lines changed

examples/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
| 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/develop/examples/model_assisted_labeling/ner_mal.ipynb) |
3838
| 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/develop/examples/model_assisted_labeling/debugging_mal.ipynb) |
3939
| 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/develop/examples/model_assisted_labeling/mal_with_subclasses.ipynb) |
40+
| Tiled Imagery MAL | [Github](model_assisted_labeling/tiled_imagery_mal.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_assisted_labeling/tiled_imagery_mal.ipynb) |
41+
4042
------
4143

4244
## [Project Configuration](project_configuration)

examples/model_assisted_labeling/tiled_imagery_mal.ipynb

Lines changed: 642 additions & 0 deletions
Large diffs are not rendered by default.

labelbox/schema/dataset.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def create_data_row(self, **kwargs):
6767

6868
return self.client._create(DataRow, kwargs)
6969

70-
def create_data_rows(self, items):
70+
def create_data_rows(self, items, tms=False):
7171
""" Creates multiple DataRow objects based on the given `items`.
7272
7373
Each element in `items` can be either a `str` or a `dict`. If
@@ -135,7 +135,10 @@ def convert_item(item):
135135
}
136136

137137
# Prepare and upload the desciptor file
138-
data = json.dumps([convert_item(item) for item in items])
138+
if not tms:
139+
items = [convert_item(item) for item in items]
140+
141+
data = json.dumps(items)
139142
descriptor_url = self.client.upload_data(data)
140143

141144
# Create data source

0 commit comments

Comments
 (0)