CN111854960B - Calibration method for measuring human face temperature based on thermal imager - Google Patents

Calibration method for measuring human face temperature based on thermal imager Download PDF

Info

Publication number
CN111854960B
CN111854960B CN202010355693.1A CN202010355693A CN111854960B CN 111854960 B CN111854960 B CN 111854960B CN 202010355693 A CN202010355693 A CN 202010355693A CN 111854960 B CN111854960 B CN 111854960B
Authority
CN
China
Prior art keywords
temperature
dimensional array
pixel
face
neuron
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010355693.1A
Other languages
Chinese (zh)
Other versions
CN111854960A (en
Inventor
林宇翔
陈果
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Pinxue Software Development Co ltd
Original Assignee
Guangdong Pinxue Software Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Pinxue Software Development Co ltd filed Critical Guangdong Pinxue Software Development Co ltd
Priority to CN202010355693.1A priority Critical patent/CN111854960B/en
Publication of CN111854960A publication Critical patent/CN111854960A/en
Application granted granted Critical
Publication of CN111854960B publication Critical patent/CN111854960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • G01J5/0022Radiation pyrometry, e.g. infrared or optical thermometry for sensing the radiation of moving bodies
    • G01J5/0025Living bodies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • G01J2005/0077Imaging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Image Processing (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

The invention discloses a thermal imaging instrument-based calibration method for measuring the temperature of the face of a human body, which comprises the following steps in sequence: the temperature pixel dot matrix collected by the thermal infrared imager each time is a two-dimensional array pixel, and a reference temperature is calculated; calculating a two-dimensional array face representing the face temperature profile; and obtaining the forehead surface temperature by using a two-dimensional array face, and finally fitting the forehead surface temperature into the internal temperature. The invention can rapidly and accurately find out the pixel temperature of the forehead part of the human head, and can accurately measure the human temperature when the human head is shielded.

Description

Calibration method for measuring human face temperature based on thermal imager
Technical Field
The invention relates to the field of medical equipment, in particular to a thermal imaging instrument-based calibration method for measuring the temperature of the face of a human body.
Background
The thermal infrared imager can obtain an infrared image of the target and can measure the temperature of the target. The infrared thermal imager has the advantages of non-contact, long distance, high speed, high sensitivity, wide temperature measuring range, capability of selecting a measured target in an image, and the like. The thermal infrared imager has many advantages over the traditional temperature measurement technology, but the thermal infrared imager can be affected by factors such as measured distance, reflectivity of a measured object, shielding of the measured object by other objects, ambient temperature, ambient humidity, ambient radiation and the like.
Thermal infrared imagers are required to measure the temperature distribution of a human body part relatively accurately in medicine. At present, the research direction is that the influence of the change of the target distance and the view angle on the temperature measurement precision of the thermal infrared imager is relatively large, the relational expression between the temperature measurement precision of the thermal infrared imager and the target distance and the view angle is deduced, and the method for correcting the temperature measurement of the thermal infrared imager by adopting an error compensation method is provided.
Because the thermal imager generally measures the temperature of the whole face when measuring the body temperature of the head of a human body at present, once the face is shielded by a shielding object, the accuracy of the measured temperature is affected due to the large area. Therefore, it is necessary to develop a method capable of rapidly and accurately finding out the pixel temperature of the forehead of the human head, so as to realize that the human head is shielded and accurately measure the human temperature.
Disclosure of Invention
The invention aims to overcome the defects and shortcomings of the prior art, and provides a calibration method for measuring the temperature of the face of a human body based on a thermal imager.
The aim of the invention is achieved by the following technical scheme:
a calibration method for measuring the temperature of the face of a human body based on a thermal imager comprises the following steps in sequence:
s1, a temperature pixel lattice acquired by a thermal infrared imager each time is a temperature pixel array pixel, and the temperature pixel array pixel is a two-dimensional array;
s2, traversing the temperature pixel array pixel, and searching all data in the temperature pixel array pixel, wherein the data contain the temperature range of 32-45 ℃ and assigning the data to a one-dimensional array filter; the range of the common thermometer is 35-42 ℃, and as the pixel is the original data which is not corrected, the pixel point of the human body is prevented from being leaked, and the data in the range of 32-45 ℃ is selected.
S3, sorting the one-dimensional array filters according to the increasing order to obtain sorted filters_t;
s4, taking data of 3/4 quantiles from the sequenced filter_t as a reference, and taking the Q3 element from the one-dimensional array filter as a reference number to obtain a reference temperature s=filter [ Q3];
wherein ,
s5, searching all pixel position marks 1 which accord with s+/-diff from a temperature pixel array pixel, assigning the pixel position marks 0 which do not accord with s+/-diff to a two-dimensional array pixel_bin, searching a minimum matrix containing all 1 from the two-dimensional array pixel_bin, and expanding the minimum matrix into a square matrix and assigning the square matrix to a two-dimensional array face according to the maximum side length of the matrix according to the middle element position of the matrix; the side length of the square matrix is the maximum side length of the minimum matrix;
wherein diff refers to a reference temperature error range, the width and height of the two-dimensional array pixel_bin are the same as those of the temperature pixel array pixel, and the width and height of the two-dimensional array face cannot exceed those of the temperature pixel array pixel;
s6, the two-dimensional array face is the outline of the face temperature, the top data of the two-dimensional array face is forehead position data, and the average value of the values of the temperature pixel array pixel elements corresponding to all elements 1 in the forehead position data is forehead surface temperature;
s7, fitting the forehead surface temperature into the in-vivo temperature, and obtaining a fitting function through experiments:
body_temperature=0.7797×temperature+9.7271;
wherein body_temperature is the in vivo temperature of the human body.
In step S1, the temperature pixel array pixel is already subjected to distance fitting, and the forehead surface temperature is converted into the human body temperature.
In step S2, the array length range of the one-dimensional array filter is determined by pixel; if pixel is a 32×32 two-dimensional array then the maximum length of the filter is 32×32=1024, and so on.
In step S1, the temperature pixel array pixel is a two-dimensional array of 32×32 temperature pixel array:
in step S2, the one-dimensional array filter is:
filter=[32.1 32.3 36.0 36.5 34.1 35.6 36.4 36.7 36.5 36.4 36.6 36.434.1 36.6 36.5 32.1 33.1 35.1 36.4 36.5]。
in step S3, the obtained ordered filter_t is:
filter_t=[32.1 32.1 32.3 33.1 34.1 34.1 35.1 35.6 36.0 36.4 36.4 36.436.4 36.5 36.5 36.5 36.5 36.6 36.6 36.7]。
in step S4, the length of the one-dimensional array filter is 20,reference temperature s=filter [ Q3]]=36.5。
In step S5, assuming that diff=0.7, searching for a pixel position mark 1 with all element values in the temperature pixel array pixel within 36.5±0.7, and the other marks are 0;
finding out the minimum matrix containing all 1 from the two-dimensional array pixel_bin, and then expanding the minimum matrix into a square matrix according to the position of the middle element of the matrix and the maximum side length of the matrix to obtain the square matrix of the two-dimensional array pixel_bin;
the value of 1 in the two-dimensional array pixel_bin spans 3 columns and 5 rows, so that the square is 5×5, and the 5×3 array is centrally placed in the 5×5 square, so that a two-dimensional array face is obtained;
the two-dimensional array face can be seen to be the outline of the face temperature, the 1 st row is the forehead part, the 2 nd, 3 rd and 4 th rows are the parts from eyes to mouth, and the 5 th row is the neck part. The forehead position data is only data of the 1 st row; if the two-dimensional array face is a square with other sizes, the forehead position data is amplified in the same proportion, that is, the data in the 1 st and 2 nd rows may be the forehead position data, or the data in the 1 st, 2 nd and 3 rd rows may be the forehead position data, and so on.
In the step S5 of the process,line 1 of the two-dimensional array face [01100 ]]Each element corresponds to a temperature pixel array pixelThe average value of the values of the temperature pixel array pixel elements corresponding to all elements of the 1 st row of the two-dimensional array face as 1 is the forehead surface temperature:
temperature=average(p 9,9 ,p 9,10 )。
the two-dimensional array face is also used for judging whether the face is blocked by a blocking object or not, and specifically comprises two parts of training a model and model identification:
1. training model part:
1. mathematical model definition:
(1) Learning rate k=0.1;
(2) Input layer neuron number: input_num=100; the two-dimensional array face is compressed or amplified into a 10×10 two-dimensional array, and then each row is sequentially arranged into a one-dimensional array with the length of 100, so input_num=100;
(3) Output layer neuron number: output_num=1; since the output result is either blocked or not blocked, if 1 number is output, it can indicate whether it is blocked, and if it is close to 0, it is not blocked, and if it is close to 1, it is blocked;
(4) Hidden layer neuron number hide_layout_num=10; experiments prove that the number of neurons in the hidden layer is 10 and is better;
(5) Activation function usageBecause the sigmoid function maps the variables between 0,1 just can indicate that a near 0 indicates not occluded, a near 1 indicates occluded, the derivative function of the sigmoid function is sigmoid (z)' = sigmoid (z) × (1-sigmoid (z));
(6) The error function is wherein ,cj Is the square error of the actual value of the jth face sample and the output value,e j is the difference between the actual value of the jth face sample and the output value;
(7) Weight w of hidden layer 2 Is a two-dimensional array of input_num×hide_layout_num, offset b 2 Is a one-dimensional array of length hide_layout_num, neuron a 2 Is a one-dimensional array of length hide_layout_num;
(8) Weights w of output layer 3 Is a two-dimensional array of hide_layout_num×output_num, offset b 3 Is a one-dimensional array of length output_num, neuron a 3 Is a one-dimensional array of length output_num;
(9) The neuron calculation function calc_cell (x, w, b) =sigmoid (x·w+b); where x.w is the inner product of two arrays, x is the value of the input neuron, w is the weight in one-to-one correspondence with each x array element, and b is the bias.
2. Model training process:
(1) Randomly initializing weights w of hidden layers 2 And bias b 2 Weights w of output layer 3 And bias b 3 The method comprises the steps of carrying out a first treatment on the surface of the j is the sample index, max j is the sample number,for an array of face samples, each sample element is an array of length 100;
(2) Definition w 2 、b 2 、w 3 、b 3 The bias leads of (2) are dw respectively 2 、db 2 、dw 3 、db 3 The initial value is 0;
(3)x=input_val j the j-th array of the input_val array is compressed or amplified into a 10 multiplied by 10 two-dimensional array, and each row is sequentially arranged into a one-dimensional array x= [ x ] with the length of 100 1 x 2 ... x 99 x 100 ];
(4) The j-th sample is input to calculate the value of each neuron of the hidden layer:
wherein the subscript i is implicitThe value range of the i-th neuron of the hidden layer is 1-10, the neuron values of the 1 st to 10 th hidden layers are circularly calculated,is the i-th neuron of the hidden layer, < +.>Is a one-dimensional array of length 100 +.>Is>Is->Is offset from (a);
(5) Inputting all hidden layer neuron samples to calculate the value of each neuron of the output layer:
a 3 =calc_cell(a 2 ,w 3 ,b 3 ),
wherein ,a3 Is the output layer neuron, w 3 Is a one-dimensional array with length of 10 3 All input weights of b) 3 Is a 3 Is offset from (a);
(6) Calculating the partial derivative of the error of the j-th sample with respect to the output layer neuron:
wherein ,a3 Real_y is the predicted value j Is the actual value of the jth sample;
(7) Calculating the partial derivative of the error of the j-th sample with respect to hidden layer neurons:
wherein ,d3 ×w 3 Is matrix multiplication;
(8) Calculating and accumulating the partial derivatives of the errors of the j-th sample with respect to the weights of the output layers:
(9) Calculating and accumulating the bias derivatives of the errors of the j-th sample with respect to the bias of the output layer:
(10) Calculating and accumulating the bias of the error of the jth sample with respect to the hidden layer weight:
wherein, the subscript i is the ith neuron of the hidden layer, the value range is 1-10, and the neuron values of the 1 st to 10 th hidden layers are circularly calculated;
(11) Calculate and accumulate the bias derivatives of the error of the jth sample with respect to the bias of the hidden layer:
wherein, the subscript i is the ith neuron of the hidden layer, the value range is 1-10, and the neuron values of the 1 st to 10 th hidden layers are circularly calculated;
(12) Continuing to execute the step (3) until j=max_j, and executing the step (13);
(13) Updating weights and biases of a hidden layer and an output layer:
w 3 =w 3 +(-k×dw 3 ),
b 3 =b 3 +(-k×db 3 ),
w 2 =w 2 +(-k×dw 2 ),
b 2 =b 2 +(-k×db 2 );
(14) J=0, and continuing to perform the step (3) untilThe value of (2) is as small as a preset value, and the training parameters are completed;
2. model calculation process:
1. x is one-dimensional array x= [ x ] with length of 100, which is obtained by compressing or amplifying two-dimensional array face acquired in real time into 10×10 two-dimensional array and sequentially arranging each row 1 x 2 ... x 99 x 100 ];
2. Calculating the value of each neuron of the hidden layer:
wherein the subscript i is the ith neuron of the hidden layer, the range of values is 1-10, the neuron values of the 1 st to 10 th hidden layers are circularly calculated,is the i-th neuron of the hidden layer, < +.>Is a one-dimensional array of length 100 +.>Is>Is->Is offset from (a);
3. inputting all hidden layer neuron samples to calculate the value of each neuron of the output layer:
a 3 =calc_cell(a 2 ,w 3 ,b 3 ),
wherein ,a3 Is the output layer neuron, w 3 Is a one-dimensional array with length of 10 3 All input weights of b) 3 Is a 3 Is offset from (a);
4. if a is 3 And if the face is more than or equal to 0.95, judging that the face is blocked.
For example, if a 3 And if the number is more than or equal to 0.95, judging that the face is blocked. The accuracy rate reaches 98% after experimental test.
In order to ensure safe travel of people, the entrance of the public place needs to be early warned about whether the pedestrians wear the mask or not. Thereby realizing the fast judgment of whether the face of the human body has a shielding object.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. because the thermal imager generally measures the temperature of the whole face when measuring the body temperature of the head of a human body at present, once the face is shielded by a shielding object, the accuracy of the measured temperature is affected due to the large area. Therefore, the invention develops a pixel temperature capable of rapidly and accurately finding out the forehead part of the human head, and can accurately measure the human body temperature when the human head is shielded.
2. In order to ensure safe travel of people, the entrance of the public place needs to be early warned about whether the pedestrians wear the mask or not. The invention can rapidly judge whether the face of the human body is covered with the mask or the shielding object, and rapidly judge whether the face of the human body is covered with the mask or the shielding object.
Drawings
Fig. 1 is a schematic structural diagram of a neural network.
Fig. 2 is a schematic diagram of the structure of 1 hidden layer neuron.
Fig. 3 is a schematic diagram of the structure of an output layer neuron.
Fig. 4 is a flowchart of a thermal imager-based calibration method for measuring the temperature of a human face.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but embodiments of the present invention are not limited thereto.
Referring to fig. 4, a thermal imager-based calibration method for measuring the temperature of a face of a human body includes the following steps in sequence:
s1, a temperature pixel lattice acquired by a thermal infrared imager each time is a temperature pixel array pixel, and the temperature pixel array pixel is a two-dimensional array;
s2, traversing the temperature pixel array pixel, and searching all data in the temperature pixel array pixel, wherein the data contain the temperature range of 32-45 ℃ and assigning the data to a one-dimensional array filter; the range of the common thermometer is 35-42 ℃, and as the pixel is the original data which is not corrected, the pixel point of the human body is prevented from being leaked, and the data in the range of 32-45 ℃ is selected.
S3, sorting the one-dimensional array filters according to the increasing order to obtain sorted filters_t;
s4, taking data of 3/4 quantiles from the sequenced filter_t as a reference, and taking the Q3 element from the one-dimensional array filter as a reference number to obtain a reference temperature s=filter [ Q3];
wherein ,
s5, searching all pixel position marks 1 which accord with s+/-diff from a temperature pixel array pixel, assigning the pixel position marks 0 which do not accord with s+/-diff to a two-dimensional array pixel_bin, searching a minimum matrix containing all 1 from the two-dimensional array pixel_bin, and expanding the minimum matrix into a square matrix and assigning the square matrix to a two-dimensional array face according to the maximum side length of the matrix according to the middle element position of the matrix; the side length of the square matrix is the maximum side length of the minimum matrix;
wherein diff refers to a reference temperature error range, the width and height of the two-dimensional array pixel_bin are the same as those of the temperature pixel array pixel, and the width and height of the two-dimensional array face cannot exceed those of the temperature pixel array pixel;
s6, the two-dimensional array face is the outline of the face temperature, the top data of the two-dimensional array face is forehead position data, and the average value of the values of the temperature pixel array pixel elements corresponding to all elements 1 in the forehead position data is forehead surface temperature;
s7, fitting the forehead surface temperature into the in-vivo temperature, and obtaining a fitting function through experiments:
body_temperature=0.7797×temperature+9.7271;
wherein body_temperature is the in vivo temperature of the human body.
In step S1, the temperature pixel array pixel is already subjected to distance fitting, and the forehead surface temperature is converted into the human body temperature.
In step S2, the array length range of the one-dimensional array filter is determined by pixel; if pixel is a 32×32 two-dimensional array then the maximum length of the filter is 32×32=1024, and so on.
In step S1, the temperature pixel array pixel is a two-dimensional array of 32×32 temperature pixel array:
in step S2, the one-dimensional array filter is:
filter=[32.1 32.3 36.0 36.5 34.1 35.6 36.4 36.7 36.5 36.4 36.6 36.434.1 36.6 36.5 32.1 33.1 35.1 36.4 36.5]。
in step S3, the obtained ordered filter_t is:
filter_t=[32.1 32.1 32.3 33.1 34.1 34.1 35.1 35.6 36.0 36.4 36.4 36.436.4 36.5 36.5 36.5 36.5 36.6 36.6 36.7]。
in step S4, the length of the one-dimensional array filter is 20,reference temperature s=filter [ Q3]]=36.5。
In step S5, assuming that diff=0.7, searching for a pixel position mark 1 with all element values in the temperature pixel array pixel within 36.5±0.7, and the other marks are 0;
finding out the minimum matrix containing all 1 from the two-dimensional array pixel_bin, and then expanding the minimum matrix into a square matrix according to the position of the middle element of the matrix and the maximum side length of the matrix to obtain the square matrix of the two-dimensional array pixel_bin;
the value of 1 in the two-dimensional array pixel_bin spans 3 columns and 5 rows, so that the square is 5×5, and the 5×3 array is centrally placed in the 5×5 square, so that a two-dimensional array face is obtained;
the two-dimensional array face can be seen to be the outline of the face temperature, the 1 st row is the forehead part, the 2 nd, 3 rd and 4 th rows are the parts from eyes to mouth, and the 5 th row is the neck part.
In step S5, the two-dimensional array face line 1 [01100 ]]Each element corresponds to a temperature pixel array pixelThe average value of the values of the temperature pixel array pixel elements corresponding to all elements of the 1 st row of the two-dimensional array face as 1 is the forehead surface temperature:
temperature=average(p 9,9 ,p 9,10 )。
referring to fig. 1, 2, and 3, the two-dimensional array face is further configured to determine whether a face is blocked by a blocking object, and specifically includes two parts, namely training a model and model identification:
1. training model part:
1. mathematical model definition:
(1) Learning rate k=0.1;
(2) Input layer neuron number: input_num=100; the two-dimensional array face is compressed or amplified into a 10×10 two-dimensional array, and then each row is sequentially arranged into a one-dimensional array with the length of 100, so input_num=100;
(3) Output layer neuron number: output_num=1; since the output result is either blocked or not blocked, if 1 number is output, it can indicate whether it is blocked, and if it is close to 0, it is not blocked, and if it is close to 1, it is blocked;
(4) Hidden layer neuron number hide_layout_num=10; experiments prove that the number of neurons in the hidden layer is 10 and is better;
(5) Activation function usageBecause the sigmoid function maps the variables between 0,1 just can indicate that a near 0 indicates not occluded, a near 1 indicates occluded, the derivative function of the sigmoid function is sigmoid (z)' = sigmoid (z) × (1-sigmoid (z));
(6) The error function is wherein ,cj Is the square error of the actual value and the output value of the jth face sample, e j Is the difference between the actual value of the jth face sample and the output value;
(7) Weight w of hidden layer 2 Is a two-dimensional array of input_num×hide_layout_num, offset b 2 Is a one-dimensional array of length hide_layout_num, neuron a 2 Is a one-dimensional array of length hide_layout_num;
(8) Weights w of output layer 3 Is a two-dimensional array of hide_layout_num×output_num, offset b 3 Is a one-dimensional array of length output_num, neuron a 3 Is a one-dimensional array of length output_num;
(9) The neuron calculation function calc_cell (x, w, b) =sigmoid (x·w+b); where x.w is the inner product of two arrays, x is the value of the input neuron, w is the weight in one-to-one correspondence with each x array element, and b is the bias.
2. Model training process:
(1) Randomly initializing weights w of hidden layers 2 And bias b 2 Weights w of output layer 3 And bias b 3 The method comprises the steps of carrying out a first treatment on the surface of the j is the sample index, max j is the sample number,for an array of face samples, each sample element is an array of length 100;
(2) Definition w 2 、b 2 、w 3 、b 3 The bias leads of (2) are dw respectively 2 、db 2 、dw 3 、db 3 The initial value is 0;
(3)x=input_val j the j-th array of the input_val array is compressed or amplified into a 10 multiplied by 10 two-dimensional array, and each row is sequentially arranged into a one-dimensional array x= [ x ] with the length of 100 1 x 2 ... x 99 x 100 ];
(4) The j-th sample is input to calculate the value of each neuron of the hidden layer:
wherein the subscript i is the ith neuron of the hidden layer, the range of values is 1-10, the neuron values of the 1 st to 10 th hidden layers are circularly calculated,is the i-th neuron of the hidden layer, < +.>Is a one-dimensional array of length 100 +.>Is>Is->Is offset from (a);
(5) Inputting all hidden layer neuron samples to calculate the value of each neuron of the output layer:
a 3 =calc_cell(a 2 ,w 3 ,b 3 ),
wherein ,a3 Is the output layer neuron, w 3 Is a one-dimensional array with length of 10 3 All input weights of b) 3 Is a 3 Is offset from (a);
(6) Calculating the partial derivative of the error of the j-th sample with respect to the output layer neuron:
wherein ,a3 Real_y is the predicted value j Is the actual value of the jth sample;
(7) Calculating the partial derivative of the error of the j-th sample with respect to hidden layer neurons:
wherein ,d3 ×w 3 Is matrix multiplication;
(8) Calculating and accumulating the partial derivatives of the errors of the j-th sample with respect to the weights of the output layers:
(9) Calculating and accumulating the bias derivatives of the errors of the j-th sample with respect to the bias of the output layer:
(10) Calculating and accumulating the bias of the error of the jth sample with respect to the hidden layer weight:
wherein, the subscript i is the ith neuron of the hidden layer, the value range is 1-10, and the neuron values of the 1 st to 10 th hidden layers are circularly calculated;
(11) Calculate and accumulate the bias derivatives of the error of the jth sample with respect to the bias of the hidden layer:
wherein, the subscript i is the ith neuron of the hidden layer, the value range is 1-10, and the neuron values of the 1 st to 10 th hidden layers are circularly calculated;
(12) Continuing to execute the step (3) until j=max_j, and executing the step (13);
(13) Updating weights and biases of a hidden layer and an output layer:
w 3 =w 3 +(-k×dw 3 ),
b 3 =b 3 +(-k×db 3 ),
w 2 =w 2 +(-k×dw 2 ),
b 2 =b 2 +(-k×db 2 );
(14) J=0, and continuing to perform the step (3) untilThe value of (2) is as small as a preset value, and the training parameters are completed;
2. model calculation process:
1. x is one-dimensional array x= [ x ] with length of 100, which is obtained by compressing or amplifying two-dimensional array face acquired in real time into 10×10 two-dimensional array and sequentially arranging each row 1 x 2 ... x 99 x 100 ];
2. Calculating the value of each neuron of the hidden layer:
wherein the subscript i is the ith neuron of the hidden layer, the range of values is 1-10, the neuron values of the 1 st to 10 th hidden layers are circularly calculated,is the i-th neuron of the hidden layer, < +.>Is a one-dimensional array of length 100 +.>Is>Is->Is offset from (a);
3. inputting all hidden layer neuron samples to calculate the value of each neuron of the output layer:
a 3 =calc_cell(a 2 ,w 3 ,b 3 ),
wherein ,a3 Is the output layer neuron, w 3 Is a one-dimensional array with length of 10 3 All input weights of b) 3 Is a 3 Is offset from (a);
4. if a is 3 And if the face is more than or equal to 0.95, judging that the face is blocked.
For example, if a 3 And if the number is more than or equal to 0.95, judging that the face is blocked. The accuracy rate reaches 98% after experimental test.
In order to ensure safe travel of people, the entrance of the public place needs to be early warned about whether the pedestrians wear the mask or not. Thereby realizing the fast judgment of whether the face of the human body has a shielding object.
The above examples are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above examples, and any other changes, modifications, substitutions, combinations, and simplifications that do not depart from the spirit and principle of the present invention should be made in the equivalent manner, and the embodiments are included in the protection scope of the present invention.

Claims (10)

1. The method for calibrating the temperature of the face of the human body based on the thermal imager is characterized by comprising the following steps in sequence:
s1, a temperature pixel lattice acquired by a thermal infrared imager each time is a temperature pixel array pixel, and the temperature pixel array pixel is a two-dimensional array;
s2, traversing the temperature pixel array pixel, and searching all data in the temperature pixel array pixel, wherein the data contain the temperature range of 32-45 ℃ and assigning the data to a one-dimensional array filter;
s3, sorting the one-dimensional array filters according to the increasing order to obtain sorted filters_t;
s4, taking data of 3/4 quantiles from the sequenced filter_t as a reference, and taking the Q3 element from the one-dimensional array filter as a reference number to obtain a reference temperature s=filter [ Q3];
wherein ,
s5, searching all pixel position marks 1 which accord with s+/-diff from a temperature pixel array pixel, assigning the pixel position marks 0 which do not accord with s+/-diff to a two-dimensional array pixel_bin, searching a minimum matrix containing all 1 from the two-dimensional array pixel_bin, and expanding the minimum matrix into a square matrix and assigning the square matrix to a two-dimensional array face according to the maximum side length of the matrix according to the middle element position of the matrix; the side length of the square matrix is the maximum side length of the minimum matrix;
wherein diff refers to a reference temperature error range, the width and height of the two-dimensional array pixel_bin are the same as those of the temperature pixel array pixel, and the width and height of the two-dimensional array face cannot exceed those of the temperature pixel array pixel;
s6, the two-dimensional array face is the outline of the face temperature, the top data of the two-dimensional array face is forehead position data, and the average value of the values of the temperature pixel array pixel elements corresponding to all elements 1 in the forehead position data is forehead surface temperature;
s7, fitting the forehead surface temperature into the in-vivo temperature, and obtaining a fitting function through experiments:
body_temperature=0.7797×temperature+9.7271;
wherein body_temperature is the in vivo temperature of the human body.
2. The calibration method for measuring the temperature of the face of the human body based on the thermal imager according to claim 1, wherein in the step S1, the temperature pixel array pixel is already subjected to distance fitting, and the forehead surface temperature is converted into the human body temperature.
3. The method according to claim 1, wherein in step S2, the array length range of the one-dimensional array filter is determined by pixels; if pixel is a 32×32 two-dimensional array then the maximum length of the filter is 32×32=1024, and so on.
4. The method for calibrating a temperature of a face of a human body based on a thermal imager according to claim 1, wherein in step S1, the temperature pixel array pixel is a two-dimensional array of 32×32 temperature pixel dots:
5. the method for calibrating the temperature of the face of the human body based on the thermal imager according to claim 1, wherein in the step S2, the one-dimensional array filter is:
filter=[32.1 32.3 36.0 36.5 34.1 35.6 36.4 36.7 36.5 36.4 36.6 36.4 34.1 36.6 36.5 32.1 33.1 35.1 36.4 36.5]。
6. the thermal imager-based calibration method for measuring human face temperature according to claim 1, wherein in step S3, the ordered filter_t is:
filter_t=[32.1 32.1 32.3 33.1 34.1 34.1 35.1 35.6 36.0 36.4 36.4 36.4 36.4 36.5 36.5 36.5 36.5 36.6 36.6 36.7]。
7. the method according to claim 1, wherein in step S4, the length of the one-dimensional array filter is 20,reference temperature s=filter [ Q3]]=36.5。
8. The method according to claim 1, wherein in step S5, assuming that diff=0.7, searching for a pixel position 1 with a pixel value of the temperature pixel array pixel within 36.5±0.7, and the other pixel positions are 0;
finding out the minimum matrix containing all 1 from the two-dimensional array pixel_bin, and then expanding the minimum matrix into a square matrix according to the position of the middle element of the matrix and the maximum side length of the matrix to obtain the square matrix of the two-dimensional array pixel_bin;
the value of 1 in the two-dimensional array pixel_bin spans 3 columns and 5 rows, so that the square is 5×5, and the 5×3 array is centrally placed in the 5×5 square, so that a two-dimensional array face is obtained;
the two-dimensional array face can be seen to be the outline of the face temperature, the 1 st row is the forehead part, the 2 nd, 3 rd and 4 th rows are the parts from eyes to mouth, and the 5 th row is the neck part.
9. The method according to claim 1, wherein in step S5, the two-dimensional array face line 1 [01100 ]]Each element corresponds to temperatureIn a subpixel array pixelThe average value of the values of the temperature pixel array pixel elements corresponding to all elements of the 1 st row of the two-dimensional array face as 1 is the forehead surface temperature:
temperature=average(p 9,9 ,p 9,10 )。
10. the method for calibrating the temperature of the face of the human body based on the thermal imager according to claim 1, wherein the two-dimensional array face is further used for judging whether the face of the human body is blocked by a blocking object, and specifically comprises two parts of training a model and model identification:
1. training model part:
1. mathematical model definition:
(1) Learning rate k=0.1;
(2) Input layer neuron number: input_num=100; the two-dimensional array face is compressed or amplified into a 10×10 two-dimensional array, and then each row is sequentially arranged into a one-dimensional array with the length of 100, so input_num=100;
(3) Output layer neuron number: output_num=1; since the output result is either blocked or not blocked, if 1 number is output, it can indicate whether it is blocked, and if it is close to 0, it is not blocked, and if it is close to 1, it is blocked;
(4) Hidden layer neuron number hide_layout_num=10;
(5) Activation function usageBecause the sigmoid function maps the variables between 0,1 just can indicate that a near 0 indicates not occluded, a near 1 indicates occluded, the derivative function of the sigmoid function is sigmoid (z)' = sigmoid (z) × (1-sigmoid (z));
(6) The error function is wherein ,cj Is the firstSquare error of j face samples actual value and output value, e j Is the difference between the actual value of the jth face sample and the output value;
(7) Weight w of hidden layer 2 Is a two-dimensional array of input_num×hide_layout_num, offset b 2 Is a one-dimensional array of length hide_layout_num, neuron a 2 Is a one-dimensional array of length hide_layout_num;
(8) Weights w of output layer 3 Is a two-dimensional array of hide_layout_num×output_num, offset b 3 Is a one-dimensional array of length output_num, neuron a 3 Is a one-dimensional array of length output_num;
(9) The neuron calculation function calc_cell (x, w, b) =sigmoid (x·w+b); wherein x.w is the inner product of two arrays, x is the value of the input neuron, w is the weight corresponding to each x array element one by one, and b is the bias;
2. model training process:
(1) Randomly initializing weights w of hidden layers 2 And bias b 2 Weights w of output layer 3 And bias b 3 The method comprises the steps of carrying out a first treatment on the surface of the j is the sample index, max j is the sample number,for an array of face samples, each sample element is an array of length 100;
(2) Definition w 2 、b 2 、w 3 、b 3 The bias leads of (2) are dw respectively 2 、db 2 、dw 3 、db 3 The initial value is 0;
(3)x=input_val j the j-th array of the input_val array is compressed or amplified into a 10 multiplied by 10 two-dimensional array, and each row is sequentially arranged into a one-dimensional array x= [ x ] with the length of 100 1 x 2 ...x 99 x 100 ];
(4) The j-th sample is input to calculate the value of each neuron of the hidden layer:
wherein the subscript i is the ith neuron of the hidden layer, the range of values is 1-10, the neuron values of the 1 st to 10 th hidden layers are circularly calculated,is the i-th neuron of the hidden layer, < +.>Is a one-dimensional array of length 100 +.>Is>Is->Is offset from (a);
(5) Inputting all hidden layer neuron samples to calculate the value of each neuron of the output layer:
a 3 =calc_cell(a 2 ,w 3 ,b 3 ),
wherein ,a3 Is the output layer neuron, w 3 Is a one-dimensional array with length of 10 3 All input weights of b) 3 Is a 3 Is offset from (a);
(6) Calculating the partial derivative of the error of the j-th sample with respect to the output layer neuron:
wherein ,a3 Real_y is the predicted value j Is the actual value of the jth sample;
(7) Calculating the partial derivative of the error of the j-th sample with respect to hidden layer neurons:
wherein ,d3 ×w 3 Is matrix multiplication;
(8) Calculating and accumulating the partial derivatives of the errors of the j-th sample with respect to the weights of the output layers:
(9) Calculating and accumulating the bias derivatives of the errors of the j-th sample with respect to the bias of the output layer:
(10) Calculating and accumulating the bias of the error of the jth sample with respect to the hidden layer weight:
wherein, the subscript i is the ith neuron of the hidden layer, the value range is 1-10, and the neuron values of the 1 st to 10 th hidden layers are circularly calculated;
(11) Calculate and accumulate the bias derivatives of the error of the jth sample with respect to the bias of the hidden layer:
wherein, the subscript i is the ith neuron of the hidden layer, the value range is 1-10, and the neuron values of the 1 st to 10 th hidden layers are circularly calculated;
(12) Continuing to execute the step (3) until j=max_j, and executing the step (13);
(13) Updating weights and biases of a hidden layer and an output layer:
w 3 =w 3 +(-k×dw 3 ),
b 3 =b 3 +(-k×db 3 ),
w 2 =w 2 +(-k×dw 2 ),
b 2 =b 2 +(-k×db 2 );
(14) J=0, and continuing to perform the step (3) untilThe value of (2) is as small as a preset value, and the training parameters are completed;
2. model calculation process:
1. x is one-dimensional array x= [ x ] with length of 100, which is obtained by compressing or amplifying two-dimensional array face acquired in real time into 10×10 two-dimensional array and sequentially arranging each row 1 x 2 ...x 99 x 100 ];
2. Calculating the value of each neuron of the hidden layer:
wherein the subscript i is the ith neuron of the hidden layer, the range of values is 1-10, the neuron values of the 1 st to 10 th hidden layers are circularly calculated,is the i-th neuron of the hidden layer, < +.>Is a one-dimensional array of length 100 +.>Is>Is->Is offset from (a);
3. inputting all hidden layer neuron samples to calculate the value of each neuron of the output layer:
a 3 =calc_cell(a 2 ,w 3 ,b 3 ),
wherein ,a3 Is the output layer neuron, w 3 Is a one-dimensional array with length of 10 3 All input weights of b) 3 Is a 3 Is offset from (a);
4. if a is 3 And if the face is more than or equal to 0.95, judging that the face is blocked.
CN202010355693.1A 2020-04-29 2020-04-29 Calibration method for measuring human face temperature based on thermal imager Active CN111854960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010355693.1A CN111854960B (en) 2020-04-29 2020-04-29 Calibration method for measuring human face temperature based on thermal imager

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010355693.1A CN111854960B (en) 2020-04-29 2020-04-29 Calibration method for measuring human face temperature based on thermal imager

Publications (2)

Publication Number Publication Date
CN111854960A CN111854960A (en) 2020-10-30
CN111854960B true CN111854960B (en) 2023-09-22

Family

ID=72984967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010355693.1A Active CN111854960B (en) 2020-04-29 2020-04-29 Calibration method for measuring human face temperature based on thermal imager

Country Status (1)

Country Link
CN (1) CN111854960B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113069088B (en) * 2021-03-24 2023-05-05 重庆电子工程职业学院 Artificial intelligence interaction device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103479339A (en) * 2013-09-29 2014-01-01 中华人民共和国南京出入境检验检疫局 Infrared body temperature monitoring automatic calibration method and system
CN105138720A (en) * 2015-07-13 2015-12-09 北京环境特性研究所 Matrix orthogonal triangularization based rating data curve fitting method
JP2017136988A (en) * 2016-02-04 2017-08-10 パナソニックIpマネジメント株式会社 Human detection device and air conditioning device using human detection device
CN109512402A (en) * 2018-11-09 2019-03-26 吉林大学 The method of the accurate medical human infrared thermal imaging of short distance various dimensions
CN110726476A (en) * 2019-10-21 2020-01-24 重庆大学 Thermal environment regulation and control system and regulation and control method based on human body infrared temperature monitoring

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103479339A (en) * 2013-09-29 2014-01-01 中华人民共和国南京出入境检验检疫局 Infrared body temperature monitoring automatic calibration method and system
CN105138720A (en) * 2015-07-13 2015-12-09 北京环境特性研究所 Matrix orthogonal triangularization based rating data curve fitting method
JP2017136988A (en) * 2016-02-04 2017-08-10 パナソニックIpマネジメント株式会社 Human detection device and air conditioning device using human detection device
CN109512402A (en) * 2018-11-09 2019-03-26 吉林大学 The method of the accurate medical human infrared thermal imaging of short distance various dimensions
CN110726476A (en) * 2019-10-21 2020-01-24 重庆大学 Thermal environment regulation and control system and regulation and control method based on human body infrared temperature monitoring

Also Published As

Publication number Publication date
CN111854960A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN110287944B (en) Crop pest monitoring method based on multispectral remote sensing image of deep learning
CN104050643B (en) Remotely sensing image geometric and radiation integrated relative correction method and system
CN106441808A (en) Thermal infrared hyperspectral imager blind pixel detection device and method
CN110443881B (en) Bridge deck morphological change recognition bridge structure damage CNN-GRNN method
CN111854960B (en) Calibration method for measuring human face temperature based on thermal imager
CN105138720B (en) Nominal data curve-fitting method based on matrix ORTHOGONAL TRIANGULAR
CN109724703A (en) Temperature correction method under complex scene based on pattern-recognition
CN107928631B (en) Near-infrared brain function signal processing method based on differential path factor estimation
CN112132803A (en) Egg freshness detection method based on convolutional neural network
Dong et al. Bruise detection and classification in jujube using thermal imaging and DenseNet
CN106940219A (en) A kind of spectral response acquisition methods of broadband satellite remote sensor in orbit
CN116385819A (en) Water quality evaluation method, device and equipment based on neural network model
Song et al. A three-dimensional reconstruction algorithm for extracting parameters of the banana pseudo-stem
CN108226059A (en) A kind of satellite EO-1 hyperion CO2The in-orbit Calibration Method of survey meter
Verma et al. Classification of LISS IV imagery using decision tree methods
Al-Saddik et al. Protocol for the definition of a multi-spectral sensor for specific foliar disease detection: Case of “Flavescence dorée”
Lapkova et al. Using Artificial Neural Network For The Kick Techniques Classification-An Initial Study.
CN113920345A (en) Hyperspectral image dimension reduction method based on clustering multi-manifold measure learning
Mu et al. Wood defects recognition based on fuzzy bp neural network
CN112364773A (en) Hyperspectral target detection method based on L1 regular constraint depth multi-instance learning
CN112232208A (en) Infrared human face temperature measurement system and method thereof
Maximova et al. Study of XAI-capabilities for early diagnosis of plant drought
CN113609452B (en) Real-time error correction method for body temperature screening system
Chen et al. The Research of Pest Detection in Granary Based on Yolov4
NL2026463B1 (en) Method and tool to georeference, cross-calibrate and fuse remote sensed imagery

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant