crowd-semantic-segmentation - 아마존 SageMaker

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

crowd-semantic-segmentation

이미지를 분류하고 각 이미지 세그먼트에 레이블을 할당하는 위젯

CodePen에서 이 Crowd HTML 요소를 사용하는 HTML 템플릿의 대화형 예제를 참고해 보십시오.

다음은 <crowd-semantic-segmentation> 요소를 사용하는 Liquid 템플릿 예제입니다. 다음 코드를 복사하여 확장자가 .html인 파일에 저장합니다. 브라우저에서 파일을 열어 이 템플릿을 미리 보고 상호 작용합니다.

<script src="https://assets.crowd.aws/crowd-html-elements.js"></script> <crowd-form> <crowd-semantic-segmentation name="annotatedResult" src="{{ task.input.taskObject | grant_read_access }}" header="Please label each of the requested objects in this image" labels="['Cat', 'Dog', 'Bird']" > <full-instructions header="Segmentation Instructions"> <ol> <li><strong>Read</strong> the task carefully and inspect the image.</li> <li><strong>Read</strong> the options and review the examples provided to understand more about the labels.</li> <li><strong>Choose</strong> the appropriate label that best suits the image.</li> </ol> </full-instructions> <short-instructions> <p>Use the tools to label the requested items in the image</p> </short-instructions> </crowd-semantic-segmentation> </crowd-form>

Attributes

이 요소는 다음 속성을 지원합니다.

header

이미지 위에 표시되는 텍스트입니다. 일반적으로 작업자를 위한 간단한 지침 또는 질문입니다.

initial-value

이전 의미 체계 분할 작업의 색상 매핑과 이전 작업으로 인한 오버레이 이미지 출력의 링크가 포함된 JSON 객체입니다. 인간 작업자가 이전 레이블 지정 작업의 결과를 확인하고 필요한 경우 조정하도록 하려면 이 항목을 포함합니다.

속성은 다음과 같이 나타납니다.

initial-value='{ "labelMappings": { "Bird": { "color": "#ff7f0e" }, "Cat": { "color": "#2ca02c" }, "Cow": { "color": "#d62728" }, "Dog": { "color": "#1f77b4" } }, "src": {{ "S3 file URL for image" | grant_read_access }} }'

Ground Truth 기본 제공 태스크 유형주석 통합(한 명 이상의 작업자가 단일 이미지에 레이블을 지정하는 경우)과 함께 사용하는 경우 레이블 매핑은 개별 작업자 출력 레코드에 포함되지만 전체 결과는 통합 결과에 internal-color-map으로 표시됩니다.

사용자 지정 템플릿에서 Liquid 템플릿 언어를 사용하여 internal-color-maplabel-mappings로 변환할 수 있습니다.

initial-value="{ 'src' : '{{ task.input.manifestLine.label-attribute-name-from-prior-job| grant_read_access }}', 'labelMappings': { {% for box in task.input.manifestLine.label-attribute-name-from-prior-job-metadata.internal-color-map %} {% if box[1]['class-name'] != 'BACKGROUND' %} {{ box[1]['class-name'] | to_json }}: { 'color': {{ box[1]['hex-color'] | to_json }} }, {% endif %} {% endfor %} } }"

레이블

JSON 형식의 문자열 배열로, 각 문자열은 작업자가 이미지의 세그먼트에 할당할 수 있는 레이블입니다.

name

이 위젯의 이름입니다. 양식 출력에서 위젯의 입력에 대한 키로 사용됩니다.

src

조각화할 이미지의 URL

요소 계층 구조

이 요소에는 다음과 같은 상위 및 하위 요소가 포함되어 있습니다.

리전

이 요소는 다음 영역을 지원합니다.

full-instructions

이미지 조각화를 수행하는 방법에 대한 일반 지침

short-instructions

눈에 띄는 위치에 표시되는 중요한 작업 관련 지침입니다.

출력

이 요소는 다음 출력을 지원합니다.

labeledImage

레이블의 Base64 인코딩 PNG가 포함된 JSON 객체

labelMappings

조각화 레이블로 이름이 지정된 객체가 포함된 JSON 객체

  • colorlabeledImage PNG에서 레이블의 RGB 색상에 대한 16진수 값

initialValueModified

초기 값이 수정되었는지 여부를 나타내는 부울입니다. 출력이 조정 작업에서 발생한 경우에만 포함됩니다.

inputImageProperties

작업자가 주석을 달고 있는 이미지의 치수를 지정하는 JSON 객체입니다. 이 객체는 다음 속성을 포함하고 있습니다.

  • height – 이미지의 높이(픽셀)

  • width – 이미지의 너비(픽셀)

예 : 샘플 요소 출력

다음은 이 요소의 샘플 출력입니다.

[ { "annotatedResult": { "inputImageProperties": { "height": 533, "width": 800 }, "labelMappings": { "<Label 2>": { "color": "#ff7f0e" }, "<label 3>": { "color": "#2ca02c" }, "<label 1>": { "color": "#1f77b4" } }, "labeledImage": { "pngImageData": "<Base-64 Encoded Data>" } } } ]

참고 항목

자세한 내용은 다음을 참조하세요.