-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from stardustai/annotation
docs: import & upload annotation
- Loading branch information
Showing
4 changed files
with
146 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
title: Import Dataset & Annotation Request | ||
description: This page will help you get started with importing a dataset from cloud storage asynchronously and annotation request, you need to put the files according to a specific file tree structure, refer to [File tree](#file-tree). | ||
api: | ||
method: POST | ||
url: /dataset/annotation/import/async | ||
--- | ||
|
||
<!-- You can use the cloud storage of the platform, or your own storage which follow the S3 protocol, in second case, you need to pass the relevant authentication parameters, such as AccessKey, SecreteKey, Endpoint, VendorType. | ||
--> | ||
|
||
::: request | ||
|
||
```json [body] | ||
{ | ||
"resourceUrl": { | ||
"type": "string", | ||
"description": "The resource url on cloud storage, start with gs://bucket-name/" | ||
}, | ||
"fileTreeType": { | ||
"type": "string", | ||
"description": "[File tree](#file-tree) in storage: 0 represents sensor oriented." | ||
}, | ||
"dataType": { | ||
"type": "integer", | ||
"description": "Data type: 2 represents 2D, 3 represents 3D." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "Dataset name, the maximum length limit is 60 bytes." | ||
}, | ||
"projectId": { | ||
"type": "long", | ||
"description": "Items that need to be annotation request, the project id which returned by [Create Project](/projects/create-project)" | ||
}, | ||
"externalStorage": { | ||
"type": "object", | ||
"hidden": true, | ||
"required": false, | ||
"properties": { | ||
"accessKey": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"secreteKey": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"endpoint": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"vendorType": { | ||
"type": "string", | ||
"description": "" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
::: | ||
|
||
::: result | ||
|
||
```json [responses] | ||
{ | ||
"200": { | ||
"code": 200, | ||
"message": "Success", | ||
"data": { | ||
"datasetId": "1", | ||
"status": 1 | ||
}, | ||
"date": "2024-05-16 19:03:34", | ||
"requestId": "864b70706a7349ea83e177a49800464f", | ||
"success": true | ||
}, | ||
"5710": { | ||
"code": 5710, | ||
"data": null, | ||
"date": "2024-05-16 19:03:34", | ||
"message": "File tree misalignment, refer to API doc for correction", | ||
"requestId": "864b70706a7349ea83e177a49800464f", | ||
"success": false | ||
} | ||
} | ||
``` | ||
|
||
::: | ||
|
||
## File tree | ||
|
||
<!--@include: filetree.md--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: 'Upload Dataset & Annotation Request' | ||
description: This page will help you get started with uploading a local dataset zip file to Rosetta synchronously, and annotation request, the file size should be less than 100MB, and you need to put the files according to [File tree](#file-tree). | ||
api: | ||
method: POST | ||
url: /dataset/annotation/upload/sync | ||
--- | ||
|
||
::: request | ||
|
||
```json [headers] | ||
{ | ||
"Content-Type": { "type": "string", "default": "multipart/form-data" } | ||
} | ||
``` | ||
|
||
```json [body:form] | ||
{ | ||
"uploadFile": { | ||
"type": "file", | ||
"description": "Local zip file path", | ||
"default": "dataset.zip" | ||
}, | ||
"fileTreeType": { | ||
"type": "integer", | ||
"description": "[File tree](#file-tree) in zip file: 0 represents sensor oriented." | ||
}, | ||
"dataType": { | ||
"type": "integer", | ||
"description": "Data type: 2 represents 2D, 3 represents 3D." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "Dataset name, the maximum length limit is 60 bytes." | ||
}, | ||
"projectId": { | ||
"type": "long", | ||
"description": "Items that need to be annotation request, the project id which returned by [Create Project](/projects/create-project)" | ||
} | ||
} | ||
``` | ||
|
||
::: | ||
|
||
<!--@include: common-response.md--> | ||
|
||
## File tree | ||
|
||
<!--@include: file-tree.md--> |