CN115830641A - Employee identification method and device, electronic equipment and storage medium - Google Patents

Employee identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115830641A
CN115830641A CN202310080028.XA CN202310080028A CN115830641A CN 115830641 A CN115830641 A CN 115830641A CN 202310080028 A CN202310080028 A CN 202310080028A CN 115830641 A CN115830641 A CN 115830641A
Authority
CN
China
Prior art keywords
image data
personnel
color space
staff
probability distribution
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.)
Granted
Application number
CN202310080028.XA
Other languages
Chinese (zh)
Other versions
CN115830641B (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.)
Sichuan Honghe Digital Intelligence Group Co ltd
Original Assignee
Sichuan Honghe Communication Group 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 Sichuan Honghe Communication Group Co ltd filed Critical Sichuan Honghe Communication Group Co ltd
Priority to CN202310080028.XA priority Critical patent/CN115830641B/en
Publication of CN115830641A publication Critical patent/CN115830641A/en
Application granted granted Critical
Publication of CN115830641B publication Critical patent/CN115830641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)

Abstract

The embodiment of the application relates to the technical field of personnel identification, and provides an employee identification method, an employee identification device, electronic equipment and a storage medium, wherein the employee identification method comprises the following steps: acquiring personnel image data based on the real-time monitoring image; constructing a Gaussian probability distribution for the person image data based on pixel values of the person image data; calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold. According to the method and the device, the similarity between the personnel image and the employee image in the real-time image is judged based on the divergence of the Gaussian distribution of the personnel image data in the real-time image and the Gaussian distribution of the pre-learned employee.

Description

Employee identification method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of staff identification, in particular to a staff identification method, a staff identification device, electronic equipment and a storage medium.
Background
In a dangerous operation scene, such as an oil and gas station, a chemical plant and the like, staff performing operations need to be trained strictly and then can work on duty, and when untrained staff or other irrelevant staff (such as customers and the like) enter the operation scene, serious safety accidents may be caused due to non-normative operations and behaviors, so that the rapid identification of the staff and the non-staff in the dangerous operation scene is of great significance for judging the behavior norms and avoiding the safety accidents.
The current employee identification method under dangerous work scene is mainly that security personnel identify through on-site real-time monitoring picture based on experience, or identify through trained deep learning model. However, on one hand, these solutions have high labor cost and time cost, and require a lot of manpower and time for data acquisition, labeling and cleaning, which are required by security personnel or training deep learning models; on the other hand, training and running of deep learning models consumes a large amount of computing resources. Therefore, how to implement employee identification in a light weight and high efficiency becomes a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application aims to provide a method and a device for identifying staff, electronic equipment and a storage medium, and aims to solve the problem of how to realize staff identification in a light weight and high efficiency manner.
A first aspect of an embodiment of the present application provides an employee identification method, including:
acquiring personnel image data based on the real-time monitoring image;
constructing a Gaussian probability distribution for the person image data based on pixel values of the person image data;
and calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold.
In an alternative embodiment, constructing a gaussian probability distribution for the human image data based on pixel values of the human image data includes:
acquiring clustering centers of target quantity based on pixel values of the personnel image data;
taking the pixel value of the personnel image data closest to each clustering center as the pixel value corresponding to each clustering center;
and calculating the mean value and the variance of the pixel value corresponding to each clustering center, and constructing the Gaussian probability distribution aiming at the personnel image data based on the mean values and the variances of the pixel values corresponding to all the clustering centers.
In an alternative embodiment, the employee feature probability distribution is obtained as follows:
carrying out pixel combination on preset reference image data to obtain preset learning data, wherein the preset reference image data comprises a plurality of employee image data;
and constructing a Gaussian probability distribution aiming at the pre-learning data based on the pixel values of the pre-learning data to serve as the staff characteristic probability distribution.
In an alternative embodiment, constructing a gaussian probability distribution for the pre-learning data based on pixel values of the pre-learning data comprises:
acquiring pre-learning clustering centers of a target number based on pixel values of the pre-learning data;
taking the pixel value of the pre-learning data closest to each pre-learning cluster center as the pixel value corresponding to each pre-learning cluster center;
and calculating the mean value and the variance of the pixel value corresponding to each pre-learning clustering center, and constructing the Gaussian probability distribution aiming at the pre-learning data based on the mean value and the variance of the pixel values corresponding to all the pre-learning clustering centers.
In an alternative embodiment, the acquiring of the image data of the person based on the real-time monitoring image comprises:
acquiring the position of a person in the real-time monitoring image, and segmenting the position of the person to obtain a person segmentation result;
cutting the real-time monitoring image based on the personnel segmentation result, taking the personnel segmentation result as a foreground image, and setting a background image to be black;
and forming the foreground image and the background image into the personnel image data.
In an optional implementation manner, the human image data is BGR color space image data, and after the human image data is acquired, the method further includes:
converting the personnel image data into HSV color space image data;
normalizing the mean value and the variance of the V-channel image data of the HSV color space image data to the mean value and the variance of preset reference image data to obtain new HSV color space image data;
and converting the new HSV color space image data into BGR color space image data to serve as the personnel image data.
In an alternative embodiment, after converting the new HSV color space image data to BGR color space image data, the method further comprises:
converting the BGR color space image data to CLELAB color space image data;
normalizing the mean value and the variance of the CLELAB color space image data to the mean value and the variance in the CLELAB color space corresponding to the preset reference image data to obtain new CLELAB color space image data;
converting the new CLELAB color space image data into BGR color space image data as the human image data.
A second aspect of the embodiments of the present application provides an employee identification apparatus, including:
the personnel image acquisition module is used for acquiring personnel image data based on the real-time monitoring image;
a probability distribution obtaining module, configured to construct a gaussian probability distribution for the person image data based on pixel values of the person image data;
and the staff identification module is used for calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and if the KL divergence is smaller than an identification threshold value, the staff image data is determined as staff image data.
Wherein, the probability distribution acquisition module includes:
the clustering center obtaining submodule is used for obtaining the clustering centers of the target number based on the pixel value of the personnel image data;
the clustering acquisition submodule is used for taking the pixel value of the personnel image data closest to each clustering center as the pixel value corresponding to each clustering center;
and the distribution construction submodule is used for calculating the mean value and the variance of the pixel value corresponding to each clustering center and constructing the Gaussian probability distribution aiming at the personnel image data based on the mean value and the variance of the pixel values corresponding to all the clustering centers.
Wherein, the device still includes:
the pre-learning data acquisition sub-module is used for carrying out pixel combination on preset reference image data to obtain pre-learning data, wherein the preset reference image data comprises a plurality of employee image data;
and the staff distribution acquisition submodule is used for constructing Gaussian probability distribution aiming at the pre-learning data based on the pixel value of the pre-learning data and taking the Gaussian probability distribution as the staff characteristic probability distribution.
Wherein, staff distribution obtains submodule piece, includes:
a pre-learning cluster center obtaining subunit, configured to obtain pre-learning cluster centers of a target number based on a pixel value of the pre-learning data;
a pre-learning cluster acquisition subunit, configured to use a pixel value of the pre-learning data closest to each pre-learning cluster center as a pixel value corresponding to each pre-learning cluster center;
and the staff distribution construction subunit is used for calculating the mean value and the variance of the pixel value corresponding to each pre-learning clustering center, and constructing the Gaussian probability distribution aiming at the pre-learning data based on the mean value and the variance of the pixel values corresponding to all the pre-learning clustering centers.
Wherein, personnel image acquisition module includes:
the segmentation submodule is used for acquiring the position of a person in the real-time monitoring image, and segmenting the position of the person to obtain a person segmentation result;
the cutting sub-module is used for cutting the real-time monitoring image based on the personnel segmentation result, taking the personnel segmentation result as a foreground image, and setting a background image to be black;
and the personnel image acquisition sub-module is used for forming the personnel image data by the foreground image and the background image.
Wherein, the device still includes:
the first color space conversion module is used for converting the personnel image data into HSV color space image data;
the first normalization module is used for normalizing the mean value and the variance of the V-channel image data of the HSV color space image data to the mean value and the variance of preset reference image data to obtain new HSV color space image data;
and the brightness enhancement module is used for converting the new HSV color space image data into BGR color space image data to serve as the personnel image data.
Wherein, the device includes:
a second color space conversion module for converting the BGR color space image data into CLELAB color space image data;
the second normalization module is used for normalizing the mean value and the variance of the CLELAB color space image data to the mean value and the variance in the CLELAB color space corresponding to the preset reference image data to obtain new CLELAB color space image data;
and the color enhancement module is used for converting the new CLELAB color space image data into BGR color space image data as the personnel image data.
A third aspect of embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps in the employee identification method according to any one of the first aspect.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, on which a computer program/instructions are stored, which, when executed by a processor, implement the steps in an employee identification method according to any one of the first aspect.
Advantageous effects
The embodiment of the application provides a method and a device for identifying employees, electronic equipment and a storage medium, and the method comprises the following steps: acquiring personnel image data based on the real-time monitoring image; constructing a Gaussian probability distribution for the person image data based on pixel values of the person image data; calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold. According to the method and the device, the similarity between the personnel image and the employee image in the real-time image is judged based on the divergence of the Gaussian distribution of the personnel image data in the real-time image and the pre-learned employee Gaussian distribution, massive model training is not needed, the processing time is short, the calculation cost is low, and light-weight and efficient employee identification is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart of a prior art method of performing employee identification;
fig. 2 is a flowchart of an employee identification method according to an embodiment of the present application;
fig. 3 is a schematic diagram of an employee identification method according to an embodiment of the present application;
fig. 4 is a schematic diagram of an employee identification apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related technology, the employee identification method under the dangerous work scene mainly comprises the steps that security personnel identify through a field real-time monitoring picture based on experience, or identify through a trained deep learning model. However, on one hand, these solutions have high labor cost and time cost, and require a lot of manpower and time for data acquisition, labeling and cleaning, which are required by security personnel or training deep learning models; on the other hand, training and running of deep learning models consumes a large amount of computing resources.
Specifically, fig. 1 shows a flow chart of a method for identifying employees in the prior art, and as shown in fig. 1, an image recognition network is used for identifying employees. However, a large amount of manpower is required for data acquisition, labeling and cleaning required for training the depth model, long time is required for data preparation, labeling, cleaning and depth model training, and a large amount of computing resources are consumed for the training and online running of the depth model.
In view of this, an embodiment of the present application provides an employee identification method, and fig. 2 shows a flowchart of the employee identification method, as shown in fig. 2, including the following steps:
and S101, acquiring personnel image data based on the real-time monitoring image.
S102, constructing Gaussian probability distribution aiming at the personnel image data based on the pixel values of the personnel image data.
S103, calculating KL divergence between Gaussian probability distribution and staff feature probability distribution of the staff image data, and if the KL divergence is smaller than an identification threshold, determining the staff image data as staff image data.
In the embodiment of the application, the real-time monitoring image is a real-time image in a camera view field range captured by a monitoring camera distributed and controlled in an operation scene in real time, for example, the operation scene may be a dangerous operation scene, and the dangerous operation scene is a scene that may cause major safety accidents due to irregular actions or equipment faults, for example, operation scenes such as oil and gas stations and chemical plants. Since personnel who work in a dangerous work scene must be trained strictly and then can work on duty, and untrained employees or other irrelevant personnel (such as customers) entering the work scene may cause major safety accidents due to irregular operation and behaviors, the employees and non-employees in the dangerous work scene need to be identified quickly to avoid the occurrence of the safety accidents.
The monitoring camera is a high-definition explosion-proof camera, the camera is a high-definition camera with 200 ten thousand pixels (1920 x 1080), and ipx-grade water resistance is adopted. The distance between the defense area and the camera is 9 meters. In the embodiment of the application, specific monitoring camera parameters and defense deployment area distances can be determined according to actual conditions, and the application is not limited herein.
In the embodiment of the application, the personnel image data is the personnel image in the real-time monitoring image, and the personnel image can be the personnel wearing the personnel clothes in the visual field range of the camera and can also be the non-personnel wearing any clothes of the non-personnel clothes.
In the embodiment of the application, the personnel image data are composed of pixels of a BGR color space, and a clustering center and pixels corresponding to the clustering center are generated by clustering the pixel values of the BGR color space, so that a ternary independent Gaussian probability distribution corresponding to the pixels of the personnel image data is constructed.
In the embodiment of the application, ternary independent Gaussian probability distribution corresponding to pixels of personnel image data is used for representing personnel image clothes color information, staff characteristic probability distribution is used for representing staff clothes color information, similarity between the personnel image data and staff characteristics is measured by calculating KL divergence (Kullback-Leibler divergence) between the personnel image data and the staff clothes color information, and when the KL divergence between the ternary independent Gaussian probability distribution corresponding to the personnel image data and the staff characteristic probability distribution is smaller than an identification threshold value, a person in the personnel image data is considered to be a staff; and when the KL divergence between the ternary independent Gaussian probability distribution corresponding to the personnel image data and the employee characteristic probability distribution is larger than or equal to an identification threshold, determining that the personnel in the personnel image data are non-employees.
In the embodiment of the application, the computing platform for computing the ternary independent Gaussian distribution and the KL divergence comprises 1 computer with 1080Ti, the internal memory is 8G, and the dominant frequency of the processor is 2.3GHz. The configuration of a particular computing platform may be determined on a case-by-case basis, and the application is not limited thereto.
Fig. 3 shows a schematic diagram of an employee identification method, as shown in fig. 3, in order to make those skilled in the art better understand the scheme of the present application, the scheme of the present application is described in detail with reference to fig. 3:
specifically, when step S101 is executed, a real-time monitoring image in a view field of a camera deployed and controlled in a scene is first acquired, where the real-time monitoring image includes at least one person image. Then, selecting one person image data in the real-time monitoring image of the frame, and independently segmenting the person image data for subsequent processing, specifically, acquiring the position of a person area in a dynamic area as the position of a person in the real-time monitoring image based on the dynamic area and a static area in the real-time monitoring image, wherein the position of the person is the position of the person image in the real-time monitoring image of the frame; after the position of the person is determined, the position of the person is segmented to obtain a person segmentation result. It should be noted that, the target detection technology and the image segmentation technology may refer to the prior art, and are not described herein again.
And then, cutting the real-time monitoring image based on the personnel segmentation result, cutting the personnel segmentation result from the real-time monitoring image of the current frame to be used as a foreground image, setting a background image to be black, and forming the personnel image data by the foreground image and the background image. The foreground image in the personnel image data is the pixel of the personnel image data, and the background image is black so as to prevent adverse effects when the pixel of the foreground image is processed subsequently. It should be noted that, the method for cutting and setting the background to be black can refer to the prior art, and is not described herein again.
In an optional implementation manner, after the person image data is obtained, the person image data is preprocessed, so that the recognition efficiency and accuracy of a subsequent processing process are improved. Specifically, after the person image data is acquired, the brightness of the person image data needs to be enhanced so that the brightness information of the person image data is unified with the brightness information of the pre-learning data for generating the staff feature probability distribution.
Since the pixels of the human image data are pixels of the BGR color space, in order to adjust the brightness (brightness) information of the human image data, in an alternative embodiment, the human image data is first converted into HSV or HSI color space image data. Taking the conversion of the personal image data into HSV color space image data as an example, an HSV (Hue, value) color space is a color space created according to the intuitive characteristic of color, and is also called a hexagonal pyramid Model (Hexcone Model), and the parameters of the color in the Model are Hue (H), saturation (S), and lightness (V), respectively; acquiring V channel data in the HSV color space image data, wherein the V channel data represents brightness information of the image data; then, calculating the mean value and the variance of the V-channel data, and normalizing the mean value and the variance of the V-channel image data of the HSV color space image data to the mean value and the variance of preset reference image data to obtain new HSV color space image data, wherein the preset reference image data is pre-learning data used for constructing staff feature probability distribution; and finally, converting the new HSV color space image data back into BGR color space image data to serve as the personnel image data, so that the brightness enhancement of the personnel image data is completed, and the brightness of the personnel image data is the same as that of preset reference image data.
In an optional implementation manner, after the brightness-enhanced person image data is obtained, the brightness-enhanced person image data needs to be further processed, so that the recognition efficiency and accuracy of the subsequent processing process are improved. Specifically, after acquiring the person image data with enhanced brightness, it is necessary to enhance the color of the person image data with enhanced brightness so that the information of the color of the person image data is unified with the color information of the pre-learning data for generating the staff feature probability distribution.
Because the pixels of the person image data are pixels of a BGR color space, in order to adjust color information of the person image data, the person image data needs to be converted into CLELAB color space image data, where the CLELAB color space is a device-independent color space and is also a color system based on physiological characteristics, and the color space has a larger color gamut and is a visual sensation described by a digital method; then, calculating the mean value and the variance of the CLELAB color space image data, normalizing the mean value and the variance of the CLELAB color space image data to the mean value and the variance of preset reference image data to obtain new CLELAB color space image data, wherein the preset reference image data is pre-learning data used for constructing employee feature probability distribution; and finally, converting the new CLELAB color space image data back into BGR color space image data serving as the personnel image data, so as to finish the color enhancement of the personnel image data, wherein the color intensity of the personnel image data is the same as that of preset reference image data.
Specifically, when step S102 is executed, a gaussian probability distribution for the personal image data is constructed in a K-means clustering (K-means) manner based on the pixel values of the personal image data. Specifically, firstly, pixel-by-pixel expansion is performed on pixel values of the human image data to obtain a plurality of three-dimensional vectors corresponding to the pixel values of the human image data, wherein the three-dimensional vector c is a vector (b, g, r) corresponding to a BGR pixel value; then, all three-dimensional vectors corresponding to pixel values of the personnel image data are used as sample values, sample values with a target number are randomly selected to be used as first clustering centers, euclidean distances from all the sample values to the first clustering centers are calculated, and all the sample values closest to each first clustering center are used as clusters corresponding to the first clustering centers; the mean of all sample values within each cluster is then calculated as the new cluster center. And repeating the iteration of the clustering process until the position of the clustering center is not changed, and taking the clustering center updated for the last time as the output clustering center.
Based on the acquisition process of the clustering centers, obtaining the clustering centers of the target number, wherein the clustering centers are the clustering centers of which the positions are not changed any more after the iteration process, the pixel value of the personnel image data closest to each clustering center is used as the pixel value corresponding to each clustering center, and the three-dimensional vector of the pixel value corresponding to each clustering center is c p =(b p ,g p ,r p ) (ii) a Calculating a mean value mu for each cluster from the three-dimensional vectors of pixel values in the cluster corresponding to each cluster center p Sum variance Σ p (ii) a Finally, μ based on the pixel values corresponding to all cluster centers p Sum variance Σ p Constructing the ternary independent Gaussian probability distribution N aiming at the personnel image data p~p,p ) The three-dimensional independent Gaussian distribution represents the clothing information of the person in the image, and the clothing information can be clothing worn by the person, such as coats, off-coats, hats, shoes and the like. Since the clothing of the employee is a work clothing which is greatly different from the daily clothing, the gaussian distribution obtained by clustering the image data of the employee based on the work clothing can be used for representing the difference between the information of the work clothing and the clothing of the employee, for example, if the work clothing is aimed atThe similarity between the ternary independent Gaussian probability distribution of the image data of the person and the Gaussian distribution of the image data of the staff is low, which indicates that the probability that the clothing of the person in the image data of the person is the clothing of the staff is low, and the probability that the person is the staff is low.
It should be noted that the target number of the cluster centers is determined by the employee clothing prior information, the number of the cluster centers is at least 2, and for example, the number of the cluster centers may be 2 to 3. The number of the specific targets of the cluster center can be determined according to actual conditions, and the application is not limited herein.
Taking fig. 3 as an example, pixel-by-pixel expansion is performed on the pixel values of the person image data, and K-means clustering is performed to obtain a three-dimensional vector corresponding to each clustering center. Specifically, for the employee image data on the left side in fig. 3, the three-dimensional vector of the pixel value of the employee image data corresponding to each cluster center is c s Wherein the corresponding vector in the first dimension is
Figure SMS_11
With a mean value of
Figure SMS_1
Variance of
Figure SMS_7
(ii) a The corresponding vector in the second dimension is
Figure SMS_12
With a mean value of
Figure SMS_14
Variance of
Figure SMS_15
(ii) a The corresponding vector in the third dimension is
Figure SMS_18
With a mean value of
Figure SMS_13
Variance of
Figure SMS_16
. For the non-employee image data on the right side in fig. 3, the three-dimensional vector of the employee image data pixel value corresponding to each cluster center is c p Wherein the corresponding vector in the first dimension is
Figure SMS_2
With a mean value of
Figure SMS_8
Variance of
Figure SMS_3
(ii) a The corresponding vector in the second dimension is
Figure SMS_5
With a mean value of
Figure SMS_10
Variance of
Figure SMS_17
(ii) a The corresponding vector in the third dimension is
Figure SMS_4
With a mean value of
Figure SMS_6
Variance of
Figure SMS_9
Therefore, ternary independent Gaussian distribution aiming at personnel image data is obtained and used for representing dress feature information of the personnel image, similarity with staff feature probability distribution needs to be determined, and the staff is determined to be staff or non-staff by taking the similarity as a judgment standard.
Specifically, when step S103 is executed, staff feature probability distribution is first obtained and used as a criterion for determining the ternary independent gaussian distribution for the staff image data. In an optional embodiment, the staff feature probability distribution is obtained as follows:
firstly, a plurality of employee image data which are stored in advance are obtained, wherein the employee in the employee image data is an employee wearing employee clothing, the employee image data are used as preset reference images and are used for obtaining ternary independent Gaussian distribution aiming at the employee image data, the employee image data are combined, and pre-learning data are obtained, and the pre-learning data comprise pixel values of BGR color spaces in the employee image data.
And constructing a Gaussian probability distribution for the pre-learning data in a K-means clustering (K-means) mode based on the pixel values of the pre-learning data. Specifically, first, pixel-by-pixel expansion is performed on the pixel values of the pre-learning data to obtain a plurality of three-dimensional vectors c corresponding to the pixel values of the person image data s Vector (b) corresponding to BGR pixel value s ,g s ,r s ) (ii) a Then, all three-dimensional vectors corresponding to pixel values of the pre-learning data are used as sample values, a target number of the sample values are randomly selected to be used as a first pre-learning cluster center, euclidean distances from all the sample values to the first pre-learning cluster center are calculated, and all sample values closest to each first pre-learning cluster center are used as clusters corresponding to the first pre-learning cluster center; the mean of all sample values within each cluster is then calculated as the new pre-learned cluster center. And repeating the iteration of the clustering process until the position of the pre-learning clustering center is not changed any more, and taking the last updated pre-learning clustering center as the output pre-learning clustering center.
Obtaining a target number of pre-learning cluster centers based on the acquisition process of the pre-learning cluster centers, wherein the pre-learning cluster centers are pre-learning cluster centers of which the positions are not changed any more after the iteration process, the pixel value of the pre-learning data closest to each pre-learning cluster center is used as the pixel value corresponding to each pre-learning cluster center, and the three-dimensional vector of the pixel value corresponding to each pre-learning cluster center is c s =(b s ,g s ,r s ) (ii) a According to corresponding to each pre-learned cluster centreThree-dimensional vectors of pixel values in clusters, calculating a mean value mu for each cluster s Sum variance Σ s (ii) a Finally, the mean value mu of the pixel values corresponding to all the pre-learning cluster centers is used as the basis s Sum variance Σ s Constructing the ternary independent Gaussian probability distribution N for the pre-learning data s~s,s ) The three-element independent Gaussian distribution represents the clothing information of the staff in the preset reference image in the pre-learning data, and the clothing information can be clothing worn by the staff, such as coats, off-coats, hats, shoes and the like. The ternary independent Gaussian distribution for the pre-learning data represents employee clothing information and serves as a standard for employee identification, and if the similarity between the ternary independent Gaussian distribution for the image data of the person and the ternary independent Gaussian distribution for the pre-learning data is high, the possibility that the person in the image data of the person is the employee is high; if the similarity between the ternary independent Gaussian distribution for the image data of the person and the ternary independent Gaussian distribution for the pre-learning data is low, the possibility that the person in the image data of the person is a staff is low.
It should be noted that the number of targets of the pre-learning clustering centers is determined based on the employee clothing prior information, and the number of the pre-learning clustering centers is at least 2, and is generally 2 to 3. The number of the targets of the specific pre-learning clustering center can be determined according to actual conditions, and the application is not limited herein.
After the ternary independent Gaussian distribution for the image data of the person and the ternary independent Gaussian distribution for the pre-learning data are obtained, a KL divergence (Kullback-Leibler divergence) between the two is calculated to represent the similarity of the two. Statistically, the KL divergence can be used to measure the degree of difference between two distributions. If the difference between the two is smaller, the KL divergence is smaller; conversely, if the difference between the two is larger, the KL divergence is larger; when both distributions are in agreement, the KL divergence thereof is 0.
In the embodiment of the present application, a recognition threshold is set to distinguish the calculation results of KL divergences. Specifically, if the three-dimensional independent Gaussian distribution N is applied to the person image data p With the ternary independent Gaussian distribution N for the pre-learned data s KL divergence between is less than the recognition threshold, indicating a ternary independent Gaussian distribution N for the person image data p With the ternary independent Gaussian distribution N for the pre-learned data s The difference is small, the similarity between the personnel image data and the pre-learning data is high at the moment, the personnel image data is determined as the staff image data, and the staff in the personnel image data is the staff; if aiming at the ternary independent Gaussian distribution N of the personnel image data p With the ternary independent Gaussian distribution N for the pre-learned data s KL divergence between is greater than or equal to the recognition threshold, indicating a ternary independent Gaussian distribution N for the person image data p With the ternary independent Gaussian distribution N for the pre-learned data s The difference between the image data of the staff and the pre-learning data is large, the similarity between the image data of the staff and the pre-learning data is low, the image data of the staff is determined to be image data of non-staff, and the staff in the image data of the staff is non-staff. Illustratively, the recognition threshold value generally takes 30.0KL divergence, and it should be noted that the recognition threshold value may be determined according to actual situations, and the application is not limited herein.
In an optional embodiment, after the identification result is obtained, the identification result may be used for input information of a subsequent downstream task, for example, to identify a dangerous behavior in a dangerous work scene, so as to effectively avoid occurrence of a dangerous event. For example, the algorithm can support downstream tasks such as judgment of whether oil and gas station staffs wear clothes according to specifications, perimeter intrusion detection, long-term worker-free identification of a refueling area, staffs doze detection during work and the like. After the personnel identity identification in the oil and gas station is completed based on the scheme of the application, the algorithm logic operation corresponding to the downstream task is executed, the problem of computing resource waste caused by reasoning all algorithms together is avoided, and the computing cost is saved.
The embodiment of the application provides an employee identification method, which comprises the following steps: acquiring personnel image data based on the real-time monitoring image; constructing a Gaussian probability distribution for the person image data based on pixel values of the person image data; calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold. According to the method and the device, the similarity between the personnel image and the employee image in the real-time image is judged based on the divergence of the Gaussian distribution of the personnel image data in the real-time image and the pre-learned employee Gaussian distribution, massive model training is not needed, the processing time is short, the calculation cost is low, and light-weight and efficient employee identification is achieved.
Based on the same inventive concept, the embodiment of the present application discloses an employee identification apparatus, and fig. 4 shows a schematic diagram of the employee identification apparatus, as shown in fig. 4, including:
the personnel image acquisition module is used for acquiring personnel image data based on the real-time monitoring image;
a probability distribution acquisition module for constructing a gaussian probability distribution for the person image data based on pixel values of the person image data;
and the staff identification module is used for calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and if the KL divergence is smaller than an identification threshold value, the staff image data is determined as staff image data.
Wherein, the probability distribution acquisition module includes:
the clustering center obtaining submodule is used for obtaining the clustering centers of the target number based on the pixel value of the personnel image data;
the clustering acquisition submodule is used for taking the pixel value of the personnel image data closest to each clustering center as the pixel value corresponding to each clustering center;
and the distribution construction submodule is used for calculating the mean value and the variance of the pixel value corresponding to each clustering center and constructing the Gaussian probability distribution aiming at the personnel image data based on the mean value and the variance of the pixel values corresponding to all the clustering centers.
Wherein, the device still includes:
the pre-learning data acquisition sub-module is used for carrying out pixel combination on preset reference image data to obtain pre-learning data, wherein the preset reference image data comprises a plurality of employee image data;
and the staff distribution acquisition submodule is used for constructing Gaussian probability distribution aiming at the pre-learning data based on the pixel value of the pre-learning data to be used as the staff characteristic probability distribution.
Wherein, staff distribution obtains submodule piece, includes:
a pre-learning cluster center obtaining subunit, configured to obtain pre-learning cluster centers of a target number based on a pixel value of the pre-learning data;
a pre-learning cluster acquisition subunit, configured to use a pixel value of the pre-learning data closest to each pre-learning cluster center as a pixel value corresponding to each pre-learning cluster center;
and the staff distribution construction subunit is used for calculating the mean value and the variance of the pixel value corresponding to each pre-learning clustering center, and constructing the Gaussian probability distribution aiming at the pre-learning data based on the mean value and the variance of the pixel values corresponding to all the pre-learning clustering centers.
Wherein, personnel image acquisition module includes:
the segmentation submodule is used for acquiring the position of a person in the real-time monitoring image, and segmenting the position of the person to obtain a person segmentation result;
the cutting sub-module is used for cutting the real-time monitoring image based on the personnel segmentation result, taking the personnel segmentation result as a foreground image, and setting a background image to be black;
and the personnel image acquisition sub-module is used for forming the personnel image data by the foreground image and the background image.
Wherein, the device still includes:
the first color space conversion module is used for converting the personnel image data into HSV color space image data;
the first normalization module is used for normalizing the mean value and the variance of the V-channel image data of the HSV color space image data to the mean value and the variance of preset reference image data to obtain new HSV color space image data;
and the brightness enhancement module is used for converting the new HSV color space image data into BGR color space image data to serve as the personnel image data.
Wherein, the device includes:
a second color space conversion module for converting the BGR color space image data into CLELAB color space image data;
the second normalization module is used for normalizing the mean value and the variance of the CLELAB color space image data to the mean value and the variance in the CLELAB color space corresponding to the preset reference image data to obtain new CLELAB color space image data;
and the color enhancement module is used for converting the new CLELAB color space image data into BGR color space image data as the personnel image data.
Based on the same inventive concept, an embodiment of the present application discloses an electronic device, and fig. 5 shows a schematic diagram of the electronic device disclosed in the embodiment of the present application, and as shown in fig. 5, the electronic device 100 includes: the memory 110 and the processor 120 are connected in a communication manner through a bus, and the memory 110 and the processor 120 are connected in a communication manner, and a computer program is stored in the memory 110, and can be run on the processor 120 to implement the steps in an employee identification method disclosed in the embodiment of the present application.
Based on the same inventive concept, the embodiment of the present application discloses a computer-readable storage medium, on which a computer program/instruction is stored, and the computer program/instruction, when executed by a processor, implements the steps in an employee identification method disclosed in the embodiment of the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, electronic devices and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or terminal apparatus that comprises the element.
The employee identification method, the employee identification device, the electronic device and the storage medium provided by the present invention are introduced in detail, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An employee identification method, comprising:
acquiring personnel image data based on the real-time monitoring image;
constructing a Gaussian probability distribution for the person image data based on pixel values of the person image data;
calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold.
2. The employee identification method according to claim 1, wherein constructing a gaussian probability distribution for the person image data based on pixel values of the person image data includes:
acquiring clustering centers of target quantity based on pixel values of the personnel image data;
taking the pixel value of the personnel image data closest to each clustering center as the pixel value corresponding to each clustering center;
and calculating the mean value and the variance of the pixel value corresponding to each clustering center, and constructing the Gaussian probability distribution aiming at the personnel image data based on the mean values and the variances of the pixel values corresponding to all the clustering centers.
3. The employee identification method according to claim 1, wherein the employee feature probability distribution is obtained as follows:
carrying out pixel combination on preset reference image data to obtain preset learning data, wherein the preset reference image data comprises a plurality of employee image data;
and constructing a Gaussian probability distribution aiming at the pre-learning data based on the pixel values of the pre-learning data to serve as the staff characteristic probability distribution.
4. The employee identification method according to claim 3, wherein constructing a Gaussian probability distribution for the pre-learned data based on pixel values of the pre-learned data comprises:
acquiring pre-learning clustering centers of a target number based on pixel values of the pre-learning data;
taking the pixel value of the pre-learning data closest to each pre-learning cluster center as the pixel value corresponding to each pre-learning cluster center;
and calculating the mean value and the variance of the pixel value corresponding to each pre-learning clustering center, and constructing the Gaussian probability distribution aiming at the pre-learning data based on the mean value and the variance of the pixel values corresponding to all the pre-learning clustering centers.
5. The employee identification method according to claim 1, wherein the acquiring of the image data of the person based on the real-time monitoring image comprises:
acquiring the position of a person in the real-time monitoring image, and segmenting the position of the person to obtain a person segmentation result;
cutting the real-time monitoring image based on the personnel segmentation result, taking the personnel segmentation result as a foreground image, and setting a background image to be black;
and forming the foreground image and the background image into the personnel image data.
6. The employee identification method according to claim 1, wherein the personal image data is BGR color space image data, and after acquiring the personal image data, the method further includes:
converting the personnel image data into HSV color space image data;
normalizing the mean value and the variance of the V-channel image data of the HSV color space image data to the mean value and the variance of preset reference image data to obtain new HSV color space image data;
and converting the new HSV color space image data into BGR color space image data to serve as the personnel image data.
7. The employee identification method according to claim 6, wherein after converting the new HSV color space image data to BGR color space image data, the method further comprises:
converting the BGR color space image data to CLELAB color space image data;
normalizing the mean value and the variance of the CLELAB color space image data to the mean value and the variance in the CLELAB color space corresponding to the preset reference image data to obtain new CLELAB color space image data;
converting the new CLELAB color space image data into BGR color space image data as the human image data.
8. An employee identification device, comprising:
the personnel image acquisition module is used for acquiring personnel image data based on the real-time monitoring image;
a probability distribution obtaining module, configured to construct a gaussian probability distribution for the person image data based on pixel values of the person image data;
and the staff identification module is used for calculating KL divergence between Gaussian probability distribution and staff characteristic probability distribution of the staff image data, and if the KL divergence is smaller than an identification threshold value, the staff image data is determined as staff image data.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory, the processor executing the computer program to perform the steps in an employee identification method of any one of claims 1 to 7.
10. A computer readable storage medium having stored thereon a computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of a method for employee identification as claimed in any one of claims 1-7.
CN202310080028.XA 2023-02-08 2023-02-08 Employee identification method and device, electronic equipment and storage medium Active CN115830641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310080028.XA CN115830641B (en) 2023-02-08 2023-02-08 Employee identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310080028.XA CN115830641B (en) 2023-02-08 2023-02-08 Employee identification method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115830641A true CN115830641A (en) 2023-03-21
CN115830641B CN115830641B (en) 2023-06-09

Family

ID=85520885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310080028.XA Active CN115830641B (en) 2023-02-08 2023-02-08 Employee identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115830641B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958707A (en) * 2023-08-18 2023-10-27 武汉市万睿数字运营有限公司 Image classification method, device and related medium based on spherical machine monitoring equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188018A (en) * 2007-12-06 2008-05-28 北大方正集团有限公司 An automatic land return method and device in typeset
CN105243653A (en) * 2015-11-05 2016-01-13 北京航天泰坦科技股份有限公司 Fast mosaic technology of remote sensing image of unmanned aerial vehicle on the basis of dynamic matching
CN107507138A (en) * 2017-07-27 2017-12-22 北京大学深圳研究生院 A kind of underwater picture Enhancement Method based on Retinex model
CN110991389A (en) * 2019-12-16 2020-04-10 西安建筑科技大学 Matching method for judging appearance of target pedestrian in non-overlapping camera view angle
CN111080649A (en) * 2019-12-10 2020-04-28 桂林电子科技大学 Image segmentation processing method and system based on Riemann manifold space
CN112749645A (en) * 2020-12-30 2021-05-04 成都云盯科技有限公司 Garment color detection method, device and equipment based on monitoring video
US20210357630A1 (en) * 2018-10-05 2021-11-18 The Trustees Of Princeton University Automated system to measure multi-animal body part dynamics
CN113807319A (en) * 2021-10-15 2021-12-17 云从科技集团股份有限公司 Face recognition optimization method, device, equipment and medium
US20220027732A1 (en) * 2020-07-24 2022-01-27 Sony Semiconductor Solutions Corporation Method and apparatus for image recognition
CN114581792A (en) * 2022-03-09 2022-06-03 山东原产地信息科技有限公司 Agricultural disaster monitoring method and system based on satellite remote sensing image

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188018A (en) * 2007-12-06 2008-05-28 北大方正集团有限公司 An automatic land return method and device in typeset
CN105243653A (en) * 2015-11-05 2016-01-13 北京航天泰坦科技股份有限公司 Fast mosaic technology of remote sensing image of unmanned aerial vehicle on the basis of dynamic matching
CN107507138A (en) * 2017-07-27 2017-12-22 北京大学深圳研究生院 A kind of underwater picture Enhancement Method based on Retinex model
US20210357630A1 (en) * 2018-10-05 2021-11-18 The Trustees Of Princeton University Automated system to measure multi-animal body part dynamics
CN111080649A (en) * 2019-12-10 2020-04-28 桂林电子科技大学 Image segmentation processing method and system based on Riemann manifold space
CN110991389A (en) * 2019-12-16 2020-04-10 西安建筑科技大学 Matching method for judging appearance of target pedestrian in non-overlapping camera view angle
US20220027732A1 (en) * 2020-07-24 2022-01-27 Sony Semiconductor Solutions Corporation Method and apparatus for image recognition
CN112749645A (en) * 2020-12-30 2021-05-04 成都云盯科技有限公司 Garment color detection method, device and equipment based on monitoring video
CN113807319A (en) * 2021-10-15 2021-12-17 云从科技集团股份有限公司 Face recognition optimization method, device, equipment and medium
CN114581792A (en) * 2022-03-09 2022-06-03 山东原产地信息科技有限公司 Agricultural disaster monitoring method and system based on satellite remote sensing image

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
HUANG S C等: "Efficient contrast enhancement using adaptive gamma correction with weighting distribution", 《IEEE TRANSACTIONS ON IMAGE PROCESSING》 *
STEPHEN M. SMITH等: "Threshold-free cluster enhancement: Addressing problems of smoothing, threshold dependence and localisation in cluster inference" *
王宏伟: "基于高斯混合模型聚类的非均匀采样系统的多模型切换辨识" *
秦绪等: "基于三边滤波的HSV色彩空间Retinex图像增强算法", 《小型微型计算机系统》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958707A (en) * 2023-08-18 2023-10-27 武汉市万睿数字运营有限公司 Image classification method, device and related medium based on spherical machine monitoring equipment
CN116958707B (en) * 2023-08-18 2024-04-23 武汉市万睿数字运营有限公司 Image classification method, device and related medium based on spherical machine monitoring equipment

Also Published As

Publication number Publication date
CN115830641B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
US10452925B2 (en) Video monitoring method and video monitoring device
KR101640998B1 (en) Image processing apparatus and image processing method
CN110991380A (en) Human body attribute identification method and device, electronic equipment and storage medium
CN112464850B (en) Image processing method, device, computer equipment and medium
CN104408429A (en) Method and device for extracting representative frame of video
CN102663405B (en) Prominence and Gaussian mixture model-based method for extracting foreground of surveillance video
CN109766828A (en) A kind of vehicle target dividing method, device and communication equipment
CN111222478A (en) Construction site safety protection detection method and system
CN115830641B (en) Employee identification method and device, electronic equipment and storage medium
CN112417955A (en) Patrol video stream processing method and device
CN114782892A (en) Illegal behavior target detection method, device, equipment and storage medium
CN112560880A (en) Object classification method, object classification apparatus, and computer-readable storage medium
CN111274964A (en) Detection method for analyzing water surface pollutants based on visual saliency of unmanned aerial vehicle
CN108900895B (en) Method and device for shielding target area of video stream
CN117409083B (en) Cable terminal identification method and device based on infrared image and improved YOLOV5
CN112101260B (en) Method, device, equipment and storage medium for identifying safety belt of operator
Yang et al. EHNQ: Subjective and objective quality evaluation of enhanced night-time images
CN117197746A (en) Safety monitoring system and method based on deep learning
Tuba et al. Forest fires detection in digital images based on color features
CN111582183A (en) Mask identification method and system in public place
JP2018013887A (en) Feature selection device, tag relevant area extraction device, method, and program
CN116030417B (en) Employee identification method, device, equipment, medium and product
CN111582278A (en) Portrait segmentation method and device and electronic equipment
CN114677667A (en) Transformer substation electrical equipment infrared fault identification method based on deep learning
CN112528996B (en) Picture processing method, apparatus, device, storage medium and computer program product

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
CP01 Change in the name or title of a patent holder

Address after: No. 1, Floor 10, Building 2, No. 11, Wuke East 4th Road, Wuhou District, Chengdu, Sichuan, 610041

Patentee after: Sichuan Honghe Digital Intelligence Group Co.,Ltd.

Address before: No. 1, Floor 10, Building 2, No. 11, Wuke East 4th Road, Wuhou District, Chengdu, Sichuan, 610041

Patentee before: Sichuan Honghe Communication Group Co.,Ltd.

CP01 Change in the name or title of a patent holder