공간 분류 샘플예제

공간 분류 추가

  • REQUEST (CURL / GET)

curl --request GET \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/classifier \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (CURL / POST)

curl --request POST \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/classifier \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (SAMPLE CODE)

POST /space/classifier

headers: {
    "Content-Type": "application/json"
    “appkey”: “{appkey}”  	
}

body: {
    "image_path": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wohnzimmer_2007.jpg/220px-Wohnzimmer_2007.jpg"
}
  • RESPONSE (200 / JSON)

{
  "code": "00000",
  "message": "success",
  "data": {
    "space_image_uuid": "c97b6592-0c94-46a2-8d3f-8491bc7b53df",
    "image_path": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wohnzimmer_2007.jpg/220px-Wohnzimmer_2007.jpg",
    "created_date": "2021-01-11T08:16:37.096Z",
    "results": [
      {
        "label": "homeoffice",
        "probability": 0.8091437816619873
      },
      {
        "label": "livingroom",
        "probability": 0.1627751588821411
      },
      {
        "label": "room",
        "probability": 0.011149944737553596
      },
      {
        "label": "bathroom",
        "probability": 0.009833515621721745
      },
      {
        "label": "diningroom",
        "probability": 0.004330105148255825
      },
      {
        "label": "kitchen",
        "probability": 0.0027601311448961496
      },
      {
        "label": "dressingroom",
        "probability": 0.000007311527042475063
      }
    ]
  }
}
  • RESPONSE (400/ JSON)

{
  "code": "12001",
  "message": "Invalid image_path"
}
  • RESPONSE (PARAMETERS)

NameTypeMandatoryExampleDescription
codeNumberY응답 상태 코드
messageStringY응답 상태 설명
dataobjectY데이터 정보
space_image_uuidStringY범용 고유 식별자(UUID)
image_pathStringY이미지 경로
created_dateDateY분석 결과
labelStringN분류 결과 레이블
probabilityNumberN분류 결과 확률 (0 ~ 1)



공간 분류 조회

  • REQUEST (CURL / GET)

curl --request GET \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/classifier/space_image_uuid \
     --header 'Accept: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (CURL / POST)

curl --request POST \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/classifier/space_image_uuid \
     --header 'Accept: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (SAMPLE CODE)

GET /space/classifier/c97b6592-0c94-46a2-8d3f-8491bc7b53df

headers: {
    "Content-Type": "application/json",
    “appkey”: “{appkey}”   
}
  • RESPONSE (200 / JSON)

{
  "code": "00000",
  "message": "success",
  "data": {
    "space_image_uuid": "c97b6592-0c94-46a2-8d3f-8491bc7b53df",
    "image_path": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wohnzimmer_2007.jpg/220px-Wohnzimmer_2007.jpg",
    "created_date": "2021-01-11T08:16:37.096Z",
    "results": [
      {
        "label": "homeoffice",
        "probability": 0.8091437816619873
      },
      {
        "label": "livingroom",
        "probability": 0.1627751588821411
      },
      {
        "label": "room",
        "probability": 0.011149944737553596
      },
      {
        "label": "bathroom",
        "probability": 0.009833515621721745
      },
      {
        "label": "diningroom",
        "probability": 0.004330105148255825
      },
      {
        "label": "kitchen",
        "probability": 0.0027601311448961496
      },
      {
        "label": "dressingroom",
        "probability": 0.000007311527042475063
      }
    ]
  }
}
  • RESPONSE (400/ JSON)

{
  "code": "40000",
  "message": "Not Found"
}
  • RESPONSE (PARAMETERS)

NameTypeMandatoryExampleDescription
codeNumberY응답 상태 코드
messageStringY응답 상태 설명
dataObjectY데이터 정보
space_image_uuidStringY범용 고유 식별자(UUID)
image_pathStringY이미지 경로
created_dateDateY분석 데이터 생성 시간
resultsObjectY분석 결과
labelStringN분류 결과 레이블
probabilityNumberN분류 결과 확률 (0 ~ 1)