AI开发平台MODELARTS-创建数据集:请求示例

时间:2024-09-07 09:09:40

请求示例

  • 创建图像分类的数据集

    {
      "workspace_id" : "0",
      "dataset_name" : "dataset-457f",
      "dataset_type" : 0,
      "data_sources" : [ {
        "data_type" : 0,
        "data_path" : "/test-obs/classify/input/animals/"
      } ],
      "description" : "",
      "work_path" : "/test-obs/classify/output/",
      "work_path_type" : 0,
      "labels" : [ {
        "name" : "Rabbits",
        "type" : 0,
        "property" : {
          "@modelarts:color" : "#3399ff"
        }
      }, {
        "name" : "Bees",
        "type" : 0,
        "property" : {
          "@modelarts:color" : "#3399ff"
        }
      } ]
    }
  • 创建物体检测的数据集

    {
      "workspace_id" : "0",
      "dataset_name" : "dataset-95a6",
      "dataset_type" : 1,
      "data_sources" : [ {
        "data_type" : 0,
        "data_path" : "/test-obs/detect/input/animals/"
      } ],
      "description" : "",
      "work_path" : "/test-obs/detect/output/",
      "work_path_type" : 0,
      "labels" : [ {
        "name" : "Rabbits",
        "type" : 1,
        "property" : {
          "@modelarts:color" : "#3399ff"
        }
      }, {
        "name" : "Bees",
        "type" : 1,
        "property" : {
          "@modelarts:color" : "#3399ff"
        }
      } ]
    }
  • 创建表格型的数据集

    {
      "workspace_id" : "0",
      "dataset_name" : "dataset-de83",
      "dataset_type" : 400,
      "data_sources" : [ {
        "data_type" : 0,
        "data_path" : "/test-obs/table/input/",
        "with_column_header" : true
      } ],
      "description" : "",
      "work_path" : "/test-obs/table/output/",
      "work_path_type" : 0,
      "schema" : [ {
        "schema_id" : 1,
        "name" : "150",
        "type" : "STRING"
      }, {
        "schema_id" : 2,
        "name" : "4",
        "type" : "STRING"
      }, {
        "schema_id" : 3,
        "name" : "setosa",
        "type" : "STRING"
      }, {
        "schema_id" : 4,
        "name" : "versicolor",
        "type" : "STRING"
      }, {
        "schema_id" : 5,
        "name" : "virginica",
        "type" : "STRING"
      } ],
      "import_data" : true
    }
support.huaweicloud.com/api-modelarts/CreateDataset.html