dataset

class stardust.ms.ms.MS[source]

Bases: object

export_dataset(**kwargs)[source]

Export ms data and automatically detach consecutive frames

Return type:

Dict

Args:
dataset_id: int

Data set ID

version_num: int

Version number

slice_id: int

Slice ID

page_no: int

Slice paging

page_size: int

Amount of data per page

Returns: Dict

Derived data slicing

Examples:
from stardust.ms.ms import MS

frame_gen = MS().export_dataset(
    dataset_id=351787480925605888,
    version_num=18
)
for frame in frame_gen:
    pass
create_dataset(**kwargs)[source]

创建切片

Return type:

Dict

Args:
dataset_id: int

Data set ID

data_instance_ids: int

Data instance ID

name: int

Slice name

description: int

Slice description

Returns: Dict

Create slice results

Examples:
from stardust.ms.ms import MS

resp = MS().create_dataset(
    dataset_id=352036425840988160,
    data_instance_ids=[351787490434093056],
    name="Slice 1",
    description="description"
)
print(resp)
import_dataset_ms(**kwargs)[source]

Import data set

Return type:

Dict

Args:
dataset_id: int

Data set ID

model_id: int

Model ID

version_num: int

Version number

annotation_result: List

Result of pretreatment

Returns: Dict

Import result

Examples:
from stardust.ms.ms import MS

resp = MS().import_dataset_ms(
    dataset_id=351787480925605888,
    model_id="404",
    version_num=1,
    annotation_result=[
          {
            "annotation": {
              "annotations": [
                {
                  "key": "3D框",
                  "label": "3D框",
                  "type": "slotChildren",
                  "slotsChildren": [...]
                }
              ],
              "operators": [...]
            },
            "dataInstanceId": "351787490434093056"
          },
          {
            "annotation": {
              "annotations": [...],
              "operators": [...]
            },
            "dataInstanceId": "351787490622836736"
          }
        ]
)
print(resp)