Human body temperature detection method and device based on image recognition, equipment and medium

Through the alignment processing of thermal imaging video and RGB video and the use of segmentation model in the smart home system, the problem of being unable to monitor the body temperature of multiple people in real time in the existing technology is solved, achieving efficient and accurate monitoring of the body temperature of multiple people, and improving the Family health and safety.

CN118817079APending Publication Date: 2024-10-22GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410821094.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

The existing smart home system cannot effectively monitor the body temperature of multiple people in real time, and the device cannot be integrated with other functions, resulting in the inability to efficiently monitor the body temperature of multiple people.

Method used

Using a human body temperature detection method based on image recognition, by aligning the thermal imaging video with the RGB video, using the preset background model and segmentation model for pixel comparison and label segmentation, and calculating the body temperature weight to determine the human body detection temperature, it can realize the detection of multiple families Real-time temperature monitoring of members.

Benefits of technology

It realizes real-time monitoring of the body temperature of multiple people, improves the accuracy of body temperature measurement, reduces the impact of environmental and equipment factors on temperature detection, and enhances family health, safety and disease prevention capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118817079A_ABST
    Figure CN118817079A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a human body temperature detection method and device based on image recognition, equipment and a medium. The method comprises the following steps: performing alignment processing on a collected thermal imaging video and an RGB video to determine a target detection video; performing pixel comparison on the pixel value of each frame of image in the target detection video and a pixel value in a preset background model to obtain a pixel difference value, and if the pixel difference value exceeds a preset difference threshold value, judging that a human body enters the current frame of image; performing label segmentation on the image of the current frame through a preset segmentation model to obtain a body temperature detection segmented image; and performing body temperature weight calculation according to the body temperature detection segmentation map to determine the detection temperature of the human body. By implementing the method provided by the embodiment of the invention, the problem that the body temperatures of multiple persons cannot be effectively monitored in real time in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart homes, and in particular to a method, device, equipment and medium for detecting human body temperature based on image recognition. Background Art

[0002] With the development of science and technology, people's requirements for living environment are gradually increasing. Therefore, the research and development of smart homes has become an important direction of scientific and technological research. In order to ensure the health of people at home, the function of health monitoring of human body temperature has become a branch of the smart home system. In the prior art, non-contact body temperature measurement devices such as infrared thermometers are often added to the smart home system to monitor human body temperature. However, existing health monitoring usually requires measuring human body temperature separately, and it is impossible to achieve real-time temperature monitoring of multiple users. In addition, the equipment used is often unable to be integrated with other functions, resulting in the inability to effectively monitor the body temperature of multiple people efficiently. Summary of the invention

[0003] The embodiments of the present invention provide a human body temperature detection method, device, equipment and medium based on image recognition, aiming to solve the problem in the prior art that the human body temperature of multiple people cannot be effectively monitored in real time.

[0004] In the first aspect, an embodiment of the present invention provides a human body temperature detection method based on image recognition, which includes: aligning the collected thermal imaging video with the RGB video to determine the target detection video; comparing the pixel value of each frame image in the target detection video with the pixel value in a preset background model to obtain a pixel difference, and if the pixel difference exceeds a preset difference threshold, it is determined that a human body has entered the image of the current frame; performing label segmentation on the image of the current frame through a preset segmentation model to obtain a body temperature detection segmentation map; and calculating the body temperature weight according to the body temperature detection segmentation map to determine the detected temperature of the human body.

[0005] In the second aspect, an embodiment of the present invention also provides a human body temperature detection device based on image recognition, which includes: an alignment unit, used to align the collected thermal imaging video with the RGB video to determine the target detection video; a comparison unit, used to compare the pixel values ​​of each frame image in the target detection video with the pixel values ​​in a preset background model to obtain a pixel difference, if the pixel difference exceeds a preset difference threshold, it is determined that a human body has entered the image of the current frame; a segmentation unit, used to perform label segmentation on the image of the current frame through a preset segmentation model to obtain a body temperature detection segmentation map; a detection unit, used to calculate the body temperature weight according to the body temperature detection segmentation map to determine the detected temperature of the human body.

[0006] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0007] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and the program instructions can implement the above method when executed by a processor.

[0008] The embodiment of the present invention provides a method, device, equipment and medium for detecting human body temperature based on image recognition. The method includes: aligning the collected thermal imaging video with the RGB video to determine the target detection video; comparing the pixel value of each frame image in the target detection video with the pixel value in the preset background model to obtain the pixel difference value, and if the pixel difference value exceeds the preset difference threshold, it is determined that a human body has entered the image of the current frame; label segmenting the image of the current frame through a preset segmentation model to obtain a body temperature detection segmentation map; and calculating the body temperature weight according to the body temperature detection segmentation map to determine the detected temperature of the human body. The embodiment of the present invention performs feature processing on the collected monitoring video to reduce the influence of environmental or equipment factors on temperature detection, and detects whether a human body has entered the monitoring range according to the pixel difference value. If so, the body temperature is monitored according to the segmented body temperature detection segmentation map, so as to detect the body temperature of multiple family members entering the monitoring range in real time, thereby effectively monitoring the body temperature of all family members in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0010] Figure 1 A schematic diagram of a flow chart of a human body temperature detection method based on image recognition provided by an embodiment of the present invention;

[0011] Figure 2 A schematic diagram of a sub-process of a human body temperature detection method based on image recognition provided by an embodiment of the present invention;

[0012] Figure 3 A schematic diagram of a sub-process of a human body temperature detection method based on image recognition provided by an embodiment of the present invention;

[0013] Figure 4 A schematic diagram of a sub-process of a human body temperature detection method based on image recognition provided by an embodiment of the present invention;

[0014] Figure 5 A schematic diagram of a sub-process of a human body temperature detection method based on image recognition provided by an embodiment of the present invention;

[0015] Figure 6 A schematic diagram of a sub-process of a human body temperature detection method based on image recognition provided by an embodiment of the present invention;

[0016] Figure 7 A schematic block diagram of a human body temperature detection device based on image recognition provided by an embodiment of the present invention;

[0017] Figure 8 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0020] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0021] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0022] See also Figure 1 , Figure 1A flow chart of a human body temperature detection method based on image recognition provided in an embodiment of the present invention. The human body temperature detection method based on image recognition in this embodiment can be applied to the non-contact body temperature detection function of a smart home system, wherein the system includes an infrared image acquisition device and / or a visible light acquisition device, and processes the acquired monitoring images to detect the temperature of the human body appearing in the video, and can interact with the smart home system, such as automatically notifying family members or contacting medical services when an abnormal body temperature is detected, thereby effectively monitoring the body temperatures of multiple family members.

[0023] Figure 1 1 is a flow chart of a method for detecting human body temperature based on image recognition provided by an embodiment of the present invention. As shown in the figure, the method includes the following steps S110-S140.

[0024] S110, aligning the collected thermal imaging video with the RGB video to determine the target detection video.

[0025] In this embodiment, the monitoring video includes thermal imaging video and RGB video. The thermal imaging video is a video that collects infrared radiation from the human body surface through an infrared thermal imager or other equipment, and the RGB video is a video that is collected through a visible light device. It should be noted that the time and space collected by the thermal imaging video and the RGB video are aligned. Specifically, a unified control right or acquisition card can be used to simultaneously control or trigger two cameras to ensure that the acquisition time of the two cameras is completely synchronized, or the acquisition time of each frame of the image can be recorded through a high-precision timestamp, and then matched and synchronized. The monitoring video is processed to obtain a target detection video to ensure the quality of the image for human body temperature detection, thereby improving the accuracy of human body temperature detection.

[0026] In one embodiment, if Figure 2 As shown, the step S110 also includes steps S111-S114.

[0027] S111, performing feature extraction on the thermal imaging video and the RGB video frame by frame respectively through a preset feature extraction network;

[0028] S112, performing feature point matching on the features extracted from the corresponding image through the descriptor to determine feature point pairs;

[0029] S113, performing model estimation according to the feature point pairs to determine a homography matrix;

[0030] S114. Performing a geometric transformation on the image where the feature is located by using the homography matrix to align the thermal imaging video with each frame image in the RGB video, wherein the video after each frame image is aligned is the target detection video.

[0031] In this embodiment, the preset feature extraction network is a pre-trained convolutional neural network. Specifically, a convolutional neural network (CNN) can be used to learn the conversion between feature modes, and transfer learning can be used to make the convolutional neural network fine-tune specific paired thermal imaging images and RGB image data. For example, the last few layers of the network can be adjusted to make the network learn how to deal with specific feature differences between thermal imaging images and RGB images. The specific adjustment is not limited, and the feature extraction can be effectively performed. The preset feature extraction network is used to extract features from the thermal imaging video and the RGB video frame by frame, that is, to extract the feature map of each frame of the image video; it can be understood that because the thermal imaging video and the RGB video are processed synchronously, there will be two images that match each other, so the features extracted from the corresponding images are matched by feature points through descriptors to determine feature point pairs, wherein the descriptor is a method for numerically describing these feature points. The feature point pairs are the same feature points in the matching images. The homography matrix is ​​a mathematical matrix that describes the mapping relationship between two planes, which can be determined by the matched feature point pairs. The image in the thermal imaging video is geometrically transformed according to the homography feature matrix and aligned with the image in the RGB video to eliminate the perspective difference and position deviation. During the transformation, the image is resampled using bilinear interpolation to maintain the image quality. The accuracy of the correction can be verified by checking the final position error of the control point and visually checking the alignment of the two images. By aligning the features of the acquired thermal imaging video with the RGB video, the human body temperature can be more accurately located and measured, thereby improving the accuracy of body temperature measurement and reducing the impact of environmental factors or equipment limitations on the accuracy of temperature monitoring.

[0032] S120, performing pixel comparison between the pixel values ​​of each frame of the target detection video and the pixel values ​​in the preset background model to obtain a pixel difference value, and if the pixel difference value exceeds a preset difference threshold, it is determined that a human body has entered the image of the current frame.

[0033] In this embodiment, the background model is a model that converts the moving target detection problem of the sequence image into a binary classification problem based on the current background estimation, divides all pixels into two categories: background and moving foreground, and then post-processes the classification results to obtain the final detection result. The pixel value of each frame of the target detection video is obtained by comparing the pixel value of each frame with the pixel value in the preset background model to obtain the pixel difference. If the pixel difference exceeds the preset difference threshold, it is determined that a human body has entered the image of the current frame, wherein the preset difference threshold can be determined based on the pixel value of the image. By using the background model to detect whether a human body has entered, a good detection effect can be provided in static scenes such as indoor monitoring and fixed camera shooting.

[0034] S130 , performing label segmentation on the image of the current frame using a preset segmentation model to obtain a body temperature detection segmentation map.

[0035] In this embodiment, the preset segmentation model is a U-Net deep learning model that supports multi-label output. The U-Net model is a convolutional neural network structure used in deep learning. A training data set can be prepared in advance to train the U-Net model, wherein each frame of the image in the training data set is artificially and accurately marked with the boundaries and areas of the human body and the skin entering the monitoring area, that is, each pixel point needs to be marked whether it belongs to the human body and which part of the human body, specifically, it can be achieved by making multiple layers of labels. The training data set is input into the U-Net model, and the model outputs label information of the human body and different body parts, wherein the output layer of the model needs to be able to output multiple channels, each channel corresponding to a specific category. For example, one channel outputs the segmentation result of the human body, and another channel outputs the segmentation result of the skin. The body temperature detection segmentation map is a segmentation map for body temperature detection, wherein the face, neck, limbs and background area of ​​the human body are respectively marked in the segmentation map. The body temperature detection segmentation map is output by the preset segmentation model to facilitate accurate detection of the temperature of the human body entering the monitoring video.

[0036] In one embodiment, if Figure 3 As shown, the step S130 includes steps S1301-S1302.

[0037] S1301, obtaining the number of pixels and labels generated after the preset segmentation model performs label segmentation on the current frame image, wherein the number of pixels includes the number of pixels in the foreground of the current frame image and the number of pixels in the background, and the labels include labels of various parts of the human body and the background in the current frame image;

[0038] S1302: construct a loss function according to the pixel value and the label by weight adjustment, and optimize the loss of the preset segmentation model according to the loss function.

[0039] In this embodiment, the training step of the preset segmentation model also includes: obtaining the number of pixels generated by the preset segmentation model after label segmentation of the current frame image, wherein the number of pixels includes the number of pixels in the foreground (the human body entering the surveillance video at this time) and the number of pixels in the background area of ​​the current frame image, and obtaining the labels of the human body parts (face, neck, limbs) and the background generated after the model segmentation. A loss function is constructed by weighting the pixel values ​​and the labels, and the constructed loss function is:

[0040]

[0041] Wherein, X and Y represent the number of pixels in the foreground and background, respectively. Y(i) is the label of the three types of human skin (face, neck and limbs) and the background, l(i, k) is the output logit of the i-th sample in the k-th class, C is the number of classes, where logit is an unnormalized score used to calculate the predicted probability. Specifically, it represents the value obtained at the output layer after the input data is forward propagated through the neural network. The loss weights of various label markers can be adjusted through the loss function to balance the influence of each label during the training process to ensure that the model does not favor a task that is easier to learn. After the loss function of the preset segmentation model is constructed, it also includes: using data enhancement techniques such as rotation, scaling, cropping, etc., and color space transformation to improve the generalization ability of the model for different human bodies and skins. And the performance of human body segmentation and hand segmentation can be evaluated separately using evaluation indicators. Adjust model parameters such as network depth, convolution kernel size, learning rate, etc. according to the evaluation results. And use morphological operation expansion, erosion and other techniques to optimize the segmentation boundary. Through continuous optimization of the model to reduce the errors generated by the model in segmentation and label generation, improve the segmentation quality.

[0042] In one embodiment, if Figure 4 As shown, the step S130 includes steps S131-S132.

[0043] S131, marking various parts of the human body and the background area in the image of the current frame with different labels using the preset segmentation model;

[0044] S132. Output the marked image through a preset first convolution layer and a first convolution function to determine the body temperature detection segmentation map, wherein the face, neck, limbs and background areas are respectively marked in the body temperature detection segmentation map.

[0045] In this embodiment, the various parts of the human body are the exposed skin parts of the human body, including the face, neck, and limbs. The preset segmentation model uses different labels to mark the various parts of the human body and the background area through pixel-level classification of the image of the current frame. The marked image is output through the preset first convolution layer and the first convolution function to determine the body temperature detection segmentation map. Specifically, the preset first convolution layer is a convolution of conv1*1*4, and the first convolution function is a softmax activation function (a normalization function that maps the input value to a probability real number between 0-1 for multi-classification). The preset segmentation model outputs the image of the current frame to obtain a segmentation map with 4 channels, representing the face, neck, limbs and background areas, that is, the face, neck, limbs and background areas are marked in the body temperature detection segmentation map. The body temperature detection map is output through the preset segmentation model to facilitate the subsequent accurate detection of the body temperature.

[0046] S140, performing body temperature weight calculation according to the body temperature detection segmentation map to determine the detected temperature of the human body.

[0047] In this embodiment, the exposed skin of the face, neck, and limbs of the human body is marked in the body temperature detection segmentation map, and the skin area can be used as a mask for the infrared thermal map to obtain the temperature of each exposed part of the human body within a certain period of time. Different weights are assigned to each part, such as the average temperature of the face is 36.5°C, the temperature of the neck is 36.0°C, and the average temperature of the limbs is 35.8°C, and the weight ratio is face>neck>limbs, then the final human body temperature can be: (36.5*1.1+36.0*0.95+35.8*0.9) / 3; it can be understood that the 1.1, 0.95 and 0.9 are all weight ratios used for examples, and the specific ratio can be set according to the detection environment. By calculating the body temperature weight of the body temperature detection segmentation map to determine the detected temperature of the human body, accurate human body temperature can be obtained, which is convenient for continuous health diagnosis based on human body temperature, and enhances the health safety and disease prevention capabilities of the family.

[0048] In one embodiment, if Figure 5 As shown, the step S140 also includes steps S141-S142.

[0049] S141, removing noise data from the body temperature detection segmentation graph through noise processing;

[0050] S142, obtaining the temperatures of the face, neck, and limbs in the processed body temperature detection segmentation image, and performing body temperature calculation on each temperature according to preset weights to determine the detection temperature.

[0051] In this embodiment, the noise data is data in which there are errors or anomalies (deviations from expected values), which interfere with the analysis of the data and become meaningless data. The body temperature detection segmentation map is subjected to noise processing to remove noise data. Specifically, the noise data can be removed by using a random sampling consistency algorithm to obtain more accurate body temperature data. The preset weight is a weight ratio set according to the current environmental factors. The skin area in the body temperature detection segmentation map can be used as a mask for the infrared thermal map to obtain the temperature of each exposed part of the human body (face, neck and limbs). The body temperature is calculated according to the preset weights. For example, the average temperature of the face, neck and limbs is multiplied by the corresponding weights to obtain three body temperature data. The three body temperature data are added and the average is calculated to determine the temperature of the human body entering the detection video. The human body temperature is detected by removing the noise data to obtain more effective body temperature detection data.

[0052] The above embodiment is an embodiment for measuring human body temperature alone. In order to improve the completeness of the invention, the present invention also provides another method for detecting body temperature based on human gait. The scheme includes the following steps S210-260, wherein S210, S220, S230 and S240 are similar to the above scheme and are therefore not described in detail. The steps changed in this embodiment are described in detail below.

[0053] S210: Align the collected thermal imaging video with the RGB video to determine the target detection video.

[0054] S220, performing pixel comparison between the pixel values ​​of each frame of the target detection video and the pixel values ​​in the preset background model to obtain a pixel difference value, and if the pixel difference value exceeds a preset difference threshold, it is determined that a human body has entered the image of the current frame.

[0055] In one embodiment, if Figure 6 As shown, the step S220 also includes steps S221-S222.

[0056] S221, marking various parts of the human body and the background area in the image of the current frame with different labels using the preset segmentation model;

[0057] S222, outputting the marked image of the current frame through a preset second convolution layer and a second convolution function to determine a human body background segmentation map, wherein the human body area and the background area are marked in the human body background segmentation map.

[0058] In this embodiment, the preset segmentation model uses different labels to mark the human body and various parts of the human body and the background area through pixel-level classification of the image of the current frame. The marked image is output through the preset second convolution layer and the second convolution function to determine the human body background segmentation map. Among them, the human body background segmentation map is a segmentation map in which the human body and the background area are marked with different labels. Specifically, the preset second convolution layer is a convolution of conv1*1*2, and the second convolution function is a sigmoid activation function (a non-linear function. In a neural network, the activation function is responsible for outputting the input signal after non-linear transformation). The preset segmentation model outputs the image of the current frame to obtain a segmentation map with 2 channels, representing the human body and the background area, that is, the human body and the background area are marked separately in the human body background segmentation map. The human body background segmentation map is generated by the preset segmentation model to facilitate the subsequent gait detection of the human body.

[0059] S230 performs label segmentation on the image of the current frame by using a preset segmentation model to obtain a body temperature detection segmentation map;

[0060] S240, performing body temperature weight calculation according to the body temperature detection segmentation map to determine the detected temperature of the human body;

[0061] S250, performing identity authentication on the human body area in the human body background segmentation image through gait recognition processing, and determining a target temperature range based on the result of the identity authentication.

[0062] In this embodiment, the gait recognition process is a technology for identifying individuals by analyzing the way humans walk. Specifically, human motion data captured from video or other sensors is analyzed based on the human motion data. And gait recognition can perform identity authentication without active cooperation. The human body area in the human body background segmentation map is processed for identity authentication through gait recognition. Specifically, the gait information of family members can be prepared artificially, and gait recognition can be performed according to the human body area contour in the human body background segmentation map to detect the identity information of the human body. For example, gait recognition processing can be performed according to the human body contour to determine that this person is a middle-aged person and meets the identity of the father of the family member. It can be understood that there are some differences in the normal body temperature range of people of different age groups, so the age group of the human body identified by gait can be used to determine the target temperature range that meets the human body. By performing gait recognition on the human body background segmentation map for identity authentication, the age group to which the human body belongs is determined to determine its corresponding target temperature range, so as to facilitate the judgment of whether the human body is healthy.

[0063] S260: Determine whether the detected temperature is within the target temperature range, and if it exceeds, record and issue a warning.

[0064] In one embodiment, the determination of whether the detected temperature is within the target temperature range is to determine whether the detected temperature of the human body determined by the body temperature detection segmentation map is within the target temperature range determined according to the human body background segmentation map. If not, the temperature information of the person is recorded and a notification is sent to the bound smart device. For example, the identity of the person verified by gait recognition is an elderly person, and the target temperature range corresponding to the elderly is 36.2°C to 36.8°C, but the detected temperature of the human body determined by the body temperature detection segmentation map is 37.0°C, then the body temperature of the person exceeds the most suitable human body temperature for this age group, and the temperature information of the person is recorded. By determining whether the detected temperature is within the target temperature range, it is possible to determine whether the body temperature of family members is normal, and to record and remind abnormal situations to enhance the health and safety detection and disease prevention capabilities of the smart home system.

[0065] Figure 7 is a schematic block diagram of a human body temperature detection device 300 based on image recognition provided by an embodiment of the present invention. Figure 7 As shown, corresponding to the above human body temperature detection method based on image recognition, the present invention also provides a human body temperature detection device based on image recognition. The human body temperature detection device based on image recognition includes a unit for executing the above human body temperature detection method based on image recognition, and the device can be configured in a desktop computer, tablet computer, laptop computer, etc. Specifically, please refer to Figure 7 The human body temperature detection device based on image recognition includes an alignment unit 310, a comparison unit 320, a segmentation unit 330 and a detection unit 340.

[0066] The alignment unit 310 is used to align the collected thermal imaging video with the RGB video to determine the target detection video.

[0067] In one embodiment, the alignment unit 310 includes an extraction unit, a matching unit, an estimation unit, and a transformation unit.

[0068] An extraction unit, used to extract features from the thermal imaging video and the RGB video frame by frame respectively through a preset feature extraction network;

[0069] A matching unit, used for matching the features extracted from the corresponding image with the descriptor to determine feature point pairs;

[0070] An estimation unit, used for performing model estimation based on the feature point pairs to determine a homography matrix;

[0071] A transformation unit is used to geometrically transform the image where the feature is located through the homography matrix to align the thermal imaging video with each frame image in the RGB video, wherein the video after each frame image is aligned is the target detection video.

[0072] The comparison unit 320 is used to compare the pixel values ​​of each frame image in the target detection video with the pixel values ​​in the preset background model to obtain pixel difference values. If the pixel difference value exceeds a preset difference threshold, it is determined that a human body has entered the image of the current frame.

[0073] The segmentation unit 330 is used to perform label segmentation on the image of the current frame through a preset segmentation model to obtain a body temperature detection segmentation map.

[0074] In one embodiment, the segmentation unit 330 includes a marking unit and a first output unit.

[0075] A marking unit, used to mark various parts of the human body and background areas in the image of the current frame with different labels using the preset segmentation model;

[0076] The first output unit is used to output the marked image through a preset first convolution layer and a first convolution function to determine the body temperature detection segmentation map, wherein the face, neck, limbs and background areas are respectively marked in the body temperature detection segmentation map.

[0077] In one embodiment, the segmentation unit 330 includes a second output unit.

[0078] The second output unit is used to output the marked image of the current frame through a preset second convolution layer and a second convolution function to determine a human body background segmentation map, wherein the human body area and the background area are marked in the human body background segmentation map.

[0079] The detection unit 340 is used to perform body temperature weight calculation according to the body temperature detection segmentation map to determine the detected temperature of the human body.

[0080] In one embodiment, the detection unit 340 includes a denoising unit and a calculation unit.

[0081] A denoising unit, used for removing noise data from the body temperature detection segmentation map by noise processing;

[0082] The calculation unit is used to obtain the temperatures of the face, neck, and limbs in the processed body temperature detection segmentation image, and perform body temperature calculation on each temperature according to a preset weight to determine the detection temperature.

[0083] In one embodiment, the detection unit 340 further includes a verification unit and a warning unit.

[0084] A verification unit, used for performing identity verification on the human body area in the human body background segmentation map through gait recognition processing, and determining a target temperature range based on the result of the identity verification;

[0085] The warning unit is used to determine whether the detected temperature is within the target temperature range, and if it exceeds, record and issue a warning.

[0086] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned human body temperature detection device 300 based on image recognition and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.

[0087] The above-mentioned human body temperature detection device based on image recognition can be implemented in the form of a computer program, which can be used in Figure 8 Runs on the computer device shown.

[0088] See also Figure 8 , Figure 8 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.

[0089] See also Figure 8 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0090] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a human body temperature detection method based on image recognition.

[0091] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0092] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a human body temperature detection method based on image recognition.

[0093] The network interface 505 is used to communicate with other devices over the network. Figure 8 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0094] The processor 502 is used to run a computer program 5032 stored in the memory to implement the steps of the above method.

[0095] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0096] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0097] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the above method.

[0098] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0099] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0100] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0101] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0103] The above is only a specific embodiment 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. A human body temperature detection method based on image recognition, It is characterized in that The method comprises: Align the collected thermal imaging video with the RGB video to determine the target detection video; Compare the pixel values ​​of each frame of the target detection video with the pixel values ​​in the preset background model to obtain a pixel difference value, and if the pixel difference value exceeds a preset difference threshold, it is determined that a human body has entered the image of the current frame; Perform label segmentation on the image of the current frame through a preset segmentation model to obtain a body temperature detection segmentation map; A body temperature weight calculation is performed according to the body temperature detection segmentation map to determine the detected temperature of the human body.

2. The method according to claim 1, It is characterized in that The step of aligning the collected thermal imaging video with the RGB video to determine the target detection video includes: Performing feature extraction on the thermal imaging video and the RGB video frame by frame respectively through a preset feature extraction network; The features extracted from the corresponding image are matched with the descriptors to determine the feature point pairs; Performing model estimation based on the feature point pairs to determine a homography matrix; The image where the feature is located is geometrically transformed through the homography matrix to align the thermal imaging video with each frame image in the RGB video, wherein the video after each frame image is aligned is the target detection video.

3. The method according to claim 1, It is characterized in that The step of performing label segmentation on the image of the current frame by using a preset segmentation model to obtain a body temperature detection segmentation map comprises: Using the preset segmentation model, different parts of the human body and background areas in the image of the current frame are marked with different labels; The marked image is output through a preset first convolution layer and a first convolution function to determine the body temperature detection segmentation map, wherein the face, neck, limbs and background areas are respectively marked in the body temperature detection segmentation map.

4. The method according to claim 3, It is characterized in that The step of calculating the body temperature weight according to the body temperature detection segmentation map to determine the detected temperature of the human body includes: Removing noise data from the body temperature detection segmentation map by noise processing; The temperatures of the face, neck, and limbs in the processed body temperature detection segmentation image are obtained, and the temperatures are calculated according to preset weights to determine the detection temperature.

5. The method according to claim 3, It is characterized in that After the step of marking the human body parts and the background area in the image of the current frame with different labels by using the preset segmentation model, the method further comprises: The marked image of the current frame is output through a preset second convolution layer and a second convolution function to determine a human body background segmentation map, wherein the human body area and the background area are marked in the human body background segmentation map.

6. The method according to claim 5, It is characterized in that After the step of calculating the body temperature weight according to the body temperature detection segmentation map to determine the detected temperature of the human body, the method further comprises: Performing identity authentication on the human body area in the human body background segmentation image through gait recognition processing, and determining a target temperature range based on the result of the identity authentication; Determine whether the detected temperature is within the target temperature range, and if exceeded, record and issue an alarm.

7. The method according to claim 1, It is characterized in that The training step of the preset segmentation model includes: Obtain the number of pixels and labels generated after the preset segmentation model performs label segmentation on the current frame image, wherein the number of pixels includes the number of pixels in the foreground and the number of pixels in the background of the current frame image, and the labels include labels of various parts of the human body and the background in the current frame image; A loss function is constructed by weighting the pixel value and the label, and loss optimization is performed on the preset segmentation model according to the loss function.

8. A human body temperature detection device based on image recognition, It is characterized in that include: An alignment unit, used to align the collected thermal imaging video with the RGB video to determine the target detection video; A comparison unit is used to compare the pixel value of each frame of the target detection video with the pixel value in the preset background model to obtain a pixel difference value, and if the pixel difference value exceeds a preset difference threshold, it is determined that a human body has entered the image of the current frame; A segmentation unit, used to perform label segmentation on the image of the current frame through a preset segmentation model to obtain a body temperature detection segmentation map; The detection unit is used to perform body temperature weight calculation according to the body temperature detection segmentation map to determine the detected temperature of the human body.

9. A computer device, It is characterized in that The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 7 can be implemented.