Identification acceleration system and method for edge image
Technical Field
The invention relates to the field of video processing, in particular to a system and a method for identifying and accelerating an edge image.
Background
Most of large-scale image recognition systems adopt a cloud end to process large-scale image recognition algorithms, the system brings larger delay and higher cost, and some edge image recognition systems can only process small-scale image recognition algorithms in real time, so that the energy consumption is high and the real-time performance is poor.
Disclosure of Invention
The invention aims to solve the technical problem of providing a system and a method for identifying and accelerating an edge image, which can realize a large-scale image identification algorithm at an edge.
In order to solve the technical problem, the technical scheme adopted by the invention is as follows: the utility model provides a discernment accelerating system for marginal end image, including MPSOC and FPGA, MPSOC includes the PS end, PL end and high-speed interface, the PS end includes video preprocessing module, the image detection module, face identification preprocessing module, the MTCNN module, face matching module and control management module, the PL end includes face identification preprocessing module and MTCNN module, FPGA includes the control interface, data analysis module and mobilefacenet module, video preprocessing module links to each other with the image detection module, the image detection module links to each other with the face identification preprocessing module of PS end and PL end respectively, face identification preprocessing module links to each other with the MTCNN module, the MTCNN module passes through the data analysis module of high-speed interface with FPGA, data analysis module and mobilefacenet module, mobilefacenet module passes through high-speed interface and face matching module, face matching module links to each other with the DDR that the storage has the image characteristic to link to each other simultaneously.
Furthermore, the number of the FPGAs connected with the MPSOC is more than two.
Further, the high-speed interface is an srio interface or an Aurora interface.
The invention also discloses an identification acceleration method for the edge images, which comprises the following steps: s01), the video preprocessing module preprocesses the video image entering the MPSOC; s02), the image detection module marks the preprocessed video images, evaluates whether the PS terminal processor can meet the required real-time performance according to the number of the images, and inputs the images preprocessed by the video to the face recognition preprocessing module and the MTCNN module of the PL terminal for processing when the next frame of video image is processed if the images can not meet the required real-time performance; s03), dividing the numbered N images into M groups by a face recognition preprocessing module, wherein each group comprises N/M images, M, N is a positive integer, M is more than or equal to 2, and N is more than M, then forming M groups of data frames by the M groups of images according to labels, and respectively sending the M groups of data frames to M FPGAs through high-speed interfaces; s04), the data analysis module in the FPGA strips the image data from the received data frame, and then transmits the image data to the mobility network module; s05) the mobilefacenet module carries out image recognition on the received image data, and the generated image feature vectors are formed into frames with a certain format and sent back to the MPSOC through the high-speed interface; s06), the MPSOC receives the image feature vector frame returned by the mobile facenet module, and the image feature vector frame is unframed and then sent to the face matching module at the PS end; s07), the face matching module compares the image feature vector identified by the mobility facenet module with the image feature vector in the DDR storage database to obtain an image identification result, and the result is displayed through a video.
Furthermore, the number of the FPGAs connected with the MPSOC is more than two.
Further, the high-speed interface is an srio interface or an Aurora interface.
Further, frames sent to the FPGA by the MPSOC and returned to the MPSOC by the FPGA are image data plus a header flag and a crc check bit, and the data parsing module strips the image data by removing the added header flag and crc check bit, so that only the image data is left.
Furthermore, the video preprocessing module cuts and shapes the image.
The invention has the beneficial effects that: the invention takes FPGA and MPSOC as core processors, wherein in order to reach the real-time requirement of image recognition, the FPGA is taken as the core to realize the image recognition algorithm, the MPSOC chip comprises a multi-core Processor (PS), a GPU and PL logic, and the MPSOC realizes the functions of monitoring management, video preprocessing, image detection processing selection, image detection algorithm, image matching, image recognition preprocessing and the like. The system has strong neural network computing power, does not need to transmit large-scale image information to a cloud for identification, and has the advantages of high real-time performance, strong expandability and low power consumption.
Drawings
Fig. 1 is a schematic block diagram of the system described in embodiment 1.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments.
Example 1
The embodiment discloses an identification acceleration system for edge images, which comprises an MPSOC and an FPGA, wherein the MPSOC comprises a PS terminal, a PL terminal and a high-speed interface, the PS terminal comprises a video preprocessing module, an image detection module, a face identification preprocessing module, an MTCNN module, a face matching module and a monitoring management module, the PL terminal comprises a face identification preprocessing module and an MTCNN module, the FPGA comprises a control interface, a data analysis module and a mobilefacenet module, the video preprocessing module is connected with the image detection module, the image detection module is respectively connected with the face recognition preprocessing modules of the PS end and the PL end, the face recognition preprocessing module is connected with the MTCNN module, the MTCNN module is connected with the data analysis module of the FPGA through a high-speed interface, the data analysis module is connected with the mobility module, the mobility module is connected with the face matching module through a high-speed interface, and the face matching module is simultaneously connected with the DDR (double data rate) which stores image features and is connected with the DDR.
In this embodiment, the number of FPGAs connected to the MPSOC is two or more, and the number of connected FPGAs is determined according to the number of images to be processed. The system can be expanded according to the number of the predicted images, more FPGAs are added to accelerate the larger-scale image recognition algorithm, and the real-time performance of image recognition is guaranteed.
In this embodiment, the high-speed interface is an srio interface or an Aurora interface.
Example 2
The embodiment discloses an identification acceleration method for an edge image, which comprises the following steps: s01), the video preprocessing module preprocesses the video image entering the MPSOC; s02), the image detection module marks the preprocessed video images, evaluates whether the PS terminal processor can meet the required real-time performance according to the number of the images, and inputs the images preprocessed by the video to the face recognition preprocessing module and the MTCNN module of the PL terminal for processing when the next frame of video image is processed if the images can not meet the required real-time performance; s03), the face recognition module divides the numbered N images into M groups, each group comprises N/M images, M, N is a positive integer, M is more than or equal to 2, N is more than M, then the M groups of images form M groups of data frames according to the labels, and the M groups of data frames are respectively sent to M FPGAs through high-speed interfaces; s04), the data analysis module in the FPGA strips the image data from the received data frame, and then transmits the image data to the mobility network module; s05) the mobilefacenet module carries out image recognition on the received image data, and the generated image feature vectors are formed into frames with a certain format and sent back to the MPSOC through the high-speed interface; s06), the MPSOC receives the image feature vector frame returned by the mobile facenet module, and the image feature vector frame is unframed and then sent to the face matching module at the PS end; s07), the face matching module compares the image feature vector identified by the mobility facenet module with the image feature vector in the DDR storage database to obtain an image identification result, and the result is displayed through a video.
In this embodiment, the number of FPGAs connected to the MPSOC is two or more.
In this embodiment, the high-speed interface is an srio interface or an Aurora interface.
In this embodiment, frames sent by the MPSOC to the FPGA and returned by the FPGA to the MPSOC are image data plus a header flag and a crc check bit, and the data parsing module strips the image data is to remove the added header flag and crc check bit, so that only the image data is left.
In this embodiment, the video preprocessing module performs clipping and shaping on the image.
The invention takes FPGA and MPSOC as core processors, wherein in order to reach the real-time requirement of image recognition, the FPGA is taken as the core to realize the image recognition algorithm, the MPSOC chip comprises a multi-core Processor (PS), a GPU and PL logic, and the MPSOC realizes the functions of monitoring management, video preprocessing, image detection processing selection, image detection algorithm, image matching, image recognition preprocessing and the like. The system has strong neural network computing power, does not need to transmit large-scale image information to a cloud for identification, and has the advantages of high real-time performance, strong expandability and low power consumption.
The foregoing description is only for the basic principle and the preferred embodiments of the present invention, and modifications and substitutions by those skilled in the art are included in the scope of the present invention.