CN115830641B - 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
CN115830641B
CN115830641B CN202310080028.XA CN202310080028A CN115830641B CN 115830641 B CN115830641 B CN 115830641B CN 202310080028 A CN202310080028 A CN 202310080028A CN 115830641 B CN115830641 B CN 115830641B
Authority
CN
China
Prior art keywords
image data
personnel
staff
probability distribution
learning
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
CN202310080028.XA
Other languages
Chinese (zh)
Other versions
CN115830641A (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 a method, a device, electronic equipment and a storage medium for identifying personnel, wherein the method comprises the following steps: acquiring personnel image data based on the real-time monitoring image; constructing a gaussian probability distribution for the personnel image data based on pixel values of the personnel image data; and calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than a recognition threshold value. According to the method and the device, the similarity between the personnel image and the staff image in the real-time image is judged based on the Gaussian distribution of the personnel image data in the real-time image and the divergence of the Gaussian distribution of the staff learned in advance, massive model training is not needed, the processing time is short, the calculation cost is low, and the light and efficient staff identification is realized.

Description

Employee identification method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of personnel identification, in particular to a method and a device for identifying personnel, electronic equipment and a storage medium.
Background
In dangerous operation scenes, for example, oil gas stations, chemical plants and the like, workers who perform operations need to be subjected to strict training and then can work on duty, and untrained workers or other irrelevant people (such as customers and the like) can enter the operation scenes to possibly cause important safety accidents due to operation and behavior non-standardization, so that the rapid identification of the workers and non-workers in the dangerous operation scenes has important significance for judging the behavior standardization and avoiding the safety accidents.
The staff identification method under the dangerous operation scene at present mainly comprises the steps that security personnel are identified based on experience through a field real-time monitoring picture or are identified through a trained deep learning model. However, these schemes have high manpower cost and time cost, and data acquisition, labeling and cleaning required by security personnel or training a deep learning model all require a lot of manpower and consume a lot of time; on the other hand, training and running of deep learning models requires a large amount of computational resources to be consumed. Therefore, how to realize employee identification with light weight and high efficiency is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a staff identification method, a device, electronic equipment and a storage medium, aiming at solving the problem of how to realize staff identification in a light and efficient manner.
An embodiment of the present application provides a method for identifying an employee, including:
acquiring personnel image data based on the real-time monitoring image;
constructing a gaussian probability distribution for the personnel image data based on pixel values of the personnel image data;
and calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than a recognition threshold value.
In an alternative embodiment, constructing a gaussian probability distribution for the personnel image data based on pixel values of the personnel image data comprises:
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 cluster center as the pixel value corresponding to each cluster center;
and calculating the mean value and the variance of the pixel values 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.
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 Gaussian probability distribution aiming at the pre-learning data as the employee characteristic probability distribution based on the pixel values of the pre-learning data.
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 a target number of pre-learning clustering centers based on the 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 values 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, based on the real-time monitoring image, acquiring personnel image data includes:
Acquiring the personnel position in the real-time monitoring image, and dividing the personnel position to obtain a personnel dividing 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 as black;
and forming the foreground image and the background image into the personnel image data.
In an alternative embodiment, the personnel image data is BGR color space image data, and after the personnel image data is acquired, the method further comprises:
converting the person 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 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;
the new CLELAB color space image data is converted into BGR color space image data as the person image data.
A second aspect of the embodiments of the present application provides an employee identifying apparatus, including:
the personnel image acquisition module is used for acquiring personnel image data based on the real-time monitoring image;
the probability distribution acquisition module is used for constructing Gaussian probability distribution aiming at the personnel image data based on the pixel values of the personnel image data;
and the staff identification module is used for calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold value.
Wherein, probability distribution acquisition module includes:
the clustering center acquisition sub-module is used for acquiring the clustering centers of the target number based on the pixel values of the personnel image data;
the clustering acquisition sub-module 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;
The distribution construction sub-module is used for calculating the mean value and the variance of the pixel values 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 sub-module is used for constructing Gaussian probability distribution aiming at the pre-learning data based on the pixel values of the pre-learning data as the staff characteristic probability distribution.
Wherein, staff distribution acquires submodule, include:
a pre-learning clustering center obtaining subunit, configured to obtain a target number of pre-learning clustering centers based on pixel values 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 values 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 sub-module is used for acquiring the personnel position in the real-time monitoring image, segmenting the personnel position and obtaining a personnel 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 as black;
and the personnel image acquisition sub-module is used for forming the foreground image and the background image into the personnel image data.
Wherein, the device still includes:
a first color space conversion module for converting the person 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 serving as the personnel image data.
Wherein the apparatus comprises:
a second color space conversion module for converting the BGR color space image data to 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 serving as the personnel image data.
A third aspect of the 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 a method for identifying an employee according to any one of the first aspect.
A fourth aspect of the embodiments provides a computer readable storage medium having stored thereon a computer program/instruction which when executed by a processor implements the steps of a method of identifying staff as described in any of the first aspects.
Advantageous effects
The embodiment of the application 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 personnel image data based on pixel values of the personnel image data; and calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than a recognition threshold value. According to the method and the device, the similarity between the personnel image and the staff image in the real-time image is judged based on the Gaussian distribution of the personnel image data in the real-time image and the divergence of the Gaussian distribution of the staff learned in advance, massive model training is not needed, the processing time is short, the calculation cost is low, and the light and efficient staff identification is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a prior art employee identification method;
FIG. 2 is a flowchart of a method for identifying employees 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 present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In the related art, the staff identification method aiming at dangerous operation scenes mainly comprises the steps that security personnel identify based on experience through a field real-time monitoring picture or identify through a trained deep learning model. However, these schemes have high manpower cost and time cost, and data acquisition, labeling and cleaning required by security personnel or training a deep learning model all require a lot of manpower and consume a lot of time; on the other hand, training and running of deep learning models requires a large amount of computational resources to be consumed.
Specifically, fig. 1 shows a flowchart of a staff identification method in the prior art, and as shown in fig. 1, an image identification network is adopted to identify staff. However, the data acquisition, labeling and cleaning required for training the depth model all require a lot of manpower, and the data preparation, labeling, cleaning and depth model training all require a long time, and the training and on-line operation of the depth model all have a problem of a lot of computation resource consumption.
In view of this, an embodiment of the present application proposes an employee identification method, and fig. 2 shows a flowchart of an employee identification method, as shown in fig. 2, including the following steps:
s101, acquiring personnel image data based on the real-time monitoring image.
S102, constructing Gaussian probability distribution for the personnel image data based on the pixel values of the personnel image data.
S103, calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution of the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than a recognition threshold value.
In this embodiment of the present application, the real-time monitoring image is a real-time image within a camera field of view captured in real time by a monitoring camera deployed in a working scene, for example, the working scene may be a dangerous working scene, where the dangerous working scene is a scene that may cause a major safety accident due to irregular actions or equipment faults, for example, a working scene of an oil gas station, a chemical plant, and the like. Because personnel who work in a dangerous work scene can work on duty after strict training, and untrained personnel or other irrelevant personnel (such as customers and the like) enter the work scene and possibly cause serious safety accidents due to irregular operation and behaviors, the personnel and non-personnel in the dangerous work scene need to be rapidly identified to avoid the occurrence of the safety accidents.
The monitoring camera is a high-definition anti-explosion camera, and the camera is a high-definition camera with 200 ten thousand pixels (1920 x 1080) and adopts ipx level waterproof. The distance between the defense distribution area and the camera is 9 meters. In this embodiment of the present application, specific parameters of the monitoring camera and the distance between the arming area may be determined according to actual situations, which is not limited herein.
In the embodiment of the application, the personnel image data is a personnel image in the real-time monitoring image, and the personnel image can be a staff wearing staff clothes in the visual field range of the camera, and can also be a non-staff wearing any clothing other than the staff clothes.
In the embodiment of the present application, the personnel image data is composed of pixels in a BGR color space, and the pixel values in the BGR color space are clustered to generate a cluster center and pixels corresponding to the cluster center, so as to construct a ternary independent gaussian probability distribution corresponding to the pixels of the personnel image data.
In the embodiment of the application, the ternary independent Gaussian probability distribution corresponding to the pixels of the personnel image data is used for representing personnel image clothes color information, the personnel feature probability distribution is used for representing personnel clothes color information, the similarity of the personnel image data and personnel features is measured by calculating the KL divergence (Kullback-Leibler divergence) between the ternary independent Gaussian probability distribution corresponding to the personnel image data, and when the KL divergence between the ternary independent Gaussian probability distribution corresponding to the personnel image data and the personnel feature probability distribution is smaller than an identification threshold, personnel in the personnel image data are considered to be personnel; and when the KL divergence between the ternary independent Gaussian probability distribution corresponding to the personnel image data and the personnel feature probability distribution is larger than or equal to the identification threshold value, the personnel in the personnel image data are considered to be non-personnel.
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 memory is 8G, and the main frequency of the processor is 2.3GHz. The configuration of a particular computing platform may be determined according to particular circumstances and the application is not limited herein.
Fig. 3 is a schematic diagram of an employee identification method, as shown in fig. 3, and in order to better understand the solution of the present application by those skilled in the art, the solution of the present application is described in detail with reference to fig. 3:
when step S101 is specifically executed, a real-time monitoring image in a field of view of a camera controlled in a scene is first acquired, where the real-time monitoring image includes at least one personnel image. Then, selecting one personnel image data in the real-time monitoring image of the frame, and independently dividing the personnel image data to carry out subsequent processing, namely, based on a dynamic area and a static area in the real-time monitoring image, acquiring the position of a personnel area in the dynamic area as the personnel position in the real-time monitoring image, wherein the personnel position is the position of the personnel image in the real-time monitoring image of the frame; after the personnel position is determined, the personnel position is segmented, and a personnel segmentation result is obtained. It should be noted that, the object detection technology and the image segmentation technology may refer to the prior art, and are not described herein.
And then, cutting out the real-time monitoring image based on the personnel segmentation result, cutting out the personnel segmentation result from the real-time monitoring image of the current frame to serve as a foreground image, setting a background image to be black, and forming the foreground image and the background image into personnel image data. The foreground image in the personnel image data is the pixel of the personnel image data, and the background image is black, so that adverse effects are prevented when the pixels of the foreground image are processed later. It should be noted that, the method of clipping and setting the background to black may refer to the prior art, and this application is not repeated here.
In an alternative embodiment, after the personnel image data is obtained, the personnel image data is preprocessed, so that the recognition efficiency and accuracy of the subsequent processing process are improved. Specifically, after the person image data is acquired, the luminance of the person image data needs to be enhanced so that the luminance information of the person image data is unified with the luminance information of the pre-learning data for generating the employee feature probability distribution.
Since the pixels of the personnel image data are pixels of the BGR color space, in order to adjust the brightness (lightness) information of the personnel image data, in an alternative embodiment, the personnel image data is first converted into HSV or HSI color space image data. Taking the conversion of the personnel image data into HSV color space image data as an example, the HSV (Value) color space is a color space created according to visual characteristics of colors, which is also called a hexagonal pyramid Model (hexacone Model), and parameters of the colors in the Model are Hue (H), saturation (S) and brightness (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 variance of the V channel data, normalizing the mean value and variance of the V channel image data of the HSV color space image data to the mean value and variance of preset reference image data to obtain new HSV color space image data, wherein the preset reference image data is pre-learning data for constructing employee feature probability distribution; and finally, converting the new HSV color space image data back into BGR color space image data as the personnel image data, so as to finish the brightness enhancement of the personnel image data, wherein the brightness of the personnel image data is the same as that of the preset reference image data.
In an alternative embodiment, after the personnel image data with enhanced brightness is obtained, further processing is needed to be performed on the personnel image data with enhanced brightness, so that the recognition efficiency and accuracy of the subsequent processing process are improved. Specifically, after the luminance-enhanced personal image data is acquired, the color of the luminance-enhanced personal image data needs to be enhanced so that the information of the color of the personal image data is unified with the color information of the pre-learning data for generating the employee feature probability distribution.
Since the pixels of the personnel image data are pixels of the BGR color space, in order to adjust the color information of the personnel image data, the personnel image data needs to be converted into CLELAB color space image data, wherein the CLELAB color space is a device-independent color space and is also a color system based on physiological characteristics, the color space has a larger color gamut and is visual sensing described by a digital method; then calculating the mean value and variance of the CLELAB color space image data, normalizing the mean value and variance of the CLELAB color space image data to the mean value and variance of preset reference image data to obtain new CLELAB color space image data, wherein the preset reference image data is pre-learning data for constructing employee feature probability distribution; and finally, converting the new CLELAB color space image data back into BGR color space image data as the personnel image data, so as to complete the color enhancement of the personnel image data, wherein the color intensity of the personnel image data is the same as that of the preset reference image data.
When step S102 is specifically performed, a gaussian probability distribution for the personnel image data is constructed by means of K-means clustering (K-means) based on the pixel values of the personnel image data. Specifically, pixel-by-pixel expansion is performed on pixel values of personnel image data to obtain a plurality of three-dimensional vectors corresponding to the pixel values of the personnel image data, wherein the three-dimensional vector c is a vector (b, g, r) corresponding to a BGR pixel value; then, taking all three-dimensional vectors corresponding to pixel values of the personnel image data as sample values, randomly selecting a target number of sample values as first clustering centers, calculating Euclidean distances from all the sample values to the first clustering centers, and taking all the sample values nearest to each first clustering center 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. Repeating the iterative clustering process until the position of the clustering center is not changed any more, and taking the clustering center updated last time as the output clustering center.
Obtaining a target number of cluster centers based on the acquisition process of the cluster centers, wherein the cluster centers are cluster centers with positions which are not changed any more after the iteration process, and the pixel value of the personnel image data closest to each cluster center is used as the pixel value corresponding to each cluster center, and the three-dimensional vector of the pixel value corresponding to each cluster center is c p =(b p ,g p ,r p ) The method comprises the steps of carrying out a first treatment on the surface of the Calculating the mean mu of each cluster from the three-dimensional vector of pixel values in the clusters corresponding to each cluster center p Sum of variances sigma p The method comprises the steps of carrying out a first treatment on the surface of the Finally, mu based on the pixel values corresponding to all cluster centers p Sum of variances sigma p Constructing the ternary independent Gaussian probability distribution N aiming at the personnel image data p~p,p ) The ternary independent gaussian distribution characterizes the clothing information of the person in the image, which can be the clothing of the upper garment, lower garment, hat, shoes, etc. worn by the staff. Since the clothing of the staff is working clothing which is greatly different from daily clothing, the Gaussian distribution obtained by clustering the staff image data based on the working clothing can be used for representing the difference between the staff clothing information, for example, if the similarity between the ternary independent Gaussian probability distribution for the staff image data and the Gaussian distribution for the staff image data is low, the probability that the clothing of the staff in the staff image data is staff clothing is low, and the probability that the staff is low.
It should be noted that, the prior information of the employee clothing of the target number of the cluster centers is determined, and the number of the cluster centers is at least 2, and for example, the number of the cluster centers can be 2-3. The number of targets of a specific cluster center may be determined according to practical situations, and the application is not limited herein.
Taking fig. 3 as an example, pixel values of personnel image data are expanded pixel by pixel, and K-means clustering is performed to obtain a three-dimensional vector corresponding to each clustering center. Wherein the three-dimensional vector of the pixel value corresponding to each cluster center is c, specifically, for the employee image data on the left side in fig. 3, the three-dimensional vector of the pixel value corresponding to each cluster center is c s Wherein the corresponding vector in the first dimension is
Figure SMS_11
The average value is->
Figure SMS_1
Variance->
Figure SMS_7
The method comprises the steps of carrying out a first treatment on the surface of the The corresponding vector in the second dimension is +.>
Figure SMS_12
The average value is->
Figure SMS_14
Variance->
Figure SMS_15
The method comprises the steps of carrying out a first treatment on the surface of the The corresponding vector in the third dimension is +.>
Figure SMS_18
The average value is->
Figure SMS_13
Variance->
Figure SMS_16
. For the non-employee image data on the right side of FIG. 3, the three-dimensional vector of employee image data pixel values corresponding to each cluster center is c p Wherein the corresponding vector in the first dimension is +.>
Figure SMS_2
The average value is->
Figure SMS_8
Variance->
Figure SMS_3
The method comprises the steps of carrying out a first treatment on the surface of the The corresponding vector in the second dimension is +.>
Figure SMS_5
The average value is->
Figure SMS_10
Variance->
Figure SMS_17
The method comprises the steps of carrying out a first treatment on the surface of the The corresponding vector in the third dimension is +.>
Figure SMS_4
The average value is->
Figure SMS_6
Variance of
Figure SMS_9
The three-dimensional independent Gaussian distribution aiming at the personnel image data is obtained so as to be used for representing the dressing characteristic information of the personnel image, and then the similarity between the dressing characteristic information and the personnel characteristic probability distribution is required to be determined, and the personnel is determined to be personnel or not by taking the similarity as a judgment standard.
When step S103 is specifically executed, first, an employee feature probability distribution is obtained and used as a criterion for judging the ternary independent gaussian distribution for the image data of the person. In an alternative embodiment, the employee feature probability distribution is obtained as follows:
firstly, a plurality of employee image data stored in advance are acquired, staff in the employee image data are employees wearing employee clothes, the plurality of employee image data are used as preset reference images for acquiring ternary independent Gaussian distribution aiming at the employee image data, the plurality of employee image data are combined to obtain pre-learning data, and the pre-learning data comprise pixel values of BGR color space in the plurality of employee image data.
Based on the pixel values of the pre-learning data, a Gaussian probability distribution for the pre-learning data is constructed by means of K-means clustering (K-means). Specifically, first, pixel-by-pixel expansion is performed on pixel values of pre-learning data to obtain a plurality of three-dimensional vectors corresponding to the pixel values of personnel image data, the three-dimensional vector c s Vector (b) corresponding to BGR pixel value s ,g s ,r s ) The method comprises the steps of carrying out a first treatment on the surface of the Then, taking all three-dimensional vectors corresponding to pixel values of the pre-learning data as sample values, randomly selecting a target number of sample values as first pre-learning cluster centers, calculating Euclidean distances from all sample values to the first pre-learning cluster centers, and taking all sample values nearest to each first pre-learning cluster center as clusters corresponding to the first pre-learning cluster centers; and then calculating the average value of all sample values in each cluster to be used as a new pre-learning cluster center. Repeating the iterative clustering process until the position of the pre-learning cluster center is not changed any more, and taking the pre-learning cluster center updated last time as the pre-learning cluster center of the output.
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 with positions which are not changed any more after the iteration process, and 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 ) The method comprises the steps of carrying out a first treatment on the surface of the Calculating the mean mu of each cluster according to the three-dimensional vector of the pixel values in the clusters corresponding to each pre-learning cluster center s Sum of variances sigma s The method comprises the steps of carrying out a first treatment on the surface of the Finally, based on the average mu of the pixel values corresponding to all the pre-learning clustering centers s Sum of variances sigma s Constructing the ternary independent Gaussian probability distribution N aiming at the pre-learning data s~s,s ) The ternary independent Gaussian distribution characterizesThe pre-learning data is preset with clothing information of staff in the reference image, wherein the clothing information can be clothing such as upper clothing, lower clothing, hats and shoes worn by the staff. The ternary independent Gaussian distribution aiming at the pre-learning data characterizes staff clothing information, and is used as a staff identification standard, if the similarity between the ternary independent Gaussian distribution aiming at the staff image data and the ternary independent Gaussian distribution aiming at the pre-learning data is higher, the staff in the staff image data is more likely to be staff; if the similarity between the ternary independent gaussian distribution for the personnel image data and the ternary independent gaussian distribution for the pre-learning data is low, the probability that the personnel in the personnel image data is personnel is low is indicated.
It should be noted that, the target number of the pre-learning cluster centers is determined based on the employee clothing priori information, and the number of the pre-learning cluster centers is at least 2, and generally 2-3. The number of targets of the specific pre-learning cluster center can be determined according to practical situations, and the application is not limited herein.
After the ternary independent gaussian distribution for the personnel image data and the ternary independent gaussian distribution for the pre-learning data are acquired, a KL divergence (Kullback-Leibler divergence) between the two is calculated to characterize the similarity of the two. Statistically, the KL divergence can be used to measure the degree of difference between two distributions. If the difference is smaller, the KL divergence is smaller; conversely, if the difference between the two is larger, the KL divergence is larger; when the two distributions are consistent, the KL divergence is 0.
In the embodiment of the application, an identification threshold is set to distinguish the calculation result of the KL divergence. Specifically, if the three-dimensional independent gaussian distribution N is for the person image data p And the ternary independent Gaussian distribution N aiming at pre-learning data s KL divergence between is less than the recognition threshold, illustrating a ternary independent Gaussian distribution N for personnel image data p And the ternary independent Gaussian distribution N aiming at pre-learning data s The difference is smaller, and the similarity between the personnel image data and the pre-learning data is higher, so that the personnel image is displayedThe image data is determined to be staff image data, and staff in the staff image data is staff; if the three-dimensional independent Gaussian distribution N is specific to the personnel image data p And the ternary independent Gaussian distribution N aiming at pre-learning data s The KL divergence between the three is larger than or equal to the identification threshold value, which indicates the ternary independent Gaussian distribution N aiming at the personnel image data p And the ternary independent Gaussian distribution N aiming at pre-learning data s The difference is large, and at the moment, the similarity between the personnel image data and the pre-learning data is low, the personnel image data is determined to be non-personnel image data, and the personnel in the personnel image data are non-personnel. For example, the recognition threshold generally takes a divergence of 30.0KL, and it should be noted that the recognition threshold may be determined according to practical situations, which is not limited herein.
In an alternative embodiment, after the identification result is obtained, the identification result can be used for input information of a subsequent downstream task, for example, the dangerous behavior in a dangerous operation scene is identified, so that occurrence of a dangerous event is effectively avoided. For example, algorithms for downstream tasks such as whether personnel in the oil and gas station wear are normative, perimeter intrusion detection, long-term no-staff identification in the fueling area, personnel on duty doze detection, etc. can be supported. 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, so that the problem of calculation resource waste caused by reasoning together of all algorithms is avoided, and the calculation 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 personnel image data based on pixel values of the personnel image data; and calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than a recognition threshold value. According to the method and the device, the similarity between the personnel image and the staff image in the real-time image is judged based on the Gaussian distribution of the personnel image data in the real-time image and the divergence of the Gaussian distribution of the staff learned in advance, massive model training is not needed, the processing time is short, the calculation cost is low, and the light and efficient staff identification is realized.
Based on the same inventive concept, an 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;
the probability distribution acquisition module is used for constructing Gaussian probability distribution aiming at the personnel image data based on the pixel values of the personnel image data;
And the staff identification module is used for calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold value.
Wherein, probability distribution acquisition module includes:
the clustering center acquisition sub-module is used for acquiring the clustering centers of the target number based on the pixel values of the personnel image data;
the clustering acquisition sub-module 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;
the distribution construction sub-module is used for calculating the mean value and the variance of the pixel values 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 sub-module is used for constructing Gaussian probability distribution aiming at the pre-learning data based on the pixel values of the pre-learning data as the staff characteristic probability distribution.
Wherein, staff distribution acquires submodule, include:
a pre-learning clustering center obtaining subunit, configured to obtain a target number of pre-learning clustering centers based on pixel values 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 values 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 sub-module is used for acquiring the personnel position in the real-time monitoring image, segmenting the personnel position and obtaining a personnel 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 as black;
and the personnel image acquisition sub-module is used for forming the foreground image and the background image into the personnel image data.
Wherein, the device still includes:
a first color space conversion module for converting the person 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 serving as the personnel image data.
Wherein the apparatus comprises:
a second color space conversion module for converting the BGR color space image data to 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 serving as the personnel image data.
Based on the same inventive concept, an embodiment of the present application discloses an electronic device, 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 system comprises a memory 110 and a processor 120, wherein the memory 110 is in communication connection with the processor 120 through a bus, and a computer program is stored in the memory 110 and can be run on the processor 120 to realize the steps in an employee identification method disclosed by the embodiment of the application.
Based on the same inventive concept, embodiments of the present application disclose a computer readable storage medium having stored thereon a computer program/instructions which, when executed by a processor, implement steps in an employee identification method disclosed in embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus 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 in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The above detailed description of the employee identification method, device, electronic apparatus and storage medium provided by the present invention applies specific examples to illustrate the principles and embodiments of the present invention, and the above description of the examples is only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (9)

1. A method for identifying employees, comprising:
acquiring personnel image data based on the real-time monitoring image;
the brightness of the personnel image data is enhanced, so that the brightness of the personnel image data is the same as that of preset reference image data;
performing color enhancement on the personnel image data so that the color intensity of the personnel image data is the same as that of the preset reference image data;
constructing a gaussian probability distribution for the personnel image data based on pixel values of the personnel image data, the gaussian probability distribution for the personnel image data being used to characterize garment information of the personnel image data;
performing pixel combination on the preset reference image data to obtain pre-learning data, wherein the preset reference image data comprises a plurality of employee image data, and the employee image data is data of a BGR color space;
constructing Gaussian probability distribution aiming at the pre-learning data based on the pixel values of the pre-learning data as employee feature probability distribution, wherein the employee feature probability distribution is used for representing clothing information of the employee image data;
And calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than a recognition threshold value.
2. An employee identification method as claimed in claim 1 wherein constructing a gaussian probability distribution for the personnel image data based on pixel values of the personnel image data comprises:
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 cluster center as the pixel value corresponding to each cluster center;
and calculating the mean value and the variance of the pixel values 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.
3. An employee identification method as claimed in claim 1, wherein constructing a gaussian probability distribution for the pre-learned data based on pixel values of the pre-learned data comprises:
acquiring a target number of pre-learning clustering centers based on the 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 values 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.
4. An employee identification method as in claim 1 wherein acquiring the personnel image data based on the live monitoring image comprises:
acquiring the personnel position in the real-time monitoring image, and dividing the personnel position to obtain a personnel dividing 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 as black;
and forming the foreground image and the background image into the personnel image data.
5. An employee identification method as claimed in claim 1, wherein the personnel image data is BGR color space image data, wherein the brightness enhancement of the personnel image data is performed so that the brightness of the personnel image data is the same as the brightness of the preset reference image data, comprising:
Converting the person 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 as the personnel image data.
6. An employee identification method as claimed in claim 5, wherein color enhancing the person image data such that the color intensity of the person image data is the same as the color intensity of the preset reference image data 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;
the new CLELAB color space image data is converted into BGR color space image data as the person image data.
7. An employee identification apparatus, comprising:
The personnel image acquisition module is used for acquiring personnel image data based on the real-time monitoring image;
the brightness enhancement module is used for enhancing the brightness of the personnel image data so that the brightness of the personnel image data is the same as the brightness of the preset reference image data;
the color enhancement module is used for performing color enhancement on the personnel image data so that the color intensity of the personnel image data is the same as that of the preset reference image data;
a probability distribution acquisition module for constructing a gaussian probability distribution for the personnel image data based on pixel values of the personnel image data, the gaussian probability distribution for the personnel image data being used to characterize garment information of the personnel image data;
the pre-learning data acquisition module is used for carrying out pixel combination on the preset reference image data to obtain pre-learning data, wherein the preset reference image data comprises a plurality of employee image data, and the employee image data is data of a BGR color space;
the staff distribution acquisition module is used for constructing Gaussian probability distribution aiming at the pre-learning data based on the pixel values of the pre-learning data, and the Gaussian probability distribution is used as the staff feature probability distribution which is used for representing clothing information of the staff image data;
And the staff identification module is used for calculating the KL divergence between the Gaussian probability distribution and the staff feature probability distribution aiming at the staff image data, and determining the staff image data as staff image data if the KL divergence is smaller than an identification threshold value.
8. 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 of a method of identifying employees of any of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program/instruction which when executed by a processor implements the steps of a method of identifying staff as claimed in any one of claims 1-6.
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 CN115830641A (en) 2023-03-21
CN115830641B true 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)

Families Citing this family (1)

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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110991389A (en) * 2019-12-16 2020-04-10 西安建筑科技大学 Matching method for judging appearance of target pedestrian in non-overlapping camera view angle
CN114581792A (en) * 2022-03-09 2022-06-03 山东原产地信息科技有限公司 Agricultural disaster monitoring method and system based on satellite remote sensing image

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188018B (en) * 2007-12-06 2010-08-25 北大方正集团有限公司 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
CN107507138B (en) * 2017-07-27 2019-07-05 北京大学深圳研究生院 A kind of underwater picture Enhancement Method based on Retinex model
WO2020072918A1 (en) * 2018-10-05 2020-04-09 The Trustees Of Princeton University Automated system to measure multi-animal body part dynamics
CN111080649B (en) * 2019-12-10 2023-05-30 桂林电子科技大学 Image segmentation processing method and system based on Riemann manifold space
EP3944138A1 (en) * 2020-07-24 2022-01-26 Sony Semiconductor Solutions Corporation Method and apparatus for image recognition
CN112749645B (en) * 2020-12-30 2023-08-01 成都云盯科技有限公司 Clothing 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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110991389A (en) * 2019-12-16 2020-04-10 西安建筑科技大学 Matching method for judging appearance of target pedestrian in non-overlapping camera view angle
CN114581792A (en) * 2022-03-09 2022-06-03 山东原产地信息科技有限公司 Agricultural disaster monitoring method and system based on satellite remote sensing image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Efficient contrast enhancement using adaptive gamma correction with weighting distribution;Huang S C等;《IEEE transactions on image processing》;第22卷(第3期);1032-1041 *
基于三边滤波的HSV色彩空间Retinex图像增强算法;秦绪等;《小型微型计算机系统》;第37卷(第1期);168-172 *

Also Published As

Publication number Publication date
CN115830641A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
US10452925B2 (en) Video monitoring method and video monitoring device
KR101640998B1 (en) Image processing apparatus and image processing method
CN113361495B (en) Method, device, equipment and storage medium for calculating similarity of face images
CN112464850B (en) Image processing method, device, computer equipment and medium
CN110991380A (en) Human body attribute identification method and device, electronic equipment and storage medium
US9418426B1 (en) Model-less background estimation for foreground detection in video sequences
JP2014041476A (en) Image processing apparatus, image processing method, and program
CN109766828A (en) A kind of vehicle target dividing method, device and communication equipment
CN115830641B (en) Employee identification method and device, electronic equipment and storage medium
CN111274964A (en) Detection method for analyzing water surface pollutants based on visual saliency of unmanned aerial vehicle
CN112101260B (en) Method, device, equipment and storage medium for identifying safety belt of operator
CN112560880A (en) Object classification method, object classification apparatus, and computer-readable storage medium
Liu et al. Scene background estimation based on temporal median filter with Gaussian filtering
CN114241542A (en) Face recognition method based on image stitching
Aakroum et al. Deep learning for inferring the surface solar irradiance from sky imagery
Tuba et al. Forest fires detection in digital images based on color features
CN116030417B (en) Employee identification method, device, equipment, medium and product
KR101419837B1 (en) Method and apparatus for adaboost-based object detection using partitioned image cells
CN114677667A (en) Transformer substation electrical equipment infrared fault identification method based on deep learning
CN112418248A (en) Target detection method and system based on FPGA accelerator
Shemshaki et al. Face detection based on fuzzy granulation and skin color segmentation
Higashi et al. New feature for shadow detection by combination of two features robust to illumination changes
CN109389582B (en) Method and device for identifying brightness of image main body
Yuan et al. A constructing vehicle intrusion detection algorithm based on BOW presentation model
Bakr et al. Detecting moving shadow using a fusion of local binary pattern and gabor features

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
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.