Image Search
The image search connector is used to connect to the Huawei Cloud Image Search.
Image Search leverages deep learning and image recognition technologies to deliver service- and industry-specific feature vectorization and search capabilities. It helps your search of exact or fuzzy match images from the specified gallery.
Creating an Image Search Connection
- Log in to the new ROMA Connect console.
- In the navigation pane on the left, choose Connector. On the page displayed, click New Connection.
- Select the image search connector.
- In the dialog box displayed, configure the connector and click OK.
Parameter
Description
Name
Enter the connector instance name.
App Key
Access key ID (AK) of the current account. Obtain the AK by referring to Access Keys. If an AK/SK pair has been generated, find the downloaded AK/SK file (such as credentials.csv).
App Secret
Secret access key (SK) of the current account. Obtain the SK by referring to Access Keys. If an AK/SK pair has been generated, find the downloaded AK/SK file (such as credentials.csv).
Description
Enter the description of the connector to identify it.
Action
- Deleting data
- Updating data
- Checking data
- Search
- Adding data
Configuration Parameters
Parameter |
Description |
---|---|
project_id |
Project ID. |
service_name |
Name of a service instance, which is specified when creating a service instance. |
region_id |
Region ID. |
force |
Whether the deletion is idempotent. The default value is false. This parameter is valid only for the deletion of a specified ID.
|
item_id |
ID of a service instance. The value is a string of [1, 256] characters. At least one of item_id, custom_tags, and custom_num_tags must be specified to delete data in a service instance by specified ID or condition. If item_id is specified, data is deleted by specified ID. If item_id is not specified, data is deleted by condition. |
custom_tags |
User-defined character tag, which is used to delete data in a service instance by condition. The format is key-value pair.
|
custom_num_tags |
User-defined number tag, which is used to delete data in a service instance by the custom_num_tags condition. The format is key-value pair.
|
from |
Lower bound of the value (inclusive by default). |
to |
Upper bound of the value (inclusive by default). |
Parameter |
Description |
---|---|
project_id |
Project ID. |
service_name |
Name of a service instance, which is specified when creating a service instance. |
region_id |
Region ID. |
item_id |
ID of a service instance. The value is a string of [1, 256] characters. |
decs |
Description of the data. The value is a string of [1, 2048] characters. |
custom_tags |
User-defined character tag, which is used for condition-based filtering. The format is key-value pair.
|
custom_num_tags |
User-defined number tag, which is used for condition-based filtering. The format is key-value pair.
|
Parameter |
Description |
---|---|
project_id |
Project ID. |
service_name |
Name of a service instance, which is specified when creating a service instance. |
region_id |
Region ID. |
item_id |
ID of a service instance. The value is a string of [1, 256] characters. At least one of item_id, custom_tags, and custom_num_tags must be specified to delete data in a service instance by specified ID or condition. If item_id is specified, data is deleted by specified ID. If item_id is not specified, data is deleted by condition. |
limit |
Number of returned check results. The default value is 10. The value range is [1, 100]. This parameter is valid only for condition checks. |
last_item |
Sorting information about the last check result of the previous check. This parameter takes effect only for condition checks. You can use the last_item field in the result returned by the last check. |
score |
Score of the result. |
id |
Unique ID of a result. |
custom_tags |
User-defined character tag, which is used to search data in a service instance by condition. The format is key-value pair.
|
custom_num_tags |
User-defined number tag, which is used to search data in a service instance by condition. The format is key-value pair.
|
from |
Lower bound of the value (inclusive by default). |
to |
Upper bound of the value (inclusive by default). |
Parameter |
Description |
---|---|
project_id |
Project ID. |
service_name |
Name of a service instance, which is specified when creating a service instance. |
region_id |
Region ID. |
search_type |
Search type. The value must be supported by the service instance. The search type list of a service instance can be configured when the service instance is created. You can use the enumeration name or value (for example, IMAGE/0). The enumeration value may change. You are advised to use the enumeration name. |
limit |
Number of returned search results. The default value is 10. The value range is [1, 100]. |
offset |
Offset of the search result, that is, the search result whose sequence number is within [offset, offset+limit] is returned. The default value is 0, and the value range is [0, N]. By default, the search requires that offset+limit ≤ 1,000. For full retrieval, the offset must be 0. |
last_item |
Sorting information about the last research result of the previous search. This parameter is valid only in full retrieval scenarios. You can use the last_item field in the result returned by the previous search. Currently, only KEYWORD supports full retrieval. When full retrieval is used, the offset must be 0. |
score |
Score of the result. |
id |
Unique ID of a result. |
min_score |
Minimum score of the search result, which is used to filter the search result score. The value range is [0, 1]. Currently, this parameter takes effect only for the IMAGE and CATEGORY search types. |
custom_tags |
User-defined character tag, which is used for condition-based filtering. The format is key-value pair.
|
custom_num_tags |
User-defined number tag, which is used for condition-based filtering. The format is key-value pair.
|
from |
Lower bound of the value (inclusive by default). |
to |
Upper bound of the value (inclusive by default). |
image_base64 |
Base64 character string of an image file. Either this parameter or image_url must be specified. The following requirements must be met:
|
image_url |
Image file URL that can be accessed by the service. The value is a string of [1, 4096] characters. For image-based search, set either this parameter or image_base64. |
keywords |
Keyword list. The number of keywords is [1, 10], and the keyword length is [1, 64]. This parameter is mandatory when KEYWORD is used. |
optional_params |
This parameter is optional. |
do_det |
Whether to perform object detection.
|
box |
Coordinate of the target rectangular box. If this parameter is specified, the box is directly used as the target without object detection. The format is x1,y1,x2,y2 (without spaces). x1/y1 indicates the coordinates of the upper left corner of the target, and x2/y2 indicates the coordinates of the lower right corner of the target. The requirements are as follows:
|
do_cls |
Whether to perform object classification.
|
category |
Object category. If the object category is specified, the object is not classified and the category is used. For details about the category information, see the service type description. |
collapse_key |
Deduplication tag name, which must be an existing key in custom_tags of the service instance.
|
max_scan_num |
Maximum number of scanned nodes. A larger value indicates a higher query precision and slower query speed. The default value is 10000. |
nprobe |
Number of center points. A larger value indicates a higher query precision and slower query speed. The default value is 100. |
Parameter |
Description |
---|---|
project_id |
Project ID. |
service_name |
Name of a service instance, which is specified when creating a service instance. |
region_id |
Region ID. |
force |
Whether to forcibly add data.
|
item_id |
ID of a service instance. The value is a string of [1, 256] characters. |
desc |
Description of the data. The value is a string of [1, 2048] characters. |
custom_tags |
User-defined character tag, which is used for condition-based filtering. The format is key-value pair.
|
custom_num_tags |
User-defined number tag, which is used for condition-based filtering. The format is key-value pair.
|
image_base64 |
Base64 character string of an image file. Either this parameter or image_url must be specified when an image is saved to the database. The following requirements must be met:
|
image_url |
Image file URL that can be accessed by the service. The value is a string of [1, 4096] characters. When adding an image, set either this parameter or image_base64. |
keywords |
Keyword list. The number of keywords is [1, 100], and the keyword length is [1, 64]. Specify this parameter when adding data to a service instance that supports keyword search. Otherwise, a keyword is automatically generated. |
optional_params |
This parameter is optional. |
do_det |
Whether to perform object detection.
|
box |
Coordinate of the target rectangular box. If this parameter is specified, the box is directly used as the target without object detection. The format is x1,y1,x2,y2 (without spaces). x1/y1 indicates the coordinates of the upper left corner of the target, and x2/y2 indicates the coordinates of the lower right corner of the target. The requirements are as follows:
|
do_cls |
Whether to perform object classification.
|
category |
Object category. If the object category is specified, the object is not classified and the category is used. For details about the category information, see the service type description. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot