이미지 분석 인식 기술Image Analysis cognitive skill
이미지 분석 기술은 이미지 콘텐츠를 기준으로 다양한 시각적 기능 집합을 추출합니다.The Image Analysis skill extracts a rich set of visual features based on the image content. 예를 들어, 이미지에서 캡션을 생성하거나, 태그를 생성하거나, 유명인과 랜드마크를 식별할 수 있습니다.For example, you can generate a caption from an image, generate tags, or identify celebrities and landmarks. 이 기술은 Cognitive Services의 Computer Vision에서 제공하는 기계 학습 모델을 사용합니다.This skill uses the machine learning models provided by Computer Vision in Cognitive Services.
참고
Azure Cognitive Search에서 작은 볼륨 (20 개 트랜잭션 미만)을 무료로 실행할 수 있지만, 더 큰 워크 로드 는 청구 가능한 Cognitive Services 리소스를 연결해야 합니다.Small volumes (under 20 transactions) can be executed for free in Azure Cognitive Search, but larger workloads require attaching a billable Cognitive Services resource. Cognitive Services에서 API를 호출하는 경우와 Azure Cognitiv Search에서 문서 크래킹 단계의 일부로 이미지를 추출하는 경우에는 요금이 부과됩니다.Charges accrue when calling APIs in Cognitive Services, and for image extraction as part of the document-cracking stage in Azure Cognitive Search. 문서에서 텍스트 추출할 때는 요금이 발생하지 않습니다.There are no charges for text extraction from documents.
기본 제공 기술을 실행하는 요금은 기존 Cognitive Services 종량제 가격으로 청구됩니다.Execution of built-in skills is charged at the existing Cognitive Services pay-as-you go price. 이미지 추출 가격 책정은 Azure Cognitiv Search 가격 책정 페이지에 설명되어 있습니다.Image extraction pricing is described on the Azure Cognitive Search pricing page.
@odata.type
Microsoft.Skills.Vision.ImageAnalysisSkillMicrosoft.Skills.Vision.ImageAnalysisSkill
기술 매개 변수Skill parameters
매개 변수는 대/소문자를 구분합니다.Parameters are case-sensitive.
매개 변수 이름Parameter name | DescriptionDescription |
---|---|
defaultLanguageCode |
반환할 언어를 나타내는 문자열입니다.A string indicating the language to return. 서비스는 지정된 언어로 인식 결과를 반환합니다.The service returns recognition results in a specified language. 이 매개 변수를 지정하지 않을 경우 기본값은 “en”입니다.If this parameter is not specified, the default value is "en". 지원되는 언어는 다음과 같습니다.Supported languages are: en - 영어(기본값)en - English (default) es -스페인어es - Spanish ja-jp -일본어ja - Japanese pt -포르투갈어pt - Portuguese zh - 중국어 간체zh - Simplified Chinese |
visualFeatures |
반환할 시각적 기능 유형을 나타내는 문자열 배열입니다.An array of strings indicating the visual feature types to return. 유효한 시각적 기능 유형은 다음과 같습니다.Valid visual feature types include:
|
details |
반환할 도메인 특정 세부 정보를 나타내는 문자열 배열입니다.An array of strings indicating which domain-specific details to return. 유효한 시각적 기능 유형은 다음과 같습니다.Valid visual feature types include:
|
기술 입력Skill inputs
입력 이름Input name | 설명Description |
---|---|
image |
복합 형식입니다.Complex Type. imageAction 이 none 이외의 값으로 설정된 경우 현재 Azure Blob 인덱서에서 생성된 “/document/normalized_images” 필드에만 작동합니다.Currently only works with "/document/normalized_images" field, produced by the Azure Blob indexer when imageAction is set to a value other than none . 자세한 내용은 샘플을 참조하세요.See the sample for more information. |
샘플 기술 정의Sample skill definition
{
"description": "Extract image analysis.",
"@odata.type": "#Microsoft.Skills.Vision.ImageAnalysisSkill",
"context": "/document/normalized_images/*",
"defaultLanguageCode": "en",
"visualFeatures": [
"tags",
"categories",
"description",
"faces",
"brands"
],
"inputs": [
{
"name": "image",
"source": "/document/normalized_images/*"
}
],
"outputs": [
{
"name": "categories"
},
{
"name": "tags"
},
{
"name": "description"
},
{
"name": "faces"
},
{
"name": "brands"
}
]
}
샘플 인덱스 (범주, 설명, 면 및 태그 필드에만 해당)Sample index (for only the categories, description, faces and tags fields)
{
"fields": [
{
"name": "id",
"type": "Edm.String",
"key": true,
"searchable": true,
"filterable": false,
"facetable": false,
"sortable": true
},
{
"name": "blob_uri",
"type": "Edm.String",
"searchable": true,
"filterable": false,
"facetable": false,
"sortable": true
},
{
"name": "content",
"type": "Edm.String",
"sortable": false,
"searchable": true,
"filterable": false,
"facetable": false
},
{
"name": "categories",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "name",
"type": "Edm.String",
"searchable": true,
"filterable": false,
"facetable": false
},
{
"name": "score",
"type": "Edm.Double",
"searchable": false,
"filterable": false,
"facetable": false
},
{
"name": "detail",
"type": "Edm.ComplexType",
"fields": [
{
"name": "celebrities",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "name",
"type": "Edm.String",
"searchable": true,
"filterable": false,
"facetable": false
},
{
"name": "faceBoundingBox",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "x",
"type": "Edm.Int32",
"searchable": false,
"filterable": false,
"facetable": false
},
{
"name": "y",
"type": "Edm.Int32",
"searchable": false,
"filterable": false,
"facetable": false
}
]
},
{
"name": "confidence",
"type": "Edm.Double",
"searchable": false,
"filterable": false,
"facetable": false
}
]
},
{
"name": "landmarks",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "name",
"type": "Edm.String",
"searchable": true,
"filterable": false,
"facetable": false
},
{
"name": "confidence",
"type": "Edm.Double",
"searchable": false,
"filterable": false,
"facetable": false
}
]
}
]
}
]
},
{
"name": "description",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "tags",
"type": "Collection(Edm.String)",
"searchable": true,
"filterable": false,
"facetable": false
},
{
"name": "captions",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "text",
"type": "Edm.String",
"searchable": true,
"filterable": false,
"facetable": false
},
{
"name": "confidence",
"type": "Edm.Double",
"searchable": false,
"filterable": false,
"facetable": false
}
]
}
]
},
{
"name": "faces",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "age",
"type": "Edm.Int32",
"searchable": false,
"filterable": false,
"facetable": false
},
{
"name": "gender",
"type": "Edm.String",
"searchable": false,
"filterable": false,
"facetable": false
},
{
"name": "faceBoundingBox",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "x",
"type": "Edm.Int32",
"searchable": false,
"filterable": false,
"facetable": false
},
{
"name": "y",
"type": "Edm.Int32",
"searchable": false,
"filterable": false,
"facetable": false
}
]
}
]
},
{
"name": "tags",
"type": "Collection(Edm.ComplexType)",
"fields": [
{
"name": "name",
"type": "Edm.String",
"searchable": true,
"filterable": false,
"facetable": false
},
{
"name": "confidence",
"type": "Edm.Double",
"searchable": false,
"filterable": false,
"facetable": false
}
]
}
]
}
샘플 출력 필드 매핑 (위 인덱스의 경우)Sample output field mapping (for the above index)
"outputFieldMappings": [
{
"sourceFieldName": "/document/normalized_images/*/categories/*",
"targetFieldName": "categories"
},
{
"sourceFieldName": "/document/normalized_images/*/tags/*",
"targetFieldName": "tags"
},
{
"sourceFieldName": "/document/normalized_images/*/description",
"targetFieldName": "description"
},
{
"sourceFieldName": "/document/normalized_images/*/faces/*",
"targetFieldName": "faces"
},
{
"sourceFieldName": "/document/normalized_images/*/brands/*/name",
"targetFieldName": "brands"
}
출력 필드 매핑의 변형 (중첩 된 속성)Variation on output field mappings (nested properties)
랜드마크 또는 유명인와 같은 하위 수준 속성에 대 한 출력 필드 매핑을 정의할 수 있습니다.You can define output field mappings to lower-level properties, such as just landmarks or celebrities. 이 경우 인덱스 스키마에 랜드마크를 포함 하는 필드가 포함 되어 있는지 확인 합니다.In this case, make sure your index schema has a field to contain landmarks specifically.
"outputFieldMappings": [
{
"sourceFieldName": "/document/normalized_images/*/categories/detail/celebrities/*",
"targetFieldName": "celebrities"
}
샘플 입력Sample input
{
"values": [
{
"recordId": "1",
"data": {
"image": {
"data": "BASE64 ENCODED STRING OF A JPEG IMAGE",
"width": 500,
"height": 300,
"originalWidth": 5000,
"originalHeight": 3000,
"rotationFromOriginal": 90,
"contentOffset": 500,
"pageNumber": 2
}
}
}
]
}
샘플 출력Sample output
{
"values": [
{
"recordId": "1",
"data": {
"categories": [
{
"name": "abstract_",
"score": 0.00390625
},
{
"name": "people_",
"score": 0.83984375,
"detail": {
"celebrities": [
{
"name": "Satya Nadella",
"faceBoundingBox": [
{
"x": 273,
"y": 309
},
{
"x": 395,
"y": 309
},
{
"x": 395,
"y": 431
},
{
"x": 273,
"y": 431
}
],
"confidence": 0.999028444
}
],
"landmarks": [
{
"name": "Forbidden City",
"confidence": 0.9978346
}
]
}
}
],
"adult": {
"isAdultContent": false,
"isRacyContent": false,
"isGoryContent": false,
"adultScore": 0.0934349000453949,
"racyScore": 0.068613491952419281,
"goreScore": 0.08928389008070282
},
"tags": [
{
"name": "person",
"confidence": 0.98979085683822632
},
{
"name": "man",
"confidence": 0.94493889808654785
},
{
"name": "outdoor",
"confidence": 0.938492476940155
},
{
"name": "window",
"confidence": 0.89513939619064331
}
],
"description": {
"tags": [
"person",
"man",
"outdoor",
"window",
"glasses"
],
"captions": [
{
"text": "Satya Nadella sitting on a bench",
"confidence": 0.48293603002174407
}
]
},
"requestId": "0dbec5ad-a3d3-4f7e-96b4-dfd57efe967d",
"metadata": {
"width": 1500,
"height": 1000,
"format": "Jpeg"
},
"faces": [
{
"age": 44,
"gender": "Male",
"faceBoundingBox": [
{
"x": 1601,
"y": 395
},
{
"x": 1653,
"y": 395
},
{
"x": 1653,
"y": 447
},
{
"x": 1601,
"y": 447
}
]
}
],
"objects": [
{
"rectangle": {
"x": 25,
"y": 43,
"w": 172,
"h": 140
},
"object": "person",
"confidence": 0.931
}
],
"brands":[
{
"name":"Microsoft",
"confidence": 0.903,
"rectangle":{
"x":20,
"y":97,
"w":62,
"h":52
}
}
]
}
}
]
}
오류 사례Error cases
다음 오류 사례에서는 요소가 추출되지 않습니다.In the following error cases, no elements are extracted.
오류 코드Error Code | DescriptionDescription |
---|---|
NotSupportedLanguage |
제공한 언어가 지원되지 않습니다.The language provided is not supported. |
InvalidImageUrl |
이미지 URL의 형식이 잘못되었거나 액세스할 수 없습니다.Image URL is badly formatted or not accessible. |
InvalidImageFormat |
입력 데이터가 유효한 이미지가 아닙니다.Input data is not a valid image. |
InvalidImageSize |
입력 이미지가 너무 큽니다.Input image is too large. |
NotSupportedVisualFeature |
지정한 기능 유형이 잘못되었습니다.Specified feature type is not valid. |
NotSupportedImage |
지원되지 않는 이미지(예: 아동 음란물)입니다.Unsupported image, for example, child pornography. |
InvalidDetails |
지원되지 않는 도메인 특정 모델입니다.Unsupported domain-specific model. |
와 유사한 오류가 발생 하는 경우 "One or more skills are invalid. Details: Error in skill #<num>: Outputs are not supported by skill: Landmarks"
경로를 확인 합니다.If you get the error similar to "One or more skills are invalid. Details: Error in skill #<num>: Outputs are not supported by skill: Landmarks"
, check the path. 유명인와 랜드마크는 둘 다의 속성 detail
입니다.Both celebrities and landmarks are properties under detail
.
"categories":[
{
"name":"building_",
"score":0.97265625,
"detail":{
"landmarks":[
{
"name":"Forbidden City",
"confidence":0.92013400793075562
}
]