| Abnormal segmentation refers to the process of separating abnormal pixels from normal parts in image-type data.Abnormal pixels are pixels that did not appear during the training process.Currently,abnormal segmentation technology has been applied in various fields,such as video monitoring,medical image analysis,and autonomous driving.With the rapid development of artificial intelligence technology and the con-tinuous innovation of technology applications,abnormal segmentation technology has made significant progress and a large number of excellent abnormal segmentation algo-rithms have emerged.However,the accuracy of abnormal segmentation still needs to be improved for existing algorithms,and most of them are difficult to deploy on mobile devices.Therefore,based on the anomaly segmentation algorithm based on prototype network,this paper improves the generation process of prototypes and post-processing of anomaly prediction,uses contrast learning to improve the differentiation of prototypes representing representing different species,and uses edge iterative smoothing to reduce the false negative rate of anomaly segmentation.Its main work is as follows:(1)The anomaly segmentation algorithm of prototype network uses the generation of prototypes representing different categories to complete the prediction of anomalies.However,the generation process of prototypes does not take into account the intraclass and inter-class measurement of prototype features,and there is no good distinction be-tween generated prototypes and prototypes,resulting in low accuracy of anomaly segmentation.In order to solve this problem,a prototype network anomaly segmentation algorithm based on contrast learning is proposed.In the process of prototype generation,the algorithm constrains the prototype feature space to reduce the spacing within the prototype feature classes and increase the distance between the classes,so that the generated prototypes can well represent the corresponding categories.Experiments on Street Hazards dataset show that the false positives of the model are reduced by 2.5% compared with the original network prediction,and the area under the precision-recall curve increased by 1.1%.(2)The prototype network-based abnormal segmentation algorithm utilizes pro-totypes generated for different categories to predict abnormalities.However,the cur-rent prototype generation process has not considered the measurement of prototype feature intra-class and inter-class differences,resulting in a lack of discrimination between generated prototypes and a decrease in abnormal segmentation accuracy.To solve this problem,this paper introduces the idea of contrastive learning to optimize the prototype generation process.By considering the similarity between prototype features and the difference between classes,the discrimination between prototypes is improved.This enables the algorithm to better differentiate between different types of abnormalities and improve the accuracy of abnormal segmentation.Experiments on the Street Hazards dataset show that compared to the original network,the model reduces false positives by 2.5% and achieves a comprehensive improvement in abnormal segmentation accuracy.(3)To fully demonstrate the deployability of the proposed algorithm,the models generated by the algorithm were deployed on Qualcomm SA9000 P and Horizon J3 embedded development boards for speed inference verification.Experimental results show that the model can be well deployed on these two embedded development boards and has strong adaptability.Moreover,the inference speed of the development board reaches over 30 frames per second,especially on the Qualcomm SA9000 P,where the model achieves a fixed-point integer operation precision inference speed of111.3 frames per second,which meets the requirements for practical deployment applications. |