Overview
Deep learning algorithms are applied in image feature searching to process each region of interest (ROI) such as a target and extract a series of high-dimensional feature vectors. The extracted feature vectors are compared against every feature vector in an existing repository to find the most similar ones. To further reduce memory footprint and compute overheads, the long feature vectors in floating-point formats are usually quantized to short feature vectors before feature comparison.
The Ascend AI Processor enables hardware-accelerated PQ short feature search and provides APIs for adding/deleting feature repositories, modifying/deleting feature vectors, and performing feature search. It supports a short feature vector of 32 bytes, a configurable number of top results to return, and the 1:N and N:M search modes. You need to prepare a short feature repository and generate ADC tables of the vectors to be searched. The following figure illustrates the basic workflow.
The following figure shows the search and comparison process.

The ADC table is a 32 KB lookup table, whose content needs to be passed to the corresponding API calls in the format of unsigned characters.