DetectScene procedure

Official Content
This documentation is valid for:

Determines the scenario that 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.

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

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
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.

Scope

Platforms  Web(.NET,.NETCore,Java), SmartDevices(Android,iOS)
Connectivity  Online

Availability

This procedure is available as of GeneXus 16.

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.