Official Content

Determines the scenario that the image is about (a city, a beach, a desert, etc.).

Parameters

Configuration

The following table resumes the configuration properties (access credentials) you must set in order to use this AI task.

  PropertyKey
ProviderType Id Key SecretKey
Alibaba - 用户AccessKey 用户AccessKey
Amazon  - Rekognition Rekognition
Baidu   视觉技术 视觉技术 视觉技术
Google  - Cloud Vision API -
IBM  - - -
Microsoft  - Computer Vision  -
MLKit ML Kit API ML Kit API -
SAP  - - -
Tencent  场景识别 场景识别 -

Sample

Taking the following image input, the table below shows the scenarios are identified for each provider (as a JSON structure) and the time it takes for processing it.

GeneXusAI - Image module - Sample

 

Provider Output Benchmark
Alibaba
[{
	"label": "建筑",
	"confidence": 0.930
}, {
	"label": "广场",
	"confidence": 0.190
}, {
	"label": "人物",
	"confidence": 0.140
}, {
	"label": "户外",
	"confidence": 0.110
}, {
	"label": "室外",
	"confidence": 0.110
}]
4106ms
Amazon
[{
    "label": "Vacation",
    "confidence": 0.997
}, {
    "label": "Tourist",
    "confidence": 0.976
}, {
    "label": "Architecture",
    "confidence": 0.924
}, {
    "label": "Building",
    "confidence": 0.924
}, {
    "label": "Dome",
    "confidence": 0.787
}, {
    "label": "Clothing",
    "confidence": 0.715
}, {
    "label": "Monument",
    "confidence": 0.675
}, {
    "label": "People",
    "confidence": 0.610
}]
2818ms
Baidu
[{
	"label": "泰姬陵",
	"confidence": 1.000
}]
6742ms
Google
[{
    "label": "Taj Mahal",
    "confidence": 0.72149533
}]
10426ms
IBM  N/A N/A
Microsoft 
[{
    "label": "outdoor, Taj Mahal",
    "confidence": 0.985146582126618
}, {
    "label": "people",
    "confidence": 0.64453125
}]

4125ms
MLKit 
[]
1322ms
SAP  N/A N/A
Tencent 
[{
    "label": "GXAI_TCN_SCENE_193",
    "confidence": 0.974
}, {
    "label": "GXAI_TCN_SCENE_210",
    "confidence": 0.004
}, {
    "label": "GXAI_TCN_SCENE_92",
    "confidence": 0.004
}, {
    "label": "GXAI_TCN_SCENE_223",
    "confidence": 0.003
}, {
    "label": "GXAI_TCN_SCENE_65",
    "confidence": 0.002
}]
11409ms

Notes

  • The label assigned for an object depends on the provider used.
  • Maximum image file size is 10MB.
  • Tencent AI returns labels as 'GXAI_TCN_SCENE_{id}' tags, where the {id} is a numeric class provided by Tencent. You can use a Language object for mapping each tag with string label as other provider does. You can download this xpz which contains the SimplifiedChinese language object with the official mapping, and also contains the English language mapping using machine translation (it can be inaccurate). Once you import this xpz, for example, the 'GXAI_TCN_SCENE_193' label on the sample section will be translated to '清真寺外面' (or 'outside the mosque' in English) if you have set Translation type property in your environment with 'Run-time' value.
  • ML Kit requires Google Vision enabled and works on the cloud (the inference is not made on the device).

Scope

Generators: .NET.NET FrameworkJavaAppleAndroidAngular
Connectivity:  Online

Availability

This procedure is available as of GeneXus 16.



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant