| Image recognition is one of the basic technologies of WebAR.In this application scenario,image matching technical solutions based on feature points are commonly used to compare the matching degree of feature points between the image to be recognized and the template images.Although this solution can give accurate matching results,its running speed is too slow to meet the needs of WebAR services under large-scale images.In order to solve this problem,this paper introduces image retrieval technology,which accelerates the image recognition process by greatly reducing the template images required for image matching.It works with image matching technology to provide image recognition services for the WebAR platform.Image retrieval technology includes two parts at the algorithm level,namely,image embedding algorithm and vector search algorithm.The former is used to extract the feature of pictures and convert them into fixed-length embedding vectors,and the latter is used to quickly filter out the small part of images from the embedding matrix of template images,which are most similar to the image to be recognized.In terms of image embedding algorithm,this paper uses convolutional neural network to extract image embedding to realize the mapping of natural pictures to fixed-length vectors.In this paper,by analyzing the characteristics of pictures in WebAR scenes,appropriate data augmentation methods and loss functions are designed.After completing the training process,the Top-20 recall accuracy of the model on the test set is over 90%.In terms of vector search algorithm,this paper first uses the PCA algorithm to greatly compress the image embedding dimension under the premise of little accuracy loss,which reduce memory consumption and improve the vector calculation speed.In addition,the calculation optimization method in this paper greatly reduces the time of Euclidean distance calculation and vector distance sorting.At the same time,this article also conducted experiments on a variety of approximate nearest neighbor search algorithms to explore their feasibility in WebAR scenarios.Based on the foregoing work,a complete image retrieval system suitable for WebAR scenes is constructed in this paper,which can quickly return image retrieval results even with large-scale data.In addition,in order to further improve the stability and response speed of image retrieval services,a cloud-edge collaborative service mechanism is constructed in this article,with edge services as the main and cloud services as the supplement which jointly serve the WebAR platform.Through the containerization of image retrieval services,the system scalability and migration capabilities are improved.In summary,this article focuses on improving the speed of image recognition in WebAR scenarios,which can be applied to large-scale image data.At the same time,a stable,scalable,low response time and cloud-edge collaborative image retrieval system is designed and implemented. |