Production safety early warning method and system based on image recognition

By using frequency domain analysis and adaptive directional gradient histogram features, the problems of recognition accuracy and computational complexity in image recognition technology under high dust environments are solved, and stable and safe early warning in industrial environments is achieved.

CN121353277BActive Publication Date: 2026-03-20NINGBO JIWANG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511903589.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-20
Estimated Expiration
2045-12-17

AI Technical Summary

Technical Problem

Existing image recognition technologies struggle to adaptively adjust algorithm parameters in high-dust environments, leading to reduced recognition accuracy and an inability to effectively identify industrial safety equipment. Furthermore, their high computational complexity and resource consumption make them difficult to deploy on edge devices.

Method used

By quantifying the intensity of dust interference through frequency domain analysis, constructing an adaptive directional gradient histogram feature, dynamically adjusting the gradient threshold and directional weights, and combining it with a support vector machine model to predict safety risks, the system achieves adaptive response and stable identification of dust interference.

Benefits of technology

Maintaining edge detection performance in high-dust environments improves the stability and accuracy of security equipment identification, reduces computational complexity, is suitable for real-time operation of edge devices, and provides reliable security warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121353277B_ABST
    Figure CN121353277B_ABST
Patent Text Reader

Abstract

The application discloses a production safety early warning method and system based on image recognition, and relates to the technical field of image recognition.The method comprises the following steps: obtaining original image data at a current moment and performing pretreatment to obtain a real image; performing frequency domain transformation on the data of the real image to calculate dust interference intensity; obtaining a gradient graph of the real image, calculating a dynamic gradient threshold, and screening to generate a binary gradient graph; based on the gradient direction of each pixel point in the gradient graph, the direction weight of each pixel point is calculated, and a weighted gradient feature graph is generated in combination with the binary gradient graph; the weighted gradient feature graph is divided into a plurality of cells, a weighted direction gradient histogram of each cell is constructed, and a feature descriptor of the real image is generated; a safety risk prediction index at the current moment is calculated, and a corresponding early warning strategy is executed.The application can perceive and quantify dust interference intensity, adapt to a dynamic environment of an industrial site, and realize stable and reliable safety early warning.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, and particularly relates to a production safety early warning method and system based on image recognition. BACKGROUND

[0002] In the modern industrial production environment, safety production monitoring is a key link to protect the safety of personnel and the normal operation of equipment. The traditional safety monitoring method relying on manual inspection and fixed sensors has defects such as limited coverage, slow response speed, and strong subjectivity, and is difficult to meet the needs of real-time and accurate safety early warning for automatic intelligent production and manufacturing. With the development of computer vision technology, the intelligent monitoring method based on image recognition has become an effective way to solve the above problems. The production safety early warning technology based on image recognition can automatically monitor the wearing of safety equipment and the standardization of operation behavior through visual perception, and provide technical support for preventing safety accidents. Especially for high-dust and high-risk industrial scenes such as automobile parts manufacturing, die casting, and injection molding, the automatic visual early warning system has become an indispensable part of the safety production management system, and has important value for reducing the incidence of industrial accidents and improving the level of enterprise safety production management.

[0003] At present, two types of image recognition technologies are mainly used in the field of industrial safety monitoring: one type is a deep learning-based method, such as CNN (Convolutional-Neural-Network, convolutional neural network model), which realizes high-precision recognition through a large number of sample training; the other type is a traditional hand-crafted feature-based method, such as HOG algorithm (Histogram-of-Oriented-Gradients, Histogram of Oriented Gradients algorithm), which has the characteristics of high computational efficiency and strong interpretability. However, in the complex industrial scenes such as automobile parts manufacturing, die casting, and injection molding, the existing methods face severe challenges.

[0004] The deep learning-based method is too dependent on data, needs to collect a large number of training samples for different dust environments, has high cost, long cycle, high computational complexity, large computational resource consumption, is difficult to deploy on an edge device, and has a black box characteristic of the model, thereby causing difficulty in fault diagnosis. The method based on traditional manual features mostly uses fixed parameter configurations and cannot cope with dynamic changes caused by dust interference; the feature vector distribution is prone to systematic deviation under dust interference, thereby causing image quality degradation, overall blurring and random noise, sharp decline in edge detection performance, attenuation of effective target edge gradient, increase in noise edges, inability to distinguish effective edges from dust noise, and serious reduction in recognition accuracy of various industrial safety equipment such as safety helmets, protective clothing, goggles, and safety shoes. In summary, the existing methods generally lack the ability to perceive the intensity of dust interference, cannot adaptively adjust algorithm parameters according to environmental changes, and are difficult to maintain stable early warning performance in a dynamic industrial environment. SUMMARY

[0005] To adapt to a dynamic environment in an industrial site, avoid the influence of dust interference on image recognition, realize stable and reliable safety early warning, and solve the technical defects of the traditional histogram of oriented gradients algorithm in lacking the ability to perceive the intensity of dust interference and being prone to feature vector drift in a complex industrial dust environment, the present application provides a production safety early warning method and system based on image recognition, and the technical solution is as follows.

[0006] In a first aspect, the present application provides a production safety early warning method based on image recognition, and the steps include: acquiring original image data of a production workshop at a current time and performing preprocessing to obtain a real image; performing frequency domain transformation on data of the real image to calculate the intensity of dust interference at the current time; obtaining a gradient image corresponding to the real image through a HOG algorithm, calculating a dynamic gradient threshold based on the intensity of dust interference and the gradient amplitude of each pixel point in the gradient image, and generating a binary gradient image through screening; calculating the direction weight of each pixel point based on the gradient direction of each pixel point in the gradient image, and generating a weighted gradient feature map in combination with the binary gradient image; dividing the weighted gradient feature map into a plurality of cells to construct a weighted direction gradient histogram of each cell and generate a feature descriptor of the real image; calculating a safety risk prediction index at the current time based on the feature descriptor and a support vector machine model, and executing a corresponding early warning strategy.

[0007] Wherein, the frequency domain expression of each pixel point is obtained based on frequency domain transformation, and is divided into low, medium and high three frequency regions, and the energy values are calculated respectively to obtain the component energy of low frequency, medium frequency and high frequency and the total energy; the value of the low frequency component energy divided by the sum of the low frequency and medium frequency component energy is taken as the fuzzy interference index, and the value of the high frequency component energy divided by the sum of the medium frequency and high frequency component energy is taken as the noise interference index; the ratio between the component energy of low frequency and high frequency and the total energy is taken as the fuzzy interference weight and the noise interference weight respectively, and the sum of the product between the fuzzy interference index and the corresponding weight and the product between the noise interference index and the corresponding weight is taken as the dust interference intensity at the current moment.

[0008] Preferably, the image acquisition device is deployed in the key area of the production workshop to collect monitoring image data containing the safety equipment wearing condition of the staff and the illegal operation behavior in real time, and the monitoring image data is taken as the original image data of the production workshop; the time domain median filtering method is used to eliminate camera jitter and random noise interference, and the local adaptive histogram equalization technology is used to improve the overall contrast of the image, and the original image data after denoising and contrast enhancement processing is taken as the real image.

[0009] Preferably, the data of the real image is subjected to two-dimensional discrete Fourier transform, the gray value data of each pixel point in the real image is converted into a corresponding frequency domain expression, and a frequency domain matrix of the real image is obtained; based on the energy distribution characteristics of natural images and the physical mechanism of dust interference, 40% of the frequency components on the low frequency side of each frequency domain expression in the frequency domain matrix are divided into a low frequency region, 20% of the frequency components in the middle of each frequency domain expression in the frequency domain matrix are divided into a medium frequency region, and 40% of the frequency components on the high frequency side of each frequency domain expression in the frequency domain matrix are divided into a high frequency region.

[0010] Preferably, the HOG algorithm is used to calculate the gradient amplitude and gradient direction of each pixel point in the real image to obtain a gradient map corresponding to the real image, the gradient amplitudes of the pixel points are arranged in ascending order to obtain a gradient amplitude sequence, and the gradient amplitude at the 90th percentile position of the gradient amplitude sequence is taken as a maximum gradient threshold value; an attenuation coefficient is set based on the actual application scenario, a natural exponential function is used to perform reverse mapping on the product between the attenuation coefficient and the dust interference intensity, and the product between the mapped value and the maximum gradient threshold value is taken as a dynamic gradient threshold value; the pixel points with a gradient amplitude greater than or equal to the dynamic gradient threshold value are taken as effective edge pixel points and marked as 1, and the pixel points with a gradient amplitude less than the dynamic gradient threshold value are taken as non-edge pixel points and marked as 0, and all the pixel points in the gradient map corresponding to the real image are traversed to generate a binary gradient map.

[0011] Preferably, based on the same production workshop and the complete set of safety equipment worn by the staff, the historical monitoring image under normal working conditions in a dust-free environment is obtained, the gradient direction of each pixel point in the historical monitoring image is calculated by the traditional HOG algorithm, the edge pixel points of the complete set of safety equipment are extracted by the Canny edge detection algorithm, the gradient direction distribution characteristics of the complete set of safety equipment under different viewing angles are counted, the gradient direction distribution histogram of each edge pixel point of the complete set of safety equipment under different viewing angles is constructed, and the gradient direction peak value and the gradient direction distribution range of the complete set of safety equipment are determined through cluster analysis. The gradient direction peak value of the complete set of safety equipment is taken as the center direction angle, and the difference between the upper limit and the lower limit of the gradient direction distribution range of the complete set of safety equipment is taken as the direction tolerance.

[0012] Preferably, the gradient direction of each pixel point in the gradient image corresponding to the real image is extracted, the absolute difference between the gradient direction of each pixel point and the center direction angle is calculated, the difference between the absolute difference and the direction tolerance is taken as the direction deviation of the corresponding pixel point, the weight transition steepness coefficient is set, the product of the weight transition steepness coefficient and the direction deviation of a certain pixel point is mapped by using the Sigmoid function, the basic weight value is set, when the mapped value is greater than the basic weight value, the mapped value is taken as the direction weight of the pixel point, and when the mapped value is less than or equal to the basic weight value, the basic weight value is taken as the direction weight of the pixel point. The direction weight of each pixel point in the gradient image is obtained in the same way; the product of the gradient amplitude of each pixel point in the gradient image and the corresponding direction weight is taken as the weighted gradient amplitude of each pixel point, and the product of the value of a certain pixel point in the binary gradient image and the weighted gradient amplitude of the pixel point is taken as the weighted gradient feature of the pixel point. The weighted gradient feature image corresponding to the real image is obtained by traversing all the pixel points in the binary gradient image.

[0013] Preferably, based on the actual application scene, the reference cell edge length is set as the basic unit of pixels, the product of the dust interference intensity and the reference cell edge length is taken as the adjustment value, the sum of the adjustment value and the reference cell edge length is calculated and rounded down to obtain the adaptive cell edge length which is adapted to the dust interference intensity at the current moment; based on the adaptive cell edge length, each pixel point in the weighted gradient feature image is divided into a plurality of square cells with the same size. When the row number or column number of the pixel points in the weighted gradient feature image does not meet the integer multiple of the adaptive cell edge length, virtual pixel points are set by using virtual filling to make up the position, and the value of the weighted gradient feature of the virtual pixel points is set to 0. The gradient direction of the virtual pixel points is set to the center direction angle.

[0014] Preferably, the gradient direction is 0~180°, and the 180° direction range is divided into 9 direction bins, each direction bin has a width of 20°; the weighted gradient features of each pixel point in a cell are extracted, the sum of the weighted gradient features of each direction bin is calculated, and a weighted direction gradient histogram of the cell is constructed; the length of the unit area is set with the cell as a basic unit, a plurality of adjacent cells are combined into a square unit area, each unit area is normalized in the form of a sliding window, the feature vector of each unit area is obtained, the feature vectors of all unit areas are concatenated, and the feature descriptor of the real image is obtained.

[0015] Preferably, the recognition ability of the support vector machine model trained based on the historical monitoring images to the staff not wearing a complete set of safety equipment is identified, the feature descriptor of the real image at the current moment is input into the trained support vector machine model, the recognition confidence of each staff in the real image at the current moment is obtained, the maximum value in each recognition confidence is extracted, and the product of 1 minus the difference between the dust interference intensity and the maximum value is taken as the safety risk prediction index at the current moment; a multi-level early warning strategy is preset, the value of the safety risk prediction index at the current moment is used to determine the early warning level at the current moment, and the early warning strategy of the corresponding level is executed.

[0016] In the second aspect, the application provides a production safety early warning system based on image recognition, which is used to realize the production safety early warning method based on image recognition, and comprises a processor, a memory, a communication interface, an image acquisition device and an alarm device.

[0017] Compared with the prior art, the application has the following beneficial effects:

[0018] The application accurately quantifies the dust interference intensity through frequency domain analysis, and distinguishes the blur effect and the noise effect in the physical nature; the mapping relationship between the dust scattering physical model and the image feature change is constructed based on the quantification result, the exponential decay adjustment mechanism of the gradient threshold value is constructed based on the actual decay law of the effective edge, so that the key parameters such as the gradient threshold value and the direction weight are dynamically adjusted, the adaptive response of the algorithm to the environmental change is realized, the optimal edge detection performance of the direction gradient histogram algorithm under different dust concentrations is ensured, and a high-quality edge information basis for subsequent feature extraction is provided; at the same time, the structure feature weight mechanism is introduced, the geometric characteristics of various industrial safety equipment are used through the adaptive allocation strategy of the structure feature weight, and the robustness of the key structure features under dust interference is enhanced, so that the stability and accuracy of the safety equipment recognition under dust interference are improved while the calculation efficiency is maintained.

[0019] Compared with the prior art, the application does not rely on a large amount of training data, the calculation complexity is controllable, and the edge device can run in real time; an adaptive direction gradient histogram feature optimization mechanism based on environment perception is constructed, effectively solving the technical defects that the traditional direction gradient histogram algorithm is prone to cause feature vector drift in a complex industrial dust environment; and through the global optimization of key parameters in the algorithm by the multi-level collaborative optimization architecture, the application can ensure stable recognition performance under various dust concentrations, thereby providing reliable technical support for industrial safety production early warning. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 An implementation flowchart of the production safety early warning method based on image recognition of the embodiment of the application is shown in the figure.

[0021] Figure 2 A structural block diagram of the production safety early warning system based on image recognition of the embodiment of the application is shown in the figure. DETAILED DESCRIPTION

[0022] The technical features of the application will be further described in detail below with reference to the accompanying drawings, so that those skilled in the art can understand.

[0023] The production safety early warning method based on image recognition is shown in the figure. Figure 1 The specific implementation steps are as follows.

[0024] Step S1: Real-time acquisition of original image data of the production workshop at the current time and preprocessing to obtain a real image.

[0025] Specifically, image acquisition devices are deployed in key areas of the production workshop to real-time collect monitoring image data containing the safety equipment wearing situation of the workers and the illegal operation behavior, and the monitoring image data is taken as the original image data of the production workshop; the time domain median filtering method is used to eliminate camera jitter and random noise interference, and the local adaptive histogram equalization technology is used to improve the overall contrast of the image, and the original image data after the denoising and contrast enhancement processing is taken as the real image.

[0026] The key areas of the production workshop are high-risk safety areas, such as equipment operation tables, material conveying channels, high-temperature operation areas, etc., the acquisition device is an industrial camera, and the camera uses a wide dynamic range sensor to adapt to the light changes in the industrial environment and ensure the image acquisition quality; after the original image data is processed by denoising and contrast enhancement, the spatial structure information of the original scene can be retained, the influence of environmental noise on subsequent analysis is reduced, and a foundation is laid for the extraction of dust interference features.

[0027] Step S2: Frequency domain transformation of the data of the real image to calculate the dust interference intensity at the current time.

[0028] Specifically, the data of the real image is subjected to two-dimensional discrete Fourier transform, and the gray value data of each pixel point in the real image is converted into a corresponding frequency domain expression to obtain a frequency domain matrix of the real image; based on the energy distribution characteristics of natural images and the physical mechanism of dust interference, 40% of the frequency components on the low frequency side of each frequency domain expression in the frequency domain matrix are divided into a low frequency region, 20% of the frequency components in the middle of each frequency domain expression in the frequency domain matrix are divided into a medium frequency region, and 40% of the frequency components on the high frequency side of each frequency domain expression in the frequency domain matrix are divided into a high frequency region, and the energy values of the frequency regions are calculated respectively to obtain the low frequency component energy, the medium frequency component energy and the high frequency component energy.

[0029] The low frequency region contains the overall structure and slow change information of the real image, the high frequency region contains the details, edge profile and noise information of the real image, and the medium frequency region contains the scale features of the real image; in natural images, the energy is usually concentrated in the low frequency region, accounting for about 60% to 70%, but the dust interference can significantly change the energy distribution, and the scattering effect of the dust causes more energy to concentrate in the low frequency, while the dust particles produce abnormal noise in the high frequency region; the division ratio of 40% for the low frequency region, 20% for the medium frequency region and 40% for the high frequency region can ensure that the low frequency region can fully capture the energy migration effect caused by dust scattering, and the high frequency region can effectively detect the random noise produced by the dust particles, while the medium frequency region as a reference benchmark, its range setting cannot be too large to affect the sensitivity, nor too small to cause unstable calculation results; therefore, this division can eliminate the influence of overall brightness change in the calculation of energy ratio, focus on the relative energy distribution change caused by dust interference, and thus realize the accurate quantification of the dust interference strength in complex industrial environments.

[0030] In addition, the sum of the low frequency component energy and the medium frequency component energy is taken as the blur interference reference, the ratio between the low frequency component energy and the blur interference reference is taken as the blur interference index, the sum of the medium frequency component energy and the high frequency component energy is taken as the noise interference reference, and the ratio between the high frequency component energy and the noise interference reference is taken as the noise interference index; the sum of the energy values of the frequency regions is taken as the total energy, the ratio between the low frequency component energy and the total energy is taken as the blur interference weight, and the ratio between the high frequency component energy and the total energy is taken as the noise interference weight; the sum of the product of the blur interference index and the noise interference index and the blur interference weight and the noise interference weight is taken as the dust interference strength at the current moment.

[0031] The calculation formula of the dust interference strength is as follows:

[0032]

[0033]

[0034]

[0035] In the formula, D represents the dust interference intensity at the current time, represents the blur interference index, represents the blur interference weight, represents the noise interference index, represents the noise interference weight, represents the low-frequency component energy, represents the medium-frequency component energy, represents the high-frequency component energy, represents the total energy.

[0036] Due to the scattering effect of dust, light is scattered, the edges of the real image are blurred, and the energy is concentrated in the low-frequency region. Therefore, when the dust concentration is large and the dust interference intensity is enhanced, the value of D increases, the value of S is relatively stable, the value of H increases, and the value of D is larger, indicating that the blur degree of the real image is more serious, and vice versa when the dust concentration is low and the dust interference intensity is weakened, the value of D decreases, the value of H decreases, and the value of D is smaller, indicating that the real image is clearer. The value of D is positively correlated with the blur degree of the real image, and can accurately quantify the image blur effect caused by dust scattering. At the same time, since the dust particles appear as random distribution of high-frequency noise points in the real image, the energy in the high-frequency region will be abnormally enhanced. Therefore, when the dust concentration is large and the dust interference intensity is enhanced, the value of D increases, and the value of S is relatively stable, the value of H increases, and vice versa when the dust concentration is low and the dust interference intensity is weakened, the value of D decreases, the value of D decreases; and the influence of the overall brightness change of the real image is eliminated in the calculation process by the form of ratio, so that the quantification process of the dust interference intensity is more focused on the relative energy distribution of the pixel points.

[0037] Step S3: Obtain the gradient image corresponding to the real image through the HOG algorithm, calculate the dynamic gradient threshold based on the dust interference intensity and the gradient amplitude of each pixel point in the gradient image, and generate a binary gradient image through screening.

[0038] Based on the physical law of dust scattering and the statistical characteristics of image gradient, the dynamic gradient threshold of the gradient image is calculated, which can adaptively adjust the sensitivity of edge detection under different dust interference intensities, ensure high retention rate of effective edges of safety equipment and high inhibition rate of noise edges, and thus provide reliable edge information for subsequent gradient feature extraction.

[0039] Specifically, the HOG algorithm (Histogram-of-Oriented-Gradient) is used to calculate the gradient amplitude and gradient direction of each pixel point in the real image, and a gradient image corresponding to the real image is obtained. The gradient amplitudes of the pixel points are arranged in ascending order to obtain a gradient amplitude sequence, and the gradient amplitude at the 90th percentile position of the gradient amplitude sequence is taken as the maximum gradient threshold. An attenuation coefficient is set based on the actual application scenario, and the product of the attenuation coefficient and the dust interference intensity is inversely mapped using a natural exponential function, and the product between the mapped value and the maximum gradient threshold is taken as the dynamic gradient threshold. The pixel points with gradient amplitudes greater than or equal to the dynamic gradient threshold are taken as effective edge pixel points and marked as 1, and the pixel points with gradient amplitudes less than the dynamic gradient threshold are taken as non-edge pixel points and marked as 0. All pixel points in the gradient image corresponding to the real image are traversed to generate a binary gradient image.

[0040] In the industrial safety monitoring scene, the gradient amplitudes of the pixel points on the contour boundary of the safety equipment are usually located in the high percentile region of the gradient amplitude distribution of the pixel points, while the gradient amplitudes of the background noise pixel points caused by dust interference are distributed in the low percentile region. Moreover, under normal circumstances, the gradient amplitudes of most pixel points are lower than the 90th percentile, and the remaining 10% of high gradient amplitude pixel points mainly correspond to strong edges in the image, including effective edges of target objects and part of noise edges. Selecting the 90th percentile as the threshold can retain most of the effective edges of the safety equipment while excluding most of the background noise. Therefore, based on the cumulative distribution characteristics of the image gradient amplitude, the gradient amplitude at the 90th percentile position of the gradient amplitude sequence can be taken as the maximum gradient threshold.

[0041] In addition, the calculation formula of the dynamic gradient threshold is as follows:

[0042]

[0043] In the formula, represents the dynamic gradient threshold at the current time, represents the maximum gradient threshold, k represents the attenuation coefficient, which is used to scale the value of the dust interference intensity to adjust the change rate of the dynamic gradient threshold, and the value range of k is , D represents the dust interference intensity at the current time, represents the natural exponential function.

[0044] In the dust environment, light is scattered by dust particles, resulting in a decrease in the contrast of the object edges in the image, and the gradient amplitude of the effective edge pixel point decreases exponentially with the increase of the dust concentration, so a natural exponential function is used to describe this physical attenuation process; the value of the attenuation coefficient can represent the attenuation intensity of dust on the edge contrast, and different values of can be used in different industrial scenarios such as injection molding, die casting, etc. to adapt to the scene characteristics, for example, for small particles such as metal dust, its scattering ability is strong, and a larger value can be taken, and for large particles such as plastic dust, its scattering ability is weak, and the value of is reduced.

[0045] When the dust interference intensity is small, the dynamic gradient threshold value at the current moment is close to the maximum gradient threshold value, and only the pixel points with high gradient amplitude can be retained to clearly display the edge profile of the object; when the dust interference intensity is large, the dynamic gradient threshold value is reduced, and more pixel points can be retained to effectively filter the low-amplitude noise edges generated by the dust to adapt to the dust environment with a large concentration.

[0046] Step S4: Based on the gradient direction of each pixel point in the gradient map, the direction weight of each pixel point is calculated, and a weighted gradient feature map is generated combined with the binary gradient map.

[0047] Specifically, based on the same production workshop and the complete wearing of the full set of safety equipment, the historical monitoring images of normal working conditions under the non-dust interference environment are obtained, the gradient directions of each pixel point in the historical monitoring images are calculated through the traditional HOG algorithm, the edge pixel points of the full set of safety equipment are extracted by using the Canny edge detection algorithm, the gradient direction distribution characteristics of the full set of safety equipment under different viewing angles are counted, the gradient direction distribution histogram of each edge pixel point of the full set of safety equipment under different viewing angles is constructed, and then the gradient direction peak value and the gradient direction distribution range of the full set of safety equipment are determined through clustering analysis. The gradient direction peak value of the full set of safety equipment is taken as the center direction angle, and the difference between the upper limit and the lower limit of the gradient direction distribution range of the full set of safety equipment is taken as the direction tolerance.

[0048] Among them, the collection of historical monitoring images is not less than 10000, which can be simulated by the workers who completely wear the full set of safety equipment in the same production workshop to simulate the operation behavior in the same production workshop, so as to collect historical monitoring images under different viewing angles. The definition of the full set of safety equipment is based on the actual application scene, such as safety helmet, protective clothing, goggles, safety shoes, ear cover and other necessary protective equipment.

[0049] ​Furthermore, the gradient direction of each pixel in the gradient map corresponding to the real image is extracted, and the absolute difference between the gradient direction of each pixel and the angle of the center direction is calculated. The difference between the absolute difference and the direction tolerance is taken as the direction deviation of the corresponding pixel. A weighted transition steepness coefficient is set, and the Sigmoid function is used to map the product between the weighted transition steepness coefficient and the direction deviation of a certain pixel. A base weight value is set. When the mapped value is greater than the base weight value, the mapped value is taken as the direction weight of the pixel. When the mapped value is less than or equal to the base weight value, the base weight value is taken as the direction weight of the pixel. Similarly, the direction weight of each pixel in the gradient map is obtained. The product between the gradient magnitude of each pixel in the gradient map and the corresponding direction weight is taken as the weighted gradient magnitude of each pixel. The product between the value of a certain pixel in the binarized gradient map and the weighted gradient magnitude of that pixel is taken as the weighted gradient feature of that pixel. By traversing all pixels in the binarized gradient map, the weighted gradient feature map corresponding to the real image is obtained.

[0050] Wherein, the orientation weight of the i-th pixel in the gradient map is The calculation formula is as follows:

[0051]

[0052] In the formula, This represents the gradient direction of the i-th pixel in the gradient map. Indicates the angle of the center direction. This indicates the directional tolerance, and s represents the weight transition steepness coefficient. Indicates the base weight value. This represents the function for determining the maximum value; the weight transition steepness coefficient 's' controls the rate of change of the directional weights, ensuring a smooth decay at the boundaries of the object's contour. The range of values ​​for 's' is... Basic weight value This is used to ensure that pixels in non-critical directions still retain a certain feature contribution, thereby preventing the complete loss of features in non-critical directions, maintaining the integrity of the object's spatial structure, and prioritizing the preservation of key structural features of safety equipment, such as the outline of a safety helmet and the vertical edges of protective clothing, under dust interference, while suppressing random noise edges.

[0053] Furthermore, the calculation of pixel-weighted gradient features achieves a multi-level feature optimization mechanism by multiplying the screening label value, the directional weight, and the gradient magnitude of each pixel in the binarized gradient map. For non-edge pixels with a screening label value of 0, their contribution is completely suppressed to eliminate noise interference. For effective edge pixels with a screening label value of 1, adaptive weight allocation is obtained based on the proximity of their gradient direction to the direction of the key structure. This strengthens the edges of the key structure of the safety equipment in the weighted gradient feature map and effectively suppresses the random noise edges generated by dust, thereby significantly improving the robustness and discriminative ability of feature extraction in complex industrial environments.

[0054] Step S5: Divide the weighted gradient feature map into several cells, construct the weighted gradient histogram of each cell, and generate the feature descriptor of the real image.

[0055] Specifically, based on the actual application scenario, a baseline cell side length is set with pixels as the basic unit. The product between the dust interference intensity and the baseline cell side length is used as an adjustment value. The sum of the adjustment value and the baseline cell side length is calculated and rounded down to obtain an adaptive cell side length that adapts to the dust interference intensity at the current moment. Based on the adaptive cell side length, each pixel in the weighted gradient feature map is divided into several square cells of the same size. When the number of rows or columns of pixels in the weighted gradient feature map does not meet the integer multiple of the adaptive cell side length, virtual pixels are set to fill the gaps using virtual filling. The weighted gradient feature value of the virtual pixels is set to 0, and the gradient direction of the virtual pixels is set to the center direction angle.

[0056] The formula for calculating the side length of the adaptive cell is as follows:

[0057]

[0058] In the formula, This indicates the adaptive cell side length that adjusts to the current dust interference intensity. Let D represent the side length of the reference cell, and let D represent the dust interference intensity at the current moment. This represents the floor operation.

[0059] As the dust interference intensity D increases, the blurring of the object's edge contour increases, the noise level rises, and the noise level increases. The value of can improve the signal-to-noise ratio through spatial averaging effects, thereby enhancing noise immunity and robustness; when the dust interference intensity D decreases, The value approaches the side length of the baseline cell. It can maximize the preservation of details of the object's edge contours.

[0060] In addition, the gradient direction is 0~180°, and the 180° direction range is divided into 9 direction bins, and the width of each direction bin is 20°; the weighted gradient features of each pixel point in a certain cell are extracted, the sum of the weighted gradient features of each direction bin is calculated, and the weighted direction gradient histogram of the cell is constructed, and the weighted direction gradient histogram of each cell is obtained in the same way; the edge length of the unit area is set as the basic unit of the cell, a plurality of adjacent cells are combined into a square unit area, each unit area is standardized by a sliding window, and the feature vector of each unit area is obtained, the feature vectors of all unit areas are concatenated, and the feature descriptor of the real image is obtained.

[0061] The method for standardizing the data in the unit area mainly includes L1-norm, L1-sqrt, L2-norm, and L2-Hys, and the L2-Hys standardization method is usually used by default.

[0062] Step S6: Based on the feature descriptor and the support vector machine model, the safety risk prediction index at the current time is calculated, and the corresponding early warning strategy is executed.

[0063] Specifically, based on the recognition ability of the support vector machine model trained based on the historical monitoring images for the staff not wearing a complete set of safety equipment, the feature descriptor of the real image at the current time is input into the trained support vector machine model to obtain the recognition confidence of each staff in the real image at the current time, the maximum value in each recognition confidence is extracted, and the product of 1 minus the difference between the dust interference intensity and the maximum value is taken as the safety risk prediction index at the current time; a multi-level early warning strategy is preset, based on the value of the safety risk prediction index at the current time, the early warning level at the current time is determined, and the early warning strategy of the corresponding level is executed.

[0064] The calculation formula of the safety risk prediction index is as follows:

[0065]

[0066] In the formula, indicates the safety risk prediction index at the current time, indicates the maximum value in each recognition confidence output by the support vector machine model, and D indicates the dust interference intensity at the current time.

[0067] When the safety risk prediction index is greater than or equal to 0.3 and less than 0.6, a first-level early warning is triggered, and a risk prompt is marked on a monitoring image; when the safety risk prediction index is greater than or equal to 0.6 and less than 0.8, a second-level early warning is triggered, early warning information is pushed to a mobile terminal of a manager and a response is required within 30 seconds; and when the safety risk prediction index is greater than or equal to 0.8, a third-level early warning is triggered, the operation of a device in a related area is automatically suspended, and an alarm of a production workshop is triggered.

[0068] The application further discloses a production safety early warning system based on image recognition. Figure 2 The application further discloses a production safety early warning system based on image recognition.

[0069] The embodiments of the application are only used to describe the preferred embodiments of the application, and are not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope of the application; various modifications and changes made by engineering technicians in the field without departing from the design idea of the application should fall within the protection scope of the application.

Claims

1. A production safety early warning method based on image recognition, characterized in that: The system acquires and preprocesses raw image data of the production workshop in real time to obtain a true image. The data of the real image is transformed in the frequency domain to calculate the dust interference intensity at the current moment; the gradient map corresponding to the real image is obtained by using the HOG algorithm; based on the dust interference intensity and the gradient magnitude of each pixel in the gradient map, the dynamic gradient threshold is calculated and a binary gradient map is generated; based on the gradient direction of each pixel in the gradient map, the direction weight of each pixel is calculated, and a weighted gradient feature map is generated by combining the binary gradient map. The weighted gradient feature map is divided into several cells, and a weighted gradient histogram of each cell is constructed to generate a feature descriptor for the real image. Based on feature descriptors and support vector machine models, calculate the current security risk prediction index and execute corresponding early warning strategies. Among them, the frequency domain expression of each pixel is obtained based on frequency domain transformation, and it is divided into three frequency regions: low, medium and high. The energy value is calculated for each region to obtain the component energy of low frequency, medium frequency and high frequency and the total energy. The value of dividing the low-frequency component energy by the sum of the low-frequency and mid-frequency component energies is used as the fuzzy interference index, and the value of dividing the high-frequency component energy by the sum of the mid-frequency and high-frequency component energies is used as the noise interference index. The ratios between the low-frequency and high-frequency component energies and the total energy are used as the fuzzy interference weight and the noise interference weight, respectively. The sum of the products of the fuzzy interference index and the noise interference index with their respective weights is used as the dust interference intensity at the current moment.

2. The production safety early warning method based on image recognition according to claim 1, characterized in that, The real-time acquisition and preprocessing of raw image data of the production workshop at the current moment to obtain a real image includes: deploying image acquisition devices in key areas of the production workshop to collect real-time monitoring image data including the wearing status of safety equipment and violations of operating procedures by workers, and using the monitoring image data as the raw image data of the production workshop; using temporal median filtering to eliminate camera shake and random noise interference, and using local adaptive histogram equalization technology to improve the overall image contrast, and using the raw image data after noise reduction and contrast enhancement as the real image.

3. The production safety early warning method based on image recognition according to claim 1, characterized in that, The step of performing frequency domain transformation on the data of the real image to calculate the dust interference intensity at the current moment includes: performing a two-dimensional discrete Fourier transform on the data of the real image to convert the gray value data of each pixel in the real image into a corresponding frequency domain expression, thereby obtaining the frequency domain matrix of the real image; based on the energy distribution characteristics of the natural image and the physical mechanism of dust interference, dividing the 40% frequency components on the low-frequency side of each frequency domain expression in the frequency domain matrix into a low-frequency region, dividing the 20% frequency components in the middle of each frequency domain expression into a mid-frequency region, and dividing the 40% frequency components on the high-frequency side of each frequency domain expression into a high-frequency region.

4. The production safety early warning method based on image recognition according to claim 1, characterized in that, The process of obtaining the gradient map corresponding to the real image using the HOG algorithm, and calculating the dynamic gradient threshold and filtering to generate a binary gradient map based on the dust interference intensity and the gradient magnitude of each pixel in the gradient map, includes: using the HOG algorithm to calculate the gradient magnitude and gradient direction of each pixel in the real image to obtain the gradient map corresponding to the real image; arranging the gradient magnitudes of each pixel in ascending order to obtain a gradient magnitude sequence; using the gradient magnitude at the 90th percentile of the gradient magnitude sequence as the maximum gradient threshold; setting an attenuation coefficient based on the actual application scenario; using the natural exponential function to inversely map the product between the attenuation coefficient and the dust interference intensity; using the product between the mapped value and the maximum gradient threshold as the dynamic gradient threshold; marking pixels with gradient magnitudes greater than or equal to the dynamic gradient threshold as effective edge pixels and marking them as 1; marking pixels with gradient magnitudes less than the dynamic gradient threshold as non-edge pixels and marking them as 0; traversing all pixels in the gradient map corresponding to the real image to generate a binary gradient map.

5. The production safety early warning method based on image recognition according to claim 2, characterized in that, The process involves calculating the directional weight of each pixel based on its gradient direction in the gradient map, and generating a weighted gradient feature map by combining the binarized gradient map. This includes: acquiring historical monitoring images of normal working conditions in a dust-free environment within the same production workshop, with workers fully equipped with safety gear; calculating the gradient direction of each pixel in the historical monitoring images using the traditional HOG algorithm; extracting edge pixels of the complete safety gear using the Canny edge detection algorithm; statistically analyzing the gradient direction distribution characteristics of the complete safety gear under different viewpoints; constructing a histogram of gradient direction distribution of each edge pixel of the complete safety gear under different viewpoints; determining the peak value and distribution range of the gradient direction of the complete safety gear through cluster analysis; using the peak value of the gradient direction of the complete safety gear as the center direction angle; and using the difference between the upper and lower limits of the gradient direction distribution range of the complete safety gear as the direction tolerance.

6. The production safety early warning method based on image recognition according to claim 5, characterized in that, The process of calculating the directional weight of each pixel based on the gradient direction of each pixel in the gradient map and generating a weighted gradient feature map by combining the binarized gradient map further includes: extracting the gradient direction of each pixel in the gradient map corresponding to the real image; calculating the absolute difference between the gradient direction of each pixel and the angle of the center direction; using the difference between the absolute difference and the direction tolerance as the direction deviation of the corresponding pixel; setting a weight transition steepness coefficient; using the Sigmoid function to map the product between the weight transition steepness coefficient and the direction deviation of a certain pixel; setting a base weight value; when the mapped value is greater than the base weight value, the mapped value is used as the direction weight of the pixel; when the mapped value is less than or equal to the base weight value, the base weight value is used as the direction weight of the pixel; similarly, the direction weight of each pixel in the gradient map is obtained; the product between the gradient magnitude of each pixel in the gradient map and the corresponding directional weight is used as the weighted gradient magnitude of each pixel; the product between the value of a certain pixel in the binarized gradient map and the weighted gradient magnitude of that pixel is used as the weighted gradient feature of that pixel; and traversing all pixels in the binarized gradient map to obtain the weighted gradient feature map corresponding to the real image.

7. The production safety early warning method based on image recognition according to claim 6, characterized in that, The process of dividing the weighted gradient feature map into several cells includes: setting a baseline cell side length based on the actual application scenario with pixels as the basic unit; using the product of the dust interference intensity and the baseline cell side length as an adjustment value; calculating the sum of the adjustment value and the baseline cell side length and rounding it down to obtain an adaptive cell side length that adapts to the dust interference intensity at the current moment; and based on the adaptive cell side length, dividing each pixel in the weighted gradient feature map into several square cells of the same size. When the number of rows or columns of pixels in the weighted gradient feature map does not meet the integer multiple of the adaptive cell side length, virtual pixels are set to fill the gaps using virtual filling, and the weighted gradient feature value of the virtual pixels is set to 0, and the gradient direction of the virtual pixels is set to the center direction angle.

8. The production safety early warning method based on image recognition according to claim 7, characterized in that, The process of constructing a weighted directional gradient histogram for each cell to generate a feature descriptor for the real image includes: the gradient direction value is 0~180°, the 180° direction range is divided into 9 direction bins, and the width of each direction bin is 20°; the weighted gradient features of each pixel in a cell are extracted, the sum of the weighted gradient features of each direction bin is calculated, and the weighted directional gradient histogram of that cell is constructed; similarly, the weighted directional gradient histogram of each cell is obtained; the side length of the cell area is set with the cell as the basic unit, multiple adjacent cells are merged into a square cell area, each cell area is standardized by a sliding window to obtain the feature vector of each cell area, and the feature vectors of all cell areas are concatenated to obtain the feature descriptor of the real image.

9. The production safety early warning method based on image recognition according to claim 5, characterized in that, The method, based on feature descriptors and support vector machine (SVM) models, calculates the current safety risk prediction index and executes corresponding early warning strategies. This includes: training an SVM model based on historical surveillance images to identify workers not wearing complete safety equipment; inputting the feature descriptors of the current real-time images into the trained SVM model to obtain the recognition confidence score for each worker in the current real-time images; extracting the maximum value among the recognition confidence scores; and using the product of 1 minus the dust interference intensity and the maximum value as the current safety risk prediction index. A multi-level early warning strategy is preset; based on the value of the current safety risk prediction index, the early warning level for the current time is determined, and the corresponding early warning strategy is executed.

10. A production safety early warning system based on image recognition, characterized in that: It includes a processor, a memory, a communication interface, an image acquisition device, and an alarm device. The processor stores computer program instructions for implementing the production safety early warning method based on image recognition as described in any one of claims 1 to 9. The communication interface is communicatively connected to the image acquisition device and the alarm device.

Citation Information

Patent Citations

  • Industrial robot health monitoring method and system

    CN115496931A

  • Intelligent early warning system for building construction video monitoring big data

    CN116071657A