Application Scenarios

High-performance retrieval of a group of vectors is often required in the statistics and data mining tasks of massive data, such as dataset preprocessing, clustering, system recommendation, and pattern analysis.

In applications such as vector retrieval, convolutional neural networks are used to extract deep features to obtain semi-structured feature vectors. Similarity between feature vectors is calculated to retrieve specific objects. For example, you can build a base library based on feature vectors extracted from an image library, apply the same neural network to extract deep features from the target images to generate vectors to be queried, and compare the target vectors with feature vectors in the base library. If they are highly similar, it is considered that matched targets are retrieved in the base library. The retrieval result is obtained after target vectors of a specific quantity are sorted.

Currently, the mxIndex FeatureRetrieval component supports a maximum of eight Atlas 300I inference cards or Atlas 300I Pro inference cards at the same time.

  • Supported hardware environments
    • Atlas 800 inference server (model 3000)
    • Atlas 800 inference server (model 3010)
    • Atlas 500 Pro AI edge server
    • Atlas 300I Pro inference card
    • Atlas 300V Pro video analysis card
  • OS
    • CentOS 7.6
    • Ubuntu 18.04
    • openEuler release 20.03

Instructions

  • FeatureRetrieval is designed based on the CANN open form, and the actual retrieval service runs on an Ascend device. For details about the service memory resource control on the device, see CANN Software Installation (Open Form, Atlas inference products). According to the service requirements, Out Of Memory (OOM) Killer is enabled.
  • The feature base library of retrieval services is stored in the DDR of the Ascend AI Processors. The temporary service memory and system memory determine the total memory usage when the feature dimensions and quantities are imported into the library, queried, and calculated. If the input is large, OOM Killer will be triggered, causing device program exceptions. The actual memory size of an Ascend device determines the maximum library capacity supported by a single index. The number of indexes needs to be set based on service requirements to prevent memory usage from exceeding the threshold.
  • In feature retrieval, if the number of resources on the Ascend device used by the index algorithm exceeds the limit (for example, excessive base library data is added and retrieved), data errors of the index algorithm may occur on a specific processor and exceptions are thrown on the host. Especially when the OOM error occurs, the service may be unavailable for a short period of time. However, the feature retrieval function can be restored within one minute (the data needs to be imported to the library again). For more information, contact Huawei technical support.