mindkosh 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mindkosh-1.0.2/LICENSE +201 -0
- mindkosh-1.0.2/PKG-INFO +432 -0
- mindkosh-1.0.2/README.md +397 -0
- mindkosh-1.0.2/mindkosh/__init__.py +6 -0
- mindkosh-1.0.2/mindkosh/annotations/__init__.py +0 -0
- mindkosh-1.0.2/mindkosh/annotations/manager.py +254 -0
- mindkosh-1.0.2/mindkosh/annotations/tag.py +24 -0
- mindkosh-1.0.2/mindkosh/annotations/testset.py +442 -0
- mindkosh-1.0.2/mindkosh/client.py +740 -0
- mindkosh-1.0.2/mindkosh/core.py +183 -0
- mindkosh-1.0.2/mindkosh/datasets/__init__.py +0 -0
- mindkosh-1.0.2/mindkosh/datasets/data_handler.py +447 -0
- mindkosh-1.0.2/mindkosh/datasets/files.py +127 -0
- mindkosh-1.0.2/mindkosh/datasets/helpers.py +276 -0
- mindkosh-1.0.2/mindkosh/datasets/utils.py +61 -0
- mindkosh-1.0.2/mindkosh/exceptions.py +42 -0
- mindkosh-1.0.2/mindkosh/issue.py +135 -0
- mindkosh-1.0.2/mindkosh/job.py +22 -0
- mindkosh-1.0.2/mindkosh/label.py +154 -0
- mindkosh-1.0.2/mindkosh/project.py +161 -0
- mindkosh-1.0.2/mindkosh/task.py +881 -0
- mindkosh-1.0.2/mindkosh/utils.py +80 -0
- mindkosh-1.0.2/mindkosh/webhook.py +19 -0
- mindkosh-1.0.2/mindkosh.egg-info/PKG-INFO +432 -0
- mindkosh-1.0.2/mindkosh.egg-info/SOURCES.txt +43 -0
- mindkosh-1.0.2/mindkosh.egg-info/dependency_links.txt +1 -0
- mindkosh-1.0.2/mindkosh.egg-info/requires.txt +11 -0
- mindkosh-1.0.2/mindkosh.egg-info/top_level.txt +2 -0
- mindkosh-1.0.2/setup.cfg +4 -0
- mindkosh-1.0.2/setup.py +50 -0
- mindkosh-1.0.2/tests/__init__.py +0 -0
- mindkosh-1.0.2/tests/conftest.py +51 -0
- mindkosh-1.0.2/tests/integration/__init__.py +0 -0
- mindkosh-1.0.2/tests/integration/test_client.py +26 -0
- mindkosh-1.0.2/tests/integration/test_crop_rotate.py +48 -0
- mindkosh-1.0.2/tests/integration/test_dataset.py +123 -0
- mindkosh-1.0.2/tests/integration/test_frame_annotations.py +147 -0
- mindkosh-1.0.2/tests/integration/test_frames.py +28 -0
- mindkosh-1.0.2/tests/integration/test_job.py +32 -0
- mindkosh-1.0.2/tests/integration/test_project.py +66 -0
- mindkosh-1.0.2/tests/integration/test_task.py +236 -0
- mindkosh-1.0.2/tests/integration/test_user.py +10 -0
- mindkosh-1.0.2/tests/unit/__init__.py +0 -0
- mindkosh-1.0.2/tests/unit/test_dataset_tag.py +10 -0
- mindkosh-1.0.2/tests/unit/test_label.py +45 -0
mindkosh-1.0.2/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
mindkosh-1.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mindkosh
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: Mindkosh Python SDK
|
|
5
|
+
Home-page: https://github.com/Mindkosh/mindkosh-python-sdk
|
|
6
|
+
Author: Mindkosh
|
|
7
|
+
Author-email: shikhar@mindkosh.com
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Keywords: annotation,segmentation,pointcloud,computervision
|
|
10
|
+
Requires-Python: >=3.7
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: requests==2.31.0
|
|
14
|
+
Requires-Dist: typing-extensions==4.7.1
|
|
15
|
+
Requires-Dist: numpy==1.21.6
|
|
16
|
+
Requires-Dist: Pillow==9.2.0
|
|
17
|
+
Requires-Dist: kiwisolver==1.4.4
|
|
18
|
+
Requires-Dist: matplotlib==3.5.1
|
|
19
|
+
Requires-Dist: mplcursors==0.5.1
|
|
20
|
+
Requires-Dist: aiohttp==3.8.6
|
|
21
|
+
Requires-Dist: alive-progress==2.4.1
|
|
22
|
+
Requires-Dist: validators==0.20.0
|
|
23
|
+
Requires-Dist: python-dotenv==0.21.0
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: description
|
|
27
|
+
Dynamic: description-content-type
|
|
28
|
+
Dynamic: home-page
|
|
29
|
+
Dynamic: keywords
|
|
30
|
+
Dynamic: license
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
Dynamic: requires-dist
|
|
33
|
+
Dynamic: requires-python
|
|
34
|
+
Dynamic: summary
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
[Mindkosh](https://mindkosh.com/annotation-platform) is the platform for
|
|
40
|
+
labeling multi-sensor data, from Lidar point clouds to multiple camera images. Our powerful automatic annotation features and a particular focus on making Quality checking easier and faster, helps ML teams obtain high quality labeled datasets at scale.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
[Read documentation here](https://docs.mindkosh.com/getting-started/welcome)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## Table of contents:
|
|
52
|
+
- [Table of contents:](#table-of-contents)
|
|
53
|
+
- [Setup](#setup)
|
|
54
|
+
- [Requirements](#requirements)
|
|
55
|
+
- [Installation](#installation)
|
|
56
|
+
- [Getting started](#getting-started)
|
|
57
|
+
- [Datasets](#datasets)
|
|
58
|
+
- [Create dataset](#create-dataset)
|
|
59
|
+
- [Get datasets](#get-datasets)
|
|
60
|
+
- [Get dataset files](#get-dataset-files)
|
|
61
|
+
- [Update tags](#update-tags)
|
|
62
|
+
- [Upload data](#upload-data)
|
|
63
|
+
- [Upload pointcloud data](#upload-pointcloud-data)
|
|
64
|
+
- [Upload imagefiles](#upload-imagefiles)
|
|
65
|
+
- [Delete files from dataset](#delete-files-from-dataset)
|
|
66
|
+
- [Delete dataset](#delete-dataset)
|
|
67
|
+
- [Projects](#projects)
|
|
68
|
+
- [Create project](#create-project)
|
|
69
|
+
- [Get all projects](#get-all-projects)
|
|
70
|
+
- [Update project details](#update-project-details)
|
|
71
|
+
- [Delete project](#delete-project)
|
|
72
|
+
- [Tasks](#tasks)
|
|
73
|
+
- [Create task](#create-task)
|
|
74
|
+
- [Get all tasks](#get-all-tasks)
|
|
75
|
+
- [Update task details](#update-task-details)
|
|
76
|
+
- [Download annotations](#download-annotations)
|
|
77
|
+
- [Upload annotations](#upload-annotations)
|
|
78
|
+
- [Delete task](#delete-task)
|
|
79
|
+
- [Frames](#frames)
|
|
80
|
+
- [Get frames](#get-frames)
|
|
81
|
+
- [Download frame](#download-frame)
|
|
82
|
+
- [Show frame annotations](#show-frame-annotations)
|
|
83
|
+
- [Download frame annotations](#download-frame-annotations)
|
|
84
|
+
- [Visualize frame annotations](#visualize-frame-annotations)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Setup
|
|
88
|
+
|
|
89
|
+
### Requirements
|
|
90
|
+
|
|
91
|
+
* Python >= 3.7
|
|
92
|
+
* Account on the Mindkosh platform (Create on now)
|
|
93
|
+
* SDK Token (contact us to get one)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Installation
|
|
97
|
+
|
|
98
|
+
* Install the package
|
|
99
|
+
```sh
|
|
100
|
+
pip install mindkosh
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Getting started
|
|
105
|
+
|
|
106
|
+
```py
|
|
107
|
+
from mindkosh import Client, PointCloudFile, ImageFile, Label
|
|
108
|
+
client = Client(token)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
To get started, create a Task/Project object using the token provided to you. You can also set the token
|
|
112
|
+
in an environment variable(MK_TOKEN) instead of passing as a parameter to the object constructor.
|
|
113
|
+
|
|
114
|
+
## Datasets
|
|
115
|
+
|
|
116
|
+
### Create dataset
|
|
117
|
+
```py
|
|
118
|
+
client.create_dataset(
|
|
119
|
+
name: str,
|
|
120
|
+
data_type: str
|
|
121
|
+
)
|
|
122
|
+
```
|
|
123
|
+
Parameters:
|
|
124
|
+
* name - unique dataset name
|
|
125
|
+
* data_type - image, pointcloud or video
|
|
126
|
+
|
|
127
|
+
Example:
|
|
128
|
+
```py
|
|
129
|
+
dataset = client.create_dataset(
|
|
130
|
+
name = 'test-1',
|
|
131
|
+
data_type = 'pointcloud'
|
|
132
|
+
)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Get datasets
|
|
136
|
+
```py
|
|
137
|
+
datasets = client.get_datasets(
|
|
138
|
+
dataset_id = 1
|
|
139
|
+
)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Get dataset files
|
|
143
|
+
```py
|
|
144
|
+
files = client.get_dataset_files(
|
|
145
|
+
dataset_id = 1,
|
|
146
|
+
max_files = 100
|
|
147
|
+
)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Update tags
|
|
151
|
+
```py
|
|
152
|
+
updated_dataset_files = client.update_tags(
|
|
153
|
+
dataset_id = 1,
|
|
154
|
+
datasetfile_ids = [1,2,3,4,5,6,8],
|
|
155
|
+
add = ['tag1','tag2'],
|
|
156
|
+
remove = ['tag2'],
|
|
157
|
+
all = False
|
|
158
|
+
)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Upload data
|
|
162
|
+
|
|
163
|
+
Uploads images from a list of directories or/and files.
|
|
164
|
+
Useful when all the images same tags/extra.
|
|
165
|
+
|
|
166
|
+
```py
|
|
167
|
+
client.upload_data(
|
|
168
|
+
dataset_id = 1,
|
|
169
|
+
tags = ['tag4'],
|
|
170
|
+
resources = ['/home/user/Desktop/my-images/', '/home/user/Downloads/test1.jpg'],
|
|
171
|
+
recursive = False,
|
|
172
|
+
manifest_file = None,
|
|
173
|
+
save_files_dir = None,
|
|
174
|
+
**kwargs
|
|
175
|
+
)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Upload pointcloud data
|
|
179
|
+
|
|
180
|
+
Uploads images from a list of directories or/and files.
|
|
181
|
+
Useful when all the images same tags/extra.
|
|
182
|
+
|
|
183
|
+
```py
|
|
184
|
+
pcdfile1 = PointCloudFile(
|
|
185
|
+
filepath = '/file/path1/',
|
|
186
|
+
related_files = [
|
|
187
|
+
ImageFile(
|
|
188
|
+
filepath='/path/to/image1',
|
|
189
|
+
tags=[],
|
|
190
|
+
extra={
|
|
191
|
+
"intrinsic": [255.520403, 449.883682, 250.828738, 255.237477],
|
|
192
|
+
|
|
193
|
+
# Projection matrix from lidar to camera
|
|
194
|
+
"extrinsic": [
|
|
195
|
+
[-0.735827, -0.65789, -0.0384775, 0],
|
|
196
|
+
[0.6567956, -0.70452916, 0.00140833, 0],
|
|
197
|
+
[-0.02255652, -0.0248216, 0.9993586, 0],
|
|
198
|
+
[0, 0, 0, 1]
|
|
199
|
+
],
|
|
200
|
+
|
|
201
|
+
# Camera projection model - PINHOLE OR FISHEYE
|
|
202
|
+
# For FISHEYE, mirrorParameter is also needed
|
|
203
|
+
"cameraModel": "PINHOLE",
|
|
204
|
+
"device_id": 1
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
]
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
client.upload_pointcloud_data(
|
|
211
|
+
dataset_id = 1,
|
|
212
|
+
pcdfiles = [pcdfile1, pcdfile2]
|
|
213
|
+
**kwargs
|
|
214
|
+
)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Upload imagefiles
|
|
218
|
+
|
|
219
|
+
Uploads images with tags/extra for each image
|
|
220
|
+
|
|
221
|
+
```py
|
|
222
|
+
client.upload_imagefiles(
|
|
223
|
+
dataset_id = 1,
|
|
224
|
+
imagefiles = [
|
|
225
|
+
ImageFile(
|
|
226
|
+
filepath='/path/to/image1',
|
|
227
|
+
tags=["city1"]
|
|
228
|
+
),
|
|
229
|
+
ImageFile(
|
|
230
|
+
filepath='path/to/image2',
|
|
231
|
+
tags=["city2"]
|
|
232
|
+
)
|
|
233
|
+
]
|
|
234
|
+
)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Delete files from dataset
|
|
238
|
+
|
|
239
|
+
Delete select files or delete all the files from a dataset
|
|
240
|
+
|
|
241
|
+
```py
|
|
242
|
+
client.delete_files_from_dataset(
|
|
243
|
+
dataset_id = 1,
|
|
244
|
+
file_ids = [1,2,3,4],
|
|
245
|
+
delete_all = False
|
|
246
|
+
)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Delete dataset
|
|
250
|
+
|
|
251
|
+
Delete a dataset along with its files
|
|
252
|
+
|
|
253
|
+
```py
|
|
254
|
+
client.delete_dataset(dataset_id=1)
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Projects
|
|
258
|
+
|
|
259
|
+
### Create project
|
|
260
|
+
```py
|
|
261
|
+
project = client.project.create(name, description=None)
|
|
262
|
+
```
|
|
263
|
+
To create a project, enter a name and an optional description.
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
### Get all projects
|
|
268
|
+
|
|
269
|
+
Get list of all project objects
|
|
270
|
+
```py
|
|
271
|
+
myprojects = client.project.get()
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
### Update project details
|
|
276
|
+
|
|
277
|
+
```py
|
|
278
|
+
project.update_name("new name")
|
|
279
|
+
project.update_description("New description")
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Delete project
|
|
283
|
+
```py
|
|
284
|
+
project.delete()
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## Tasks
|
|
288
|
+
|
|
289
|
+
### Create task
|
|
290
|
+
Create a new task :
|
|
291
|
+
```py
|
|
292
|
+
labels = [
|
|
293
|
+
Label(
|
|
294
|
+
name='car',
|
|
295
|
+
color='#fffccc',
|
|
296
|
+
sequence=1
|
|
297
|
+
),
|
|
298
|
+
Label(
|
|
299
|
+
name='bus',
|
|
300
|
+
color='#fcf0fc',
|
|
301
|
+
sequence=2,
|
|
302
|
+
attributes =[]
|
|
303
|
+
)
|
|
304
|
+
]
|
|
305
|
+
```
|
|
306
|
+
Note : Each label should have a unique name.
|
|
307
|
+
|
|
308
|
+
```py
|
|
309
|
+
task = client.task.create(
|
|
310
|
+
name='task1',
|
|
311
|
+
labels=labels,
|
|
312
|
+
dataset_id=1,
|
|
313
|
+
tags=['tag1'],
|
|
314
|
+
project_id=None,
|
|
315
|
+
job_modes=['validation','qc']
|
|
316
|
+
batches=3
|
|
317
|
+
)
|
|
318
|
+
```
|
|
319
|
+
To create a task and upload images/video, user must provide either `resources`/`manifest`.
|
|
320
|
+
|
|
321
|
+
Parameters:
|
|
322
|
+
* name - A valid task name.
|
|
323
|
+
* batches - Number of images in each job. Only valid for resource_type="imageset".
|
|
324
|
+
* project_id - Optional - ID of the project this task should belong to.
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
### Get all tasks
|
|
328
|
+
|
|
329
|
+
Get list of all the tasks
|
|
330
|
+
```py
|
|
331
|
+
mytasks = client.task.get()
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
### Update task details
|
|
336
|
+
|
|
337
|
+
```py
|
|
338
|
+
task.update_name("New name")
|
|
339
|
+
task.update_project_id(new_valid_project_id)
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Download annotations
|
|
343
|
+
|
|
344
|
+
Get releases
|
|
345
|
+
```py
|
|
346
|
+
releases = task.get_releases()
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Create a release
|
|
350
|
+
|
|
351
|
+
```py
|
|
352
|
+
releases = task.create_release(
|
|
353
|
+
format="coco",
|
|
354
|
+
batches=[1,2],
|
|
355
|
+
description=None,
|
|
356
|
+
webhook_url=None
|
|
357
|
+
)
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
format can be any of the following:
|
|
361
|
+
|
|
362
|
+
* Available formats and their parameter names:
|
|
363
|
+
* COCO - "coco"
|
|
364
|
+
* Datumaro - "datumaro"
|
|
365
|
+
* Pascal VOC - "voc"
|
|
366
|
+
* Segmentation mask - "segmentation_mask"
|
|
367
|
+
* YOLO - "yolo"
|
|
368
|
+
|
|
369
|
+
Download a release
|
|
370
|
+
```py
|
|
371
|
+
task.download_release(
|
|
372
|
+
release_id=1,
|
|
373
|
+
local_path='/local/dir/'
|
|
374
|
+
)
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Delete a release
|
|
378
|
+
```py
|
|
379
|
+
task.delete_release(release_id=1)
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Upload annotations
|
|
383
|
+
|
|
384
|
+
```py
|
|
385
|
+
task.upload_annotations(
|
|
386
|
+
annotation_format='coco',
|
|
387
|
+
local_path='annotation_file.zip'
|
|
388
|
+
)
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
### Delete task
|
|
393
|
+
Delete a task -
|
|
394
|
+
```py
|
|
395
|
+
task.delete()
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## Frames
|
|
399
|
+
|
|
400
|
+
### Get frames
|
|
401
|
+
```py
|
|
402
|
+
frames = t1.frames()
|
|
403
|
+
frame = frames[frame_id]
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Download frame
|
|
407
|
+
```py
|
|
408
|
+
frame.download(location)
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Show frame annotations
|
|
412
|
+
```py
|
|
413
|
+
frame.annotations
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Download frame annotations
|
|
417
|
+
```py
|
|
418
|
+
frame.download_annotations(location,format=None)
|
|
419
|
+
```
|
|
420
|
+
Parameters :
|
|
421
|
+
|
|
422
|
+
* location - local dir location where you want to save annotations
|
|
423
|
+
* format - None if you want to download row annotations. Any of ("coco", "datumaro", "voc", "yolo") if you want to download datasets in specific format.
|
|
424
|
+
|
|
425
|
+
### Visualize frame annotations
|
|
426
|
+
```py
|
|
427
|
+
frame.visualize(show_annotations=True,fill_color=0.30)
|
|
428
|
+
```
|
|
429
|
+
Parameters :
|
|
430
|
+
|
|
431
|
+
* show_annotations - False to see raw image, True to see image with annotations.
|
|
432
|
+
* fill_color - 0 <= Color transparency <= 1
|