Image recognition method and device

By deploying offline models on the 5G module and combining distributed data collection and centralized training, the real -time and accuracy of image recognition in the security scene is solved, and high -efficiency and secure image recognition effects are achieved.

CN119360153APending Publication Date: 2025-01-24CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411385314.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing deep learning-based image recognition methods have problems with data transmission delay, resource limitation and privacy risks in security scenarios, and it is difficult to meet the needs of real-time and accuracy.

Method used

Through training offline models and deploying them on 5G models, combined with distributed data collection and centralized training to achieve real -time and efficient image recognition. The 5G module integrates the image analysis module for image collection, pre -processing, coding and compression, and separation, extracts the characteristics of the target image, and enters the offline model for identification and matching. When an abnormal situation or alarm value occurs, send the analysis results to the platform or alarm point.

Benefits of technology

It improves the response speed and performance of image recognition, reduces data transmission delays and privacy risks, saves network bandwidth resources, and enables efficient model deployment in resource-constrained edge terminal environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360153A_ABST
    Figure CN119360153A_ABST
Patent Text Reader

Abstract

The invention relates to an image recognition method and device, and belongs to the technical field of image recognition, and the method comprises the steps: training an offline model; deploying the offline model in a 5G module; deploying the 5G module in a security scene; an image analysis module in the 5G module processes the image in the security scene to obtain a target image, and extracts features of the target image; inputting the features of the target image into a separation model for identification, and performing matching to obtain an analysis result; and when an abnormal condition or an alarm value occurs in the analysis result, sending a target object image obtained by collecting an image in the security scene and the analysis result to a platform or an alarm point for processing. According to the method, the to-be-recognized target object in a large amount of image data is trained to obtain the offline model, real-time, efficient and accurate recognition is achieved, the offline model is deployed on the 5G module, deployment in a security scene is facilitated, and the effect of target recognition on the 5G module is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image recognition, and in particular relates to an image recognition method and device. Background Art

[0002] With the rapid development and commercial deployment of 5G technology, the field of wireless communications has ushered in unprecedented development opportunities. 5G's high speed, low latency and large connection characteristics provide strong network support for various emerging applications, such as the Internet of Things (IoT), autonomous driving, smart cities, telemedicine, etc. Many industries are also upgrading their network architecture based on 5G technology to meet business needs in scenarios such as security detection and early warning. The new network architecture requires higher transmission rates, lower latency and higher network capacity, and can support more concurrent users and devices with more complex business scenarios. Therefore, a solution design based on high-performance 5G wireless communication modules is proposed, which can adapt to diverse application scenarios through flexible customized development to achieve stable and reliable data transmission.

[0003] In the field of image recognition, deep learning technology has been widely used in recent years to complete classification and recognition tasks. Traditional machine learning algorithms usually manually define and extract feature quantities, and then apply relevant algorithms in the field of machine learning for calculation and analysis, such as SVM, DT, RF, etc.

[0004] At present, most of the methods based on deep learning are studied using centralized learning algorithms. The characteristic of centralized learning methods is that all collected data is uploaded to the cloud server, and the data analysis is completed on the cloud server. Uploading the perception data to the cloud for processing and analysis occupies a large amount of communication bandwidth, resulting in serious transmission delays. The real-time and timeliness of processing and analysis are difficult to meet application requirements, which brings huge pressure to both network channels and cloud resources. In the process of data transmission to the central server, certain privacy risks are increased, and sensitive information may be leaked.

[0005] With the development of edge computing technology, edge devices can also quickly access real-time data for fast machine learning model training, and new frameworks for distributed learning have been widely used, especially in IoT-related applications such as face recognition or drones. In some cases, due to privacy issues or communication and computing power limitations, direct exchange of raw data is not feasible, which has also promoted the application of distributed learning to a certain extent.

[0006] In a distributed training system environment, a model training task needs to be split into multiple subtasks and distributed to multiple computing devices to solve the resource bottleneck. However, the edge terminal devices that are always applied in the scene usually have limited computing resources, such as CPU, memory, etc., which are difficult to support the operation of complex AI models. The training tasks of the model at such an edge end are prone to reduce the recognition accuracy. In addition, when the network connection is unstable in the edge environment, there will be delays and uncertainties in the update of the model and the transmission of data. Combining the characteristics of centralized and distributed networks, mobility and convenience need to be considered in the network upgrade and transformation for security scenarios, as well as saving certain network bandwidth resources when the network connection is not good. The 5G module is designed as a device with integrated recognition and analysis functions and data transmission functions. Through centralized training and distributed recognition applications, important areas and places are monitored in real time and intelligent image analysis is performed. According to the analysis situation, the early warning function is achieved to improve the real-time, accuracy and effectiveness of security protection. Summary of the invention

[0007] In view of the above-mentioned deficiencies in the prior art, the purpose of the invention is to provide an image recognition method and device, which can obtain an offline model by training the target objects to be identified in a large amount of image data, realize real-time, efficient and accurate recognition, and deploy the offline model on a 5G module, which is not only convenient for deployment in security scenarios, but also realizes the effect of target recognition on the 5G module.

[0008] A first aspect of the present invention provides an image recognition method, comprising:

[0009] Train offline models;

[0010] Deploy the offline model on the 5G module;

[0011] Deploy 5G modules in security scenarios;

[0012] The image analysis module in the 5G module collects, pre-processes, restores, encodes and compresses the images in the security scene in sequence, and then obtains the target image and extracts the features of the target image;

[0013] Input the features of the target image into the separation model for identification and matching to obtain the analysis results;

[0014] When an abnormal situation or alarm value appears in the analysis result, the target object image and analysis result obtained by collecting the image in the security scene will be sent to the platform or alarm point for processing.

[0015] Furthermore, in the above-mentioned image recognition method, training an offline model includes:

[0016] Acquire images in security scenes;

[0017] Preprocess the images in the security scene to obtain a training set;

[0018] Establish a local computing center, build a training environment locally, select a lightweight convolutional neural network as the pre-training model, and set fine-tuning parameters;

[0019] Load the pre-trained model and weights, select the loss function and optimizer, and fine-tune the pre-trained model using the first training set;

[0020] After fine-tuning training, the pre-trained model is compressed by pruning first and then quantizing to obtain an offline model.

[0021] Furthermore, in the above-mentioned image recognition method, the offline model is deployed in the 5G module. The 5G module integrates the BP end and the AP end, uses Android based on the Linux kernel as the operating system, and the underlying architecture is a general BP module. The image analysis module is used as an application at the software layer. The offline model is deployed in the driver layer in the form of a library file, and the application is called through an API interface.

[0022] Furthermore, in the above-mentioned image recognition method, the image analysis module in the 5G module sequentially collects, pre-processes, restores, encodes and compresses, and separates the images in the security scene to obtain the target image, including:

[0023] Acquire the target object image in the security scene, and record and store the target object image;

[0024] Perform image enhancement on the target object image and adjust parameter processing;

[0025] The processed image is restored using filtering method;

[0026] Encode and compress the restored image;

[0027] The encoded and compressed image is divided into multiple areas or objects, and the target is separated from the background through the AI ​​algorithm to obtain the target image;

[0028] The parameters in the adjustment parameters include at least: brightness, color distribution and contrast.

[0029] Furthermore, in the above-mentioned image recognition method, the features extracted from the features of the target image at least include: shape, size, color and texture of the target image.

[0030] Furthermore, in the above-mentioned image recognition method, after the original information and analysis results obtained by collecting the images in the security scene are sent to the platform or the alarm point for processing, it also includes:

[0031] Delete locally stored data.

[0032] Furthermore, in the above-mentioned image recognition method, the fine-tuning parameters include at least: learning rate, training rounds, batch size, weight decay and gradient clipping; the first training set is selected from the training set; the fine-tuning training includes at least: forward propagation, loss calculation, back propagation and weight update; the fine-tuning training method is parameter efficient fine-tuning.

[0033] A second aspect of the present invention further provides an image recognition device, comprising:

[0034] Training module: used to train offline models;

[0035] The first deployment module: used to deploy the offline model on the 5G module;

[0036] The second deployment module: used to deploy the 5G module in the security scenario;

[0037] Processing module and extraction module: The image analysis module in the 5G module collects, preprocesses, restores, encodes and compresses the images in the security scene in sequence, and then obtains the target image and extracts the features of the target image;

[0038] Recognition module and matching module: used to input the features of the target image into the separation model for recognition and matching to obtain analysis results;

[0039] Sending module: When an abnormal situation or alarm value appears in the analysis result, the target object image and analysis result obtained by collecting images in the security scene will be sent to the platform or alarm point for processing.

[0040] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;

[0041] The processor is used to execute any one of the above image recognition methods by calling the program or instruction stored in the memory.

[0042] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program or an instruction, and the program or the instruction enables a computer to execute any one of the above-mentioned image recognition methods.

[0043] The beneficial effects of the present invention are as follows: The present invention proposes to apply AI recognition technology to 5G modules, combining distributed data collection and recognition with centralized training, all data are concentrated on a single node for training, and the computing resources of multiple nodes are used to process and collect storage data, thereby improving the recognition response speed and performance, allowing data to be distributed and stored and encrypted and transmitted to the platform or alarm point for processing, thereby improving data security and reducing the risk of data leakage; a combination of pruning and quantization for compressing the model, through a structured pruning and mixed precision quantization scheme, while maintaining the model performance, the model is efficiently compressed, solving the problem of model deployment in application scenarios with limited resources and high real-time requirements; a process for real-time detection, recognition analysis and early warning when the 5G module is used, setting the target object to be analyzed and identified, and then transmitting the original data and detection results to the platform or alarm point for processing according to the network signal, only transmitting and executing the results that need to be processed in a timely manner, saving network bandwidth resources, ensuring the stability of the edge organizational structure and the high priority of early warning processing under special circumstances, and proposing an applicable edge terminal module technology architecture and a solution for image recognition on the module. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0045] Figure 1 A diagram of an image recognition method provided by an embodiment of the present invention;

[0046] Figure 2 A diagram of an offline model training method provided by an embodiment of the present invention;

[0047] Figure 3 A method diagram of an image analysis module provided in an embodiment of the present invention for processing an image in a security scene to obtain a target image;

[0048] Figure 4 A diagram of an image recognition device provided by an embodiment of the present invention;

[0049] Figure 5 A schematic block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.

[0051] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0052] In the description of the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be internal communication between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

[0054] The present invention proposes an image recognition method, device, electronic device and storage medium. An offline model is obtained by training the target objects to be identified in a large amount of image data to achieve real-time, efficient and accurate recognition. The offline model is deployed on a 5G module, which is not only convenient for deployment in security scenarios, but also achieves the effect of target recognition on the 5G module.

[0055] Before introducing the embodiments of the present invention, professional terms involved in the present invention are first introduced.

[0056] Prefix Tuning method: Add learnable virtual tokens as prefix before the input. Features: Only the Prefix parameters are updated, and the rest of the Transformer is fixed. Advantages: Reduce the number of parameters that need to be updated and improve training efficiency.

[0057] Prompt Tuning method: Add prompt tokens to the input layer. Features: Simplified version of PrefixTuning, no MLP adjustment required. Advantages: As the model size increases, the effect is close to full fine-tuning.

[0058] P-Tuning method: Convert the prompt into a learnable embedding layer and process it with MLP+LSTM. Features: Solve the impact of the prompt structure on the downstream task effect. Advantages: Provide greater flexibility and stronger representation ability.

[0059] P-Tuning v2 method: Add prompt tokens in multiple layers. Features: Increase the number of learnable parameters, which has a more direct impact on model predictions. Advantages: Achieve better performance on different tasks and model sizes.

[0060] Adapter Tuning method: Design the Adapter structure and embed it into the Transformer. Features: Only the newly added Adapter structure is fine-tuned, and the original model parameters are fixed. Advantages: Maintaining high efficiency while introducing a small number of additional parameters.

[0061] LoRA method: Introducing low-rank matrices in the matrix multiplication module to simulate full fine-tuning. Features: Updates the key low-rank dimensions in the language model. Advantages: Achieves efficient parameter adjustment and reduces computational complexity.

[0062] AP: Application Processor, also known as application processor, is the main processor in the mobile phone, responsible for running various applications, such as games, social software, browsers, etc. The AP side is generally composed of CPU, GPU, memory, etc., and is used to handle the calculation and graphics processing tasks of various mobile phone applications.

[0063] BP: Baseband Processor, also known as baseband processor, is the communication module in the mobile phone, responsible for processing the communication functions between the mobile phone and the network, including signal modulation and demodulation, data transmission, telephone communication, etc. The BP end includes components such as modem, RF front end, power amplifier, etc., which are used to support the communication functions of the mobile phone.

[0064] Method Embodiment

[0065] Figure 1 A diagram of an image recognition method provided by an embodiment of the present invention.

[0066] In a first aspect of the present invention, an image recognition method is proposed, combining Figure 1 , including six steps from S1 to S6:

[0067] S1: Train offline model.

[0068] Specifically, in an embodiment of the present invention, a method for training an offline model is described in detail below.

[0069] S2: Deploy the offline model on the 5G module.

[0070] Specifically, in an embodiment of the present invention, deploying the offline model in the 5G module is to deploy the offline model in the form of a library file in the driver layer of the 5G module.

[0071] S3: Deploy 5G modules in security scenarios.

[0072] Specifically, in an embodiment of the present invention, a 5G module is deployed in a security scenario to identify targets in the security scenario, such as aircraft, mobile detectors, etc., through wireless communication.

[0073] S4: The image analysis module in the 5G module collects, preprocesses, restores, encodes and compresses the images in the security scene in sequence, and then obtains the target image and extracts the features of the target image.

[0074] Specifically, in an embodiment of the present invention, the image analysis module in the 5G module sequentially collects, pre-processes, restores, encodes and compresses, and separates images in the security scene to obtain a target image. The method for extracting features of the target image is described in detail below.

[0075] S5: Input the features of the target image into the separation model for identification and matching to obtain analysis results.

[0076] Specifically, in the embodiment of the present invention, the features of the target image are input into the separation model for identification and matching to determine whether there are abnormal situations or alarm values.

[0077] S6: When an abnormal situation or alarm value appears in the analysis result, the target object image and the analysis result obtained by collecting the image in the security scene are sent to the platform or alarm point for processing.

[0078] Specifically, in an embodiment of the present invention, the 5G module locally analyzes the results of image and video data recognition to determine whether an abnormal situation or alarm value occurs. If an abnormal situation or alarm value occurs, the analysis result is immediately sent to the platform or alarm point. The platform or alarm point verifies and initiates early warning measures. The platform and alarm processing point perform corresponding actions based on the received information.

[0079] In some embodiments, the target object to be detected is identified, the original images taken and recorded are stored locally, the original data is encrypted through a symmetric encryption algorithm, and prepared for transmission when the network broadband environment is good to reduce the risk of data leakage. Multiple 5G modules are deployed for data collection, and finally the data is collected into an offline model for integration and processing.

[0080] Figure 2 A diagram of an offline model training method provided in an embodiment of the present invention.

[0081] Furthermore, in the above-mentioned image recognition method, the offline model is trained and combined with Figure 2 , including five steps from S21 to S25:

[0082] S21: Acquire an image in a security scene.

[0083] Specifically, in the embodiment of the present invention, relevant high-quality images in the security scene are acquired.

[0084] S22: Preprocess the images in the security scene to obtain a training set.

[0085] Specifically, in the embodiment of the present invention, the training set is obtained by preprocessing the relevant high-quality images in the security scene manually or by an algorithm through steps such as data cleaning, data classification, and data labeling.

[0086] S23: Establish a local computing center, build a training environment locally, select a lightweight convolutional neural network as the pre-training model, and set fine-tuning parameters.

[0087] Specifically, in an embodiment of the present invention, a local computing center is established, a training environment is set up locally, a lightweight convolutional neural network is selected as a pre-training model, and fine-tuning parameters are set. The fine-tuning parameters include hyperparameters such as learning rate, training rounds (epochs), and batch size (batch size); other hyperparameters are set as needed, such as weight attenuation, gradient clipping, etc.

[0088] Here, lightweight neural networks reduce the requirements for storage space and improve the running speed through methods such as manual design, neural structure search or automated machine learning. An improved version of CNN, lightweight convolutional neural networks, is selected. While maintaining model performance, it greatly reduces the model size, improves the model speed, and effectively reduces the model's computational and storage load, which is more conducive to mobile and IoT applications.

[0089] S24: Load the pre-trained model and weights, select the loss function and optimizer, and use the first training set to fine-tune the pre-trained model.

[0090] Specifically, in the embodiment of the present invention, after loading the pre-trained model and weights, the model can be modified as necessary according to the task requirements, such as changing the output layer; selecting a suitable loss function and optimizer. Fine-tuning training is performed using the selected first data set, and the fine-tuning training includes forward propagation, loss calculation, back propagation, and weight update.

[0091] The method of fine-tuning training in the present invention is: efficient parameter fine-tuning. Efficient parameter fine-tuning achieves efficient transfer learning by minimizing the number of fine-tuning parameters and computational complexity. Efficient parameter fine-tuning only updates some parameters in the model, significantly reducing training time and cost, and is suitable for situations with limited computing resources. Efficient parameter fine-tuning technologies include Prefix Tuning, Prompt Tuning, P-Tuning method, P-Tuning v2 method, Adapter Tuning and other methods, which can be flexibly selected according to task and model requirements; according to the usage scenarios in the case and the characteristics of various methods of efficient parameter fine-tuning technology, the LoRA method can also be used for model parameter fine-tuning.

[0092] S25: After fine-tuning training, the pre-trained model is compressed by pruning first and then quantizing to obtain an offline model.

[0093] Specifically, in the embodiment of the present invention, due to the deployment on the 5G module, its lightweight installation and mobility characteristics lead to certain limitations in terms of memory, performance, etc. After the model is fine-tuned, a model compression method is required to compress the model with high resource consumption into a lightweight model with acceptable performance loss; the model compression method compresses the model by pruning first and then quantizing.

[0094] Here, although a single compression method has a good compression effect, it still has some limitations. Joint compression can give full play to the advantages of different compression methods and obtain a more extreme compression rate while maintaining network accuracy. Commonly used combinations are mainly divided into three categories: "knowledge distillation + pruning", "knowledge distillation + quantization" and "pruning + quantization". The combination of knowledge distillation and pruning and quantization has a long training cycle and high cost. Considering the amount of calculation, the model is compressed by pruning first and then quantizing.

[0095] Pruning is done by using the TensorFlow model pruning tool Tfmot. The TensorFlow model pruning tool Tfmot can provide functions including weight pruning, structured pruning, pruning callback, fine-tuning, quantization, etc. Using this tool to prune the model can improve efficiency and save resources. The present invention chooses to use the structured pruning function and adopts the method proposed in the paper [1]. The parameters to be pruned are determined by sorting the filters in each layer according to the L1 value (L1 norm refers to the sum of the absolute values ​​of each element in the vector), and then a fixed number of low-norm filters are deleted from each layer. The number of filters to be pruned is determined by a hyperparameter, which is called the pruning rate. The higher the pruning rate, the more redundant parameters are pruned in the representation model, and the smaller the number of parameters of the model, thereby reducing the complexity and computational complexity of the model. In practical applications, it is adjusted according to the desired effect. In the present invention, quantization is performed by using the mixed precision quantization method proposed in the paper [2]. By simulating the forward propagation of quantization and the back propagation of gradient approximation, the model parameters are optimized during the training process, so that the model adapts to the quantized representation.

[0096] [1]H.Li,A.Kadav,I.Durdanovic,H.Samet,and HPGraf, "Pruning filters for efficient convnets," 2017

[0097] [2]Wan-Ting Chang, Chih-Hung Kuo, and Li-Chun Fang "Variational ChannelDistribution Pruning and Mixed-Precision Quantization for Neural NetworkModel Compression", 2024

[0098] In some embodiments, when no abnormal situation or alarm value occurs and the network bandwidth is good, the original images taken and recorded and the analysis results are transmitted to the platform for effect evaluation and verification, and manual evaluation and verification are performed. The newly taken and recorded original images are re-preprocessed to achieve gradual optimization of the offline model.

[0099] Furthermore, in the above-mentioned image recognition method, the offline model is deployed in the 5G module. The 5G module integrates the BP end and the AP end, uses Android based on the Linux kernel as the operating system, and the underlying architecture is a general BP module. The image analysis module is used as an application at the software layer. The offline model is deployed in the driver layer in the form of a library file, and the application is called through an API interface.

[0100] Specifically, in the embodiment of the present invention, the BP module includes: a radio frequency chip, a baseband chip, filtering, a power amplifier, a storage memory, a power supply, an image acquisition device and other devices, and the image analysis module is composed of an image acquisition unit, an intelligent analysis and detection unit, a signal transmission and equipment control unit.

[0101] Figure 3 A diagram of a method for an image analysis module provided in an embodiment of the present invention to process an image in a security scene to obtain a target image.

[0102] Furthermore, in the above-mentioned image recognition method, the image analysis module in the 5G module collects, pre-processes, restores, encodes and compresses, and separates the images in the security scene to obtain the target image. Figure 3 , including five steps from S31 to S35:

[0103] S31: Acquire the target object image in the security scene, and record and store the target object image.

[0104] Specifically, in the embodiment of the present invention, a camera is used to capture images of target objects in a scene, such as an aircraft or a mobile detector, and the scene is sampled at a specific frequency and recorded and stored.

[0105] S32: Perform image enhancement on the target object image and adjust parameter processing.

[0106] Specifically, in the embodiment of the present invention, the target object image is enhanced to reduce the noise of the image in the image, and the adjustment parameters are to adjust the brightness, color distribution, contrast and other parameters of the image.

[0107] S33: Restoring the processed image using a filtering method.

[0108] Specifically, in the embodiment of the present invention, image restoration mainly uses a filtering method to restore the original image from a degraded image.

[0109] S34: Encode and compress the restored image.

[0110] Specifically, in the embodiment of the present invention, image encoding and compression reduce the amount of redundant data and memory capacity of the image, increase the transmission and processing speed, and prepare for subsequent image separation.

[0111] S35: Divide the encoded and compressed image into multiple regions or objects, and separate the target from the background through an AI algorithm to obtain a target image.

[0112] Specifically, in the embodiment of the present invention, the image is divided into multiple regions or objects, and the target is separated from the background through AI algorithm recognition.

[0113] The parameters in the adjustment parameters include at least: brightness, color distribution and contrast.

[0114] Furthermore, in the above-mentioned image recognition method, the features extracted from the features of the target image at least include: shape, size, color and texture of the target image.

[0115] Specifically, in the embodiment of the present invention, features of the target image are extracted, stored, and subsequently recognized and matched using an offline model.

[0116] Furthermore, in the above-mentioned image recognition method, after the original information and analysis results obtained by collecting the images in the security scene are sent to the platform or the alarm point for processing, it also includes:

[0117] Delete locally stored data.

[0118] Specifically, in an embodiment of the present invention, the 5G module may delete locally stored data and clear space to ensure sufficient storage space.

[0119] Device Embodiment

[0120] Figure 4 A diagram of an image recognition device provided in an embodiment of the present invention.

[0121] A second aspect of the present invention further provides an image recognition device, comprising:

[0122] Training module 41: used for training offline models.

[0123] Specifically, in the embodiment of the present invention, the offline model is trained by the training module 41.

[0124] The first deployment module 42 is used to deploy the offline model in the 5G module.

[0125] Specifically, in the embodiment of the present invention, the first deployment module 42 deploys the offline model in the 5G module by deploying the offline model in the form of a library file in the driver layer of the 5G module.

[0126] The second deployment module 43 is used to deploy the 5G module in the security scenario.

[0127] Specifically, in an embodiment of the present invention, the second deployment module 43 deploys the 5G module in the security scene, and identifies targets in the security scene such as aircraft, mobile detectors, etc. through wireless communication.

[0128] Processing module 44 and extraction module 45: The image analysis module in the 5G module collects, pre-processes, restores, encodes and compresses, and separates the images in the security scene in sequence to obtain the target image and extract the features of the target image.

[0129] Specifically, in the embodiment of the present invention, the processing module 44 in the 5G module sequentially collects, pre-processes, restores, encodes and compresses, and separates the images in the security scene to obtain a target image, and the extraction module 45 extracts features of the target image.

[0130] The recognition module 46 and the matching module 47 are used to input the features of the target image into the separation model for recognition and matching to obtain analysis results.

[0131] Specifically, in the embodiment of the present invention, the features of the target image are input into the recognition module 46 and the matching module 47 in the separation model for recognition and matching to determine whether there are abnormal conditions or alarm values.

[0132] The sending module 48 is used to send the target object image and the analysis result obtained by collecting the image in the security scene to the platform or the alarm point for processing when an abnormal situation or an alarm value appears in the analysis result.

[0133] Specifically, in the embodiment of the present invention, the 5G module locally analyzes the results of image and video data recognition to determine whether an abnormal situation or alarm value occurs. If an abnormal situation or alarm value occurs, the analysis result is immediately transmitted to the platform or alarm point through the sending module 48. The alarm point verifies and initiates early warning measures, and the platform and alarm processing point perform corresponding actions based on the received information.

[0134] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;

[0135] The processor is used to execute any one of the above image recognition methods by calling the program or instruction stored in the memory.

[0136] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program or an instruction, and the program or the instruction enables a computer to execute any one of the above-mentioned image recognition methods.

[0137] Figure 5 It is a schematic block diagram of an electronic device provided by an embodiment of the present invention.

[0138] like Figure 5 As shown, the electronic device includes: at least one processor 501, at least one memory 502 and at least one communication interface 503. The various components in the electronic device are coupled together through a bus system 504. The communication interface 503 is used to transmit information between external devices. It can be understood that the bus system 504 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 504 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 504 .

[0139] It can be understood that the memory 502 in this embodiment can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.

[0140] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system and application programs.

[0141] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. A program that implements any of the image recognition methods provided in an embodiment of the present invention can be included in the application.

[0142] In an embodiment of the present invention, the processor 501 calls a program or instruction stored in the memory 502, specifically, a program or instruction stored in an application, and the processor 501 is used to execute the steps of each embodiment of an image recognition method provided in an embodiment of the present invention.

[0143] Train offline models;

[0144] Deploy the offline model on the 5G module;

[0145] Deploy 5G modules in security scenarios;

[0146] The image analysis module in the 5G module collects, pre-processes, restores, encodes and compresses the images in the security scene in sequence, and then obtains the target image and extracts the features of the target image;

[0147] Input the features of the target image into the separation model for identification and matching to obtain the analysis results;

[0148] When an abnormal situation or alarm value appears in the analysis result, the target object image and analysis result obtained by collecting the image in the security scene will be sent to the platform or alarm point for processing.

[0149] Any of the methods of image recognition provided in the embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 501 or instructions in the form of software. The above-mentioned processor 501 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0150] The steps of any method in the image recognition method provided in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software units in the decoding processor. The software unit can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with its hardware.

[0151] Those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.

[0152] Those skilled in the art will appreciate that the description of each embodiment has its own emphasis, and for parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

[0154] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. An image recognition method, characterized in that: include: Train offline models; Deploy the offline model on the 5G module; Deploy the 5G module in a security scenario; The image analysis module in the 5G module collects, pre-processes, restores, encodes and compresses, and separates the images in the security scene to obtain the target image and extract the features of the target image; Input the features of the target image into the separation model for identification and matching to obtain analysis results; When an abnormal situation or alarm value appears in the analysis result, the target object image and analysis result obtained by collecting the image in the security scene will be sent to the platform or alarm point for processing.

2. An image recognition method according to claim 1, characterized in that: The training of the offline model comprises: Acquire images in security scenes; Preprocessing the images in the security scene to obtain a training set; Establish a local computing center, build a training environment locally, select a lightweight convolutional neural network as the pre-training model, and set fine-tuning parameters; Load the pre-trained model and weights, select the loss function and optimizer, and fine-tune the pre-trained model using the first training set; After fine-tuning training, the pre-trained model is compressed by pruning first and then quantizing to obtain an offline model.

3. An image recognition method according to claim 1, characterized in that: The offline model is deployed in the 5G module. The 5G module integrates the BP end and the AP end, uses Android based on the Linux kernel as the operating system, and the underlying architecture is a general BP module. The image analysis module is used as an application at the software layer. The offline model is deployed in the driver layer in the form of a library file, and the application is called through an API interface.

4. The image recognition method according to claim 1, characterized in that: The image analysis module in the 5G module collects, pre-processes, restores, encodes, compresses, and separates images in the security scene to obtain the target image, including: Acquire the target object image in the security scene, and record and store the target object image; Performing image enhancement on the target object image and adjusting parameter processing; The processed image is restored using filtering method; Encode and compress the restored image; The encoded and compressed image is divided into multiple areas or objects, and the target is separated from the background through the AI ​​algorithm to obtain the target image; The parameters in the adjustment parameters include at least: brightness, color distribution and contrast.

5. The image recognition method according to claim 1, characterized in that: The features of the target image to be extracted include at least: shape, size, color and texture of the target image.

6. An image recognition method according to claim 1, characterized in that: After the original information and analysis results obtained by collecting the images in the security scene are sent to the platform or the alarm point for processing, the method further includes: Delete locally stored data.

7. An image recognition method according to claim 2, characterized in that: The fine-tuning parameters include at least: learning rate, training rounds, batch size, weight decay and gradient clipping; The first training set is selected from the training set; The fine-tuning training at least includes: forward propagation, loss calculation, back propagation and weight update; The fine-tuning training method is efficient parameter fine-tuning.

8. An image recognition device, characterized in that: include: Training module: used to train offline models; The first deployment module is used to deploy the offline model in the 5G module; The second deployment module is used to deploy the 5G module in the security scenario; Processing module and extraction module: The image analysis module in the 5G module collects, preprocesses, restores, encodes and compresses the images in the security scene in sequence, and then obtains the target image and extracts the features of the target image; Recognition module and matching module: used to input the features of the target image into the separation model for recognition and matching to obtain analysis results; Sending module: When an abnormal situation or alarm value appears in the analysis result, the target object image and analysis result obtained by collecting images in the security scene will be sent to the platform or alarm point for processing.

9. An electronic device, characterized in that: include: Processor and memory; The processor is used to execute an image recognition method as claimed in any one of claims 1 to 7 by calling the program or instruction stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute an image recognition method according to any one of claims 1 to 7.

Citation Information

Cited By

  • High-myopia cataract image processing system based on image recognition

    CN120807993A