Method, system and device for identifying infrared image through RGB image model and storage medium
By using a converter to convert the features of the infrared image into processable features, the RGB image model can recognize the infrared image, solving the problem of few infrared image samples and difficulty in training a high-quality infrared model, and achieving rapid and effective recognition of infrared images.
Patent Information
- Application Number
- CN202411593885.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art is difficult to train a high-quality infrared image model similar to the RGB image model, resulting in very high recognition cost of infrared images.
By using a converter, the features of the infrared image are converted into a second feature that can be processed, so that the RGB image model can recognize the infrared image. The converter is trained from paired infrared and RGB images, and can convert the features of the infrared image into a representation corresponding to the features of the RGB image.
It realizes fast and effective identification of infrared diagrams, reduces the amount of data and sample number required to train the converter, and only a small number of samples can be used to train a stable converter.
Smart Images

Figure CN119540579A_ABST
Abstract
Description
[0001] Technology Neighborhood
[0002] The present invention relates to the field of image recognition technology, and in particular to a method, system, device and storage medium for recognizing infrared images using an RGB image model. Background Art
[0003] The principle of image recognition technology is based on computer vision and machine learning algorithms. It extracts key features from images to exclude redundant information, thereby realizing automatic recognition of targets and objects of different modes. These features usually include color, texture, shape, etc., which are used for subsequent classification, recognition and other tasks.
[0004] The implementation process of image recognition technology usually includes the following steps:
[0005] Data preprocessing: The computer obtains image information through the sensor and converts it into digital signals. Then preprocessing operations such as denoising and smoothing are performed to highlight the important features in the image.
[0006] Feature extraction: Extract key features from the processed images, which will be used for subsequent classification and comparison.
[0007] Classifier design: Design a classifier based on the extracted features and obtain recognition rules through training.
[0008] Classification decision: Classify the identified objects in the feature space, and ultimately achieve accurate recognition of the target in the image.
[0009] For a specific neighborhood, the classifier and decision are relatively certain. The difference between different image models lies mainly in the feature extraction part, that is, extracting key features from the image.
[0010] Due to the huge number of RGB images, the existing RGB image model is very mature and can accurately identify various target objects. However, the number of infrared images is small, and the cost of training an infrared image model with similar accuracy to the RGB image model is very high.
[0011] The disclosure of the above background technology content is only used to assist in understanding the inventive concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention
[0012] To this end, the present invention provides a method for identifying infrared images using an existing RGB image model, which can quickly and effectively identify infrared images.
[0013] In a first aspect, the present invention provides a method for recognizing an infrared image using an RGB image model, characterized by comprising:
[0014] Step S1: extracting features of the infrared image through the RGB image model to obtain a first feature;
[0015] Step S2: Processing the first feature through a converter to obtain a second feature; wherein the converter is trained by paired infrared images and RGB images;
[0016] Step S3: Compare the second feature to obtain a comparison result.
[0017] Optionally, the method for recognizing infrared images using an RGB image model is characterized in that step S1 comprises:
[0018] Step S11: preprocessing the infrared image;
[0019] Step S12: converting the infrared image into a three-channel image;
[0020] Step S13: extracting features from the three-channel image to obtain a first feature.
[0021] Optionally, the method for recognizing infrared images using an RGB image model is characterized in that the converter comprises:
[0022] Step S21: obtaining a pair of training infrared images and training RGB images;
[0023] Step S22: extracting features from the training infrared image through the RGB image model to obtain a first training feature; extracting features from the training RGB image through the RGB image model to obtain a second training feature;
[0024] Step S23: using the first training feature as an input value of a converter and using the second training feature as a target value of the converter for training until the converter converges.
[0025] Optionally, the method for recognizing infrared images using an RGB image model is characterized in that the paired training infrared images and the training RGB images in step S21 are obtained by photographing the same target object with a depth camera.
[0026] Optionally, the method for recognizing infrared images using an RGB image model is characterized in that step S22 comprises:
[0027] Step S221: converting the training infrared image into a pseudo-color image;
[0028] Step S222: extracting features from the pseudo-color image using the RGB image model to obtain a first training feature;
[0029] Step S223: extracting features from the training RGB image using the RGB image model to obtain second training features.
[0030] Optionally, the method for recognizing infrared images using an RGB image model is characterized in that step S23 comprises:
[0031] Step S231: Select a machine learning model and determine initial parameters;
[0032] Step S232: setting the first training feature as an input value of the machine learning model, and setting the second training feature as a target value of the machine learning model;
[0033] Step S233: training the machine learning model using the paired training infrared images and the training RGB images;
[0034] Step S234: When the performance of the machine learning model reaches a certain threshold or no longer improves significantly, stop training.
[0035] Optionally, the method for recognizing infrared images using an RGB image model is characterized in that step S3 comprises:
[0036] Step S31: comparing the second feature with features in a database;
[0037] Step S32: Calculate the similarity between the second feature and each feature in the database;
[0038] Step S33: determining the comparison result between the second feature and the database according to the calculation result of the similarity.
[0039] In a second aspect, the present invention provides a system for recognizing infrared images using an RGB image model, which is used to implement any of the aforementioned methods for recognizing infrared images using an RGB image model, and is characterized by comprising:
[0040] An extraction module, used for extracting features from the infrared image through an RGB image model to obtain a first feature;
[0041] A conversion module, configured to process the first feature through a converter to obtain a second feature; wherein the converter is trained by a pair of infrared images and RGB images;
[0042] A comparison module is used to compare the second feature to obtain a comparison result.
[0043] In a third aspect, the present invention provides a device for recognizing infrared images using an RGB image model, characterized in that it includes:
[0044] processor;
[0045] a memory storing executable instructions of the processor;
[0046] Wherein, the processor is configured to execute the steps of any of the aforementioned methods for identifying infrared images using an RGB image model by executing the executable instructions.
[0047] In a fourth aspect, the present invention provides a computer-readable storage medium for storing a program, characterized in that when the program is executed, the steps of any of the aforementioned methods for recognizing infrared images using an RGB image model are implemented.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention converts the features of the infrared image into a second feature that can be processed through a converter, so that the RGB image model can process the infrared image with high quality, so that the high-quality RGB image model obtained based on training of a large number of RGB images can recognize and process the infrared image, solving the problem that there are few infrared image samples and it is difficult to train a high-quality infrared model.
[0050] The present invention processes image features through a converter. Compared with RGB images and infrared images, the amount of data is greatly reduced, so that the data for training a stable converter is also greatly reduced. Only a small number of samples are needed to train the converter. When the number of infrared images is insufficient to train an infrared recognition model, the converter can also be trained to effectively recognize the infrared image. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. Other features, purposes and advantages of the present invention will become more obvious by reading the detailed description of the non-limiting embodiments with reference to the following drawings:
[0052] Figure 1 A flowchart of the steps of a method for recognizing an infrared image using an RGB image model according to an embodiment of the present invention;
[0053] Figure 2 A flowchart of steps for obtaining a first feature in an embodiment of the present invention;
[0054] Figure 3 A flowchart of the steps of converter training in an embodiment of the present invention;
[0055] Figure 4 is a flow chart of steps for obtaining a second training feature in an embodiment of the present invention;
[0056] Figure 5 A flowchart of the steps of training a converter to convergence in an embodiment of the present invention;
[0057] Figure 6 A flowchart of steps for obtaining a comparison result in an embodiment of the present invention;
[0058] Figure 7 A schematic diagram of the structure of a system for recognizing infrared images using an RGB image model according to an embodiment of the present invention;
[0059] Figure 8 A schematic diagram of the structure of a device for recognizing infrared images using an RGB image model according to an embodiment of the present invention; and
[0060] Fig. 9 Schematic diagram of the structure of a computer-readable storage medium in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0062] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0063] The embodiment of the present invention provides a method for recognizing infrared images using an RGB image model, aiming to solve the problems existing in the prior art.
[0064] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0065] The present invention converts the features of the infrared image into a second feature that can be processed through a converter, so that the RGB image model can process the infrared image with high quality, so that the high-quality RGB image model obtained based on training of a large number of RGB images can recognize and process the infrared image, solving the problem that there are few infrared image samples and it is difficult to train a high-quality infrared model.
[0066] Figure 1 FIG. 1 is a flowchart of a method for recognizing infrared images using an RGB image model according to an embodiment of the present invention. Figure 1 As shown, the steps of a method for recognizing infrared images using an RGB image model in an embodiment of the present invention include:
[0067] Step S1: extracting features of the infrared image through the RGB image model to obtain a first feature.
[0068] In this step, the key features are extracted from the infrared image using the RGB image model. Although the imaging principles of infrared images and RGB images are different (infrared images capture the infrared radiation of objects, while RGB images capture visible light), specific algorithms or techniques can be used to convert infrared images into a form suitable for RGB image model processing, or to extract information corresponding to RGB image features from infrared images.
[0069] For example, the infrared image is converted to a grayscale image (if it is not grayscale yet), and then the relevant algorithms of the RGB image model are applied to extract features. Features may include statistical features of color (or grayscale), texture features, edge features, etc. These features can reflect key information such as the shape, size, and distribution of objects in the infrared image. The RGB image model can be an object detection model for various RGB images, such as a face detection model, a human body detection model, a car detection model, etc.
[0070] Step S2: Process the first feature through a converter to obtain a second feature.
[0071] In this step, the converter is trained by paired infrared images and RGB images. The converter is a machine learning model or deep learning network, which is trained by learning the mapping relationship between paired infrared images and RGB images. During the training process, the model receives a large number of infrared images and corresponding RGB images as input, and learns how to convert the features of the infrared images into representations corresponding to the features of the RGB images. Once the converter is trained, it can be used to process the first features extracted from the infrared image. The converter converts, maps or encodes these features to generate second features that are closer or similar to the RGB image features. Since the converter only processes image features, the number of data pairs required to train the converter is very small. For example, the size of an RGB image is 512*512, and its features can be only 25*25, which greatly reduces the data required for training, so that a stable converter can still be trained when the number of infrared images is small.
[0072] Step S3: Compare the second feature to obtain a comparison result.
[0073] In this step, after the second feature is obtained, it can be compared with the known RGB image feature library. The comparison method may include feature matching, similarity calculation, classification recognition, etc. By calculating the similarity or distance between the second feature and each feature in the feature library, the RGB image or feature category that best matches the infrared image can be determined. The comparison result may be a similarity score, a classification label, or a ranked list, depending on the comparison method and application scenario. These results can be used for subsequent decision-making, recognition, or classification tasks.
[0074] This embodiment realizes effective recognition and feature extraction of infrared images by combining RGB image model and machine learning technology, and has broad application prospects in the fields of image processing, computer vision and pattern recognition.
[0075] Figure 2 FIG. 1 is a flow chart of steps for obtaining the first feature in an embodiment of the present invention. Figure 2 As shown, in an embodiment of the present invention, a step of obtaining a first feature includes:
[0076] Step S11: pre-processing the infrared image.
[0077] In this step, preprocessing aims to improve the quality of infrared images to make them more suitable for subsequent processing steps. When performing preprocessing, at least one of the following methods can be used:
[0078] Denoising: Use filters (such as median filter, Gaussian filter, etc.) to remove noise from the image.
[0079] Enhancement: Enhance the contrast of the image through techniques such as histogram equalization and contrast stretching.
[0080] Correction: If the image has geometric distortion, geometric correction is required.
[0081] Normalization: Adjust the pixel values of an image to a specific range for subsequent processing.
[0082] Step S12: converting the infrared image into a three-channel image.
[0083] In this step, since infrared images are usually single-channel (grayscale images) and RGB images are three-channel (red, green, and blue), the infrared images need to be converted into three-channel form to match the RGB model. During the conversion, at least one of the following methods can be used:
[0084] Duplicate channels: Duplicate the grayscale values of the infrared image into three channels to form a pseudo-color image. Although this method is simple, it may not fully utilize the full information of the infrared image.
[0085] Pseudo color mapping: Use a specific mapping function to convert the grayscale values of the infrared image into RGB values. This method can be customized according to the specific application requirements of infrared images.
[0086] Other methods: Deep learning techniques can also be considered to generate RGB images corresponding to infrared images, but this usually requires a lot of training data and computing resources.
[0087] Step S13: extracting features from the three-channel image to obtain a first feature.
[0088] In this step, the RGB image model is used to extract key features from the converted three-channel image for subsequent classification, recognition or comparison tasks. The RGB image model is an existing model and can be any recognition model, such as a face recognition model, a human body recognition model, a car recognition model, a building recognition model, etc. Since the image in this embodiment is converted from an infrared image, the first feature obtained by the RGB image model has poor quality and is difficult to apply directly.
[0089] Figure 3 FIG. 1 is a flow chart of the steps of training a converter in an embodiment of the present invention. Figure 3 As shown, a step of converter training in an embodiment of the present invention includes:
[0090] Step S21: Obtain pairs of training infrared images and training RGB images.
[0091] In this step, in order to train the converter, pairs of infrared images and RGB images need to be prepared. These image pairs should have similar scenes or contents, but come from infrared sensors and visible light cameras respectively. The paired training infrared images and training RGB images are obtained by taking the same target object by a depth camera to ensure that each pair of images is aligned in space and time, that is, they represent the view of the same scene at the same time. The collected images can also be preprocessed, such as denoising, enhancement, cropping, etc., to improve the training effect.
[0092] Step S22: extracting features from the training infrared image using the RGB image model to obtain a first training feature; and extracting features from the training RGB image using the RGB image model to obtain a second training feature.
[0093] In this step, the RGB image model is used to extract the features of the infrared image and the RGB image. The training infrared image is input into the RGB image model (it needs to be converted into a three-channel form first), and the first training feature is extracted through the convolution layer, pooling layer and other structures of the model. Similarly, the training RGB image is input into the model to extract the second training feature. These features are usually high-dimensional vectors that represent the key information in the image. Since the RGB image model is more accurate in extracting RGB images, the quality of the second training feature is relatively high, while the quality of the first training feature is relatively low.
[0094] Step S23: using the first training feature as an input value of a converter and using the second training feature as a target value of the converter for training until the converter converges.
[0095] In this step, the training converter is a neural network or other machine learning model to learn the mapping from infrared image features to RGB image features. According to the task requirements, select a suitable converter model, such as a fully connected neural network, a convolutional neural network (CNN), a recurrent neural network (RNN), etc. Then design a suitable loss function to measure the difference between the features output by the converter and the target features. Common loss functions include mean square error (MSE), cross entropy loss, etc. Select a suitable optimization algorithm (such as stochastic gradient descent, Adam, etc.) to update the parameters of the converter to minimize the loss function. Input the paired first training features and second training features into the converter, calculate the loss through forward propagation, and then update the parameters through back propagation. Repeat this process until the converter converges, that is, the loss function no longer decreases significantly. After completing these steps, the converter is trained and can be used to convert the features of the infrared image into features similar to the RGB image, thereby supporting subsequent tasks such as image classification, object detection, image fusion, etc.
[0096] Figure 4FIG. 1 is a flow chart of steps for obtaining a second training feature in an embodiment of the present invention. Figure 4 As shown, in an embodiment of the present invention, a step of obtaining a second training feature includes:
[0097] Step S221: converting the training infrared image into a pseudo-color image.
[0098] In this step, since infrared images are usually single-channel grayscale images, and the RGB image model expects the input to be a three-channel color image, it is necessary to convert the infrared image into a pseudo-color image to match the input requirements of the model. According to the characteristics of the infrared image and the application requirements, select a suitable pseudo-color mapping method. Common mapping methods include fixed mapping based on grayscale (such as mapping grayscale values to a specific RGB color space), adaptive mapping based on image content (such as using a clustering algorithm to group grayscale values and assign different colors), etc.
[0099] Step S222: extracting features from the pseudo-color image using the RGB image model to obtain a first training feature.
[0100] In this step, a pre-trained RGB image model (such as a convolutional neural network, a deep learning model, etc.) is used to extract features of the pseudo-color image. Select a suitable RGB image model according to the task requirements. This model should be able to process three-channel inputs and output a high-dimensional feature vector. The pseudo-color image is input into the model, and the first training features are extracted through the convolutional layer, pooling layer, fully connected layer and other structures of the model. These features usually represent key information in the image, such as edges, textures, shapes, etc.
[0101] Step S223: extracting features from the training RGB image using the RGB image model to obtain second training features.
[0102] In this step, the RGB image model is also used to extract the features of the training RGB image, so as to compare and train the converter with the features of the pseudo-color image. Since the RGB image model for extracting the features of the pseudo-color image has been selected, the model can be directly reused to extract the features of the training RGB image. The training RGB image is input into the model, and the second training features are extracted through the same network structure. These features should be represented in the same feature space as the features of the pseudo-color image for subsequent training and comparison.
[0103] After completing these steps, pairs of first training features and second training features will be obtained, which come from the pseudo-color image and the training RGB image respectively. These feature pairs will be used to train the converter to learn the mapping relationship from infrared image features to RGB image features.
[0104] Figure 5FIG. 1 is a flow chart of the steps of training a converter to convergence in an embodiment of the present invention. Figure 5 As shown, a step of training a converter to convergence in an embodiment of the present invention includes:
[0105] Step S231: Select a machine learning model and determine initial parameters.
[0106] In this step, select a suitable machine learning model that can learn the mapping relationship from infrared image features to RGB image features. In model selection, choose a suitable model based on the complexity of the problem and the characteristics of the data. For example, for complex image conversion tasks, you can choose a deep learning model (such as a convolutional neural network CNN) or a generative adversarial network (GAN). For simpler tasks, you can choose a traditional machine learning algorithm (such as support vector machine SVM, random forest, etc.). However, considering the complexity of feature conversion, a deep learning model is usually more suitable. Parameter initialization: Set the initial parameters for the model, such as learning rate, weight decay, batch size, etc. These parameters have an important impact on the training effect and speed of the model.
[0107] Step S232: setting the first training feature as the input value of the machine learning model, and setting the second training feature as the target value of the machine learning model.
[0108] In this step, prepare the training data, use the extracted infrared image features (first training features) as input, and the corresponding RGB image features (second training features) as target values. In this step, it is necessary to ensure that each first training feature is paired with a corresponding second training feature. The paired feature data is input into the machine learning model, where the first training features are used as the data of the input layer and the second training features are used as the data of the output layer or target layer.
[0109] Step S233: Use the paired training infrared images and the training RGB images to train the machine learning model.
[0110] In this step, through iterative training, the model can learn the mapping relationship from infrared image features to RGB image features. The input features (first training features) are forward propagated through the model to obtain the predicted output of the model. The difference between the predicted output and the target value (second training feature) is calculated, that is, the loss value. According to the loss value, the parameters of the model are updated through the back propagation algorithm to reduce the loss value. Repeat the process of forward propagation, loss calculation and back propagation until the model performance reaches a certain standard or no longer improves significantly.
[0111] Step S234: When the performance of the machine learning model reaches a certain threshold or no longer improves significantly, stop training.
[0112] In this step, the performance of the model is evaluated regularly during the training process, such as using the validation set to calculate accuracy, recall and other indicators. When the performance of the model reaches a preset threshold (such as accuracy exceeding 90%) or the performance does not improve significantly over multiple consecutive iterations, the training is stopped. The trained model parameters are saved to a file for subsequent use.
[0113] Figure 6 FIG. 1 is a flow chart of steps for obtaining a comparison result in an embodiment of the present invention. Figure 6 As shown, in an embodiment of the present invention, a step of obtaining a comparison result includes:
[0114] Step S31: Compare the second feature with the features in the database.
[0115] In this step, the second feature identified in step S2 is compared with known features stored in the database to find possible matches. The second feature is compared with each feature in the database one by one. This may require traversing all feature records in the database.
[0116] Step S32: Calculate the similarity between the second feature and each feature in the database.
[0117] In this step, the similarity between the second feature and each feature in the database is quantified to determine whether there is a close enough match. Choose an appropriate similarity metric, such as Euclidean distance, cosine similarity, Manhattan distance, etc. These methods calculate similarity based on the mathematical properties of feature vectors. For each feature in the database, calculate the similarity value between it and the second feature. Record the similarity value of each feature for subsequent analysis.
[0118] Step S33: determining the comparison result between the second feature and the database according to the calculation result of the similarity.
[0119] In this step, based on the similarity calculation results, determine whether there is a match between the second feature and the database, and may further determine the degree or confidence of the match. Set a similarity threshold to determine whether the two features are close enough to be considered a match. This threshold may be adjusted according to application requirements and data characteristics. Compare the similarity value of each feature with the threshold. If the similarity value of a feature is higher than the threshold, it is determined to be a match. Output the comparison results, including whether a match is found, the number of matches (if there are multiple matches), and possible match degree or confidence information.
[0120] Figure 7 FIG. 1 is a schematic diagram of the structure of a system for recognizing infrared images using an RGB image model according to an embodiment of the present invention. Figure 7As shown, a system for recognizing infrared images using an RGB image model in an embodiment of the present invention includes:
[0121] An extraction module, used for extracting features from the infrared image through an RGB image model to obtain a first feature;
[0122] A conversion module, configured to process the first feature through a converter to obtain a second feature; wherein the converter is trained by a pair of infrared images and RGB images;
[0123] A comparison module is used to compare the second feature to obtain a comparison result.
[0124] This embodiment converts the features of the infrared image into a second feature that can be processed through a converter, so that the RGB image model can process the infrared image with high quality, so that the high-quality RGB image model trained based on a large number of RGB images can recognize and process the infrared image, solving the problem of few infrared image samples and difficulty in training a high-quality infrared model.
[0125] The embodiment of the present invention also provides a device for recognizing infrared images using an RGB image model, comprising a processor and a memory in which executable instructions of the processor are stored. The processor is configured to execute the steps of a method for recognizing infrared images using an RGB image model by executing the executable instructions.
[0126] As mentioned above, this embodiment converts the features of the infrared image into a second feature that can be processed through a converter, so that the RGB image model can process the infrared image with high quality, so that the high-quality RGB image model obtained based on training of a large number of RGB images can recognize and process the infrared image, solving the problem of few infrared image samples and difficulty in training a high-quality infrared model.
[0127] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0128] Figure 8 This is a schematic diagram of the structure of a device for recognizing infrared images using an RGB image model in an embodiment of the present invention. Figure 8 The electronic device 600 according to this embodiment of the present invention is described. Figure 8 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0129] like Figure 8 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0130] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the above-mentioned method of recognizing infrared images using an RGB image model. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .
[0131] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0132] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a grid environment.
[0133] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0134] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more grids (e.g., a local area network (LAN), a wide area network (WAN), and / or a public grid, such as the Internet) through a grid adapter 660. The grid adapter 660 may communicate with other modules of the electronic device 600 through the bus 630. It should be understood that although Figure 8Not shown, other hardware and / or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0135] In an embodiment of the present invention, a computer-readable storage medium is also provided for storing a program, and when the program is executed, the steps of a method for recognizing an infrared image using an RGB image model are implemented. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned method for recognizing an infrared image using an RGB image model section of this specification.
[0136] As shown above, this embodiment converts the features of the infrared image into a second feature that can be processed through a converter, so that the RGB image model can process the infrared image with high quality, so that the high-quality RGB image model obtained based on training of a large number of RGB images can recognize and process the infrared image, solving the problem of few infrared image samples and difficulty in training a high-quality infrared model.
[0137] Fig. 9 Schematic diagram of the structure of a computer-readable storage medium in an embodiment of the present invention. Fig. 9 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0138] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0139] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0140] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of grid, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0141] This embodiment converts the features of the infrared image into a second feature that can be processed through a converter, so that the RGB image model can process the infrared image with high quality, so that the high-quality RGB image model trained based on a large number of RGB images can recognize and process the infrared image, solving the problem of few infrared image samples and difficulty in training a high-quality infrared model.
[0142] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. The above description of the disclosed embodiments enables professionals and technicians in this field to implement or use the present invention. The various modifications to these embodiments will be obvious to professionals and technicians in this field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown in this article, but will comply with the widest range consistent with the principles and novel features disclosed herein.
[0143] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A method for recognizing infrared images using an RGB image model, characterized in that: include: Step S1: extracting features of the infrared image through the RGB image model to obtain a first feature; Step S2: Processing the first feature through a converter to obtain a second feature; wherein the converter is trained by paired infrared images and RGB images; Step S3: Compare the second feature to obtain a comparison result.
2. The method for recognizing infrared images using an RGB image model according to claim 1, characterized in that: Step S1 includes: Step S11: preprocessing the infrared image; Step S12: converting the infrared image into a three-channel image; Step S13: extracting features from the three-channel image to obtain a first feature.
3. The method for recognizing infrared images using an RGB image model according to claim 1, characterized in that: The converter includes: Step S21: obtaining a pair of training infrared images and training RGB images; Step S22: extracting features from the training infrared image through the RGB image model to obtain a first training feature; extracting features from the training RGB image through the RGB image model to obtain a second training feature; Step S23: using the first training feature as an input value of a converter and using the second training feature as a target value of the converter for training until the converter converges.
4. The method for recognizing infrared images using an RGB image model according to claim 3, characterized in that: In step S21, the paired training infrared image and the training RGB image are obtained by photographing the same target object with a depth camera.
5. The method for recognizing infrared images using an RGB image model according to claim 3, characterized in that: Step S22 includes: Step S221: converting the training infrared image into a pseudo-color image; Step S222: extracting features from the pseudo-color image using the RGB image model to obtain a first training feature; Step S223: extracting features from the training RGB image using the RGB image model to obtain second training features.
6. The method for recognizing infrared images using an RGB image model according to claim 3, characterized in that: Step S23 includes: Step S231: Select a machine learning model and determine initial parameters; Step S232: setting the first training feature as an input value of the machine learning model, and setting the second training feature as a target value of the machine learning model; Step S233: training the machine learning model using the paired training infrared images and the training RGB images; Step S234: When the performance of the machine learning model reaches a certain threshold or no longer improves significantly, stop training.
7. The method for recognizing infrared images using an RGB image model according to claim 1, characterized in that: Step S3 includes: Step S31: comparing the second feature with features in a database; Step S32: Calculate the similarity between the second feature and each feature in the database; Step S33: determining the comparison result between the second feature and the database according to the calculation result of the similarity.
8. A system for recognizing infrared images using an RGB image model, used to implement the method for recognizing infrared images using an RGB image model according to any one of claims 1 to 7, characterized in that: include: An extraction module, used for extracting features from the infrared image through an RGB image model to obtain a first feature; A conversion module, configured to process the first feature through a converter to obtain a second feature; wherein the converter is trained by a pair of infrared images and RGB images; A comparison module is used to compare the second feature to obtain a comparison result.
9. A device for recognizing infrared images using an RGB image model, characterized in that: include: processor; a memory storing executable instructions of the processor; Wherein, the processor is configured to perform the steps of the method for identifying infrared images using an RGB image model as described in any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed, the steps of the method for recognizing infrared images using an RGB image model described in any one of claims 1 to 7 are implemented.