Learning Wizard

Process of Using Index SDK

As shown in Figure 1, feature retrieval using Index SDK can be divided into the following steps.

Figure 1 Process of using Index SDK
  1. Install and deploy Index SDK.
    1. For details about hardware forms and systems supported by Index SDK, see Supported Hardware and Operating Systems.
    2. For details about the deployment and installation of related dependencies, see Dependency Installation.
    3. For details about how to obtain and verify the Index SDK package, see Downloading the Index SDK Package.
    4. For details about how to install and deploy Index SDK, see Installing Index SDK..
  2. Determine the retrieval type and algorithm.

    Understand the retrieval types supported by Index SDK and the algorithms contained in each retrieval type, including the application scenarios of each algorithm, operators to be generated, and examples. Then, determine the retrieval type and algorithm based on service requirements. For details, see Algorithm Introduction.

  3. Generate operators.

    Generate the operators required by the algorithm. For details, see Generating Operators.

  4. Call APIs to execute the algorithm and obtain the retrieval result. For details, see API Reference.

Instructions

  • The current Index SDK FeatureRetrieval is developed and adapted based on the Ascend AI Processor and Facebook AI Similarity Search (Faiss). The compatibility with any other hardware or heterogeneous computing platform is not described in this document.
  • The deployment mode of FeatureRetrieval is implemented based on AscendCL APIs. The aclInit API has been called internally, and you do not need to call it again.
  • The actual memory size of an Ascend AI Processor-powered device determines the maximum database capacity supported by a single index (corresponding to a database). The number of indexes needs to be set based on service requirements to prevent memory usage from exceeding the threshold. You are advised to create less than 10,000 indexes. If the number of indexes exceeds 10,000, a large number of memory fragments will be generated. As a result, the capacity for the add operation may be less than the expected value.