CN115761831A - Safety helmet detection method and device - Google Patents

Safety helmet detection method and device Download PDF

Info

Publication number
CN115761831A
CN115761831A CN202211117881.6A CN202211117881A CN115761831A CN 115761831 A CN115761831 A CN 115761831A CN 202211117881 A CN202211117881 A CN 202211117881A CN 115761831 A CN115761831 A CN 115761831A
Authority
CN
China
Prior art keywords
safety helmet
image
generator
scale
resolution
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.)
Pending
Application number
CN202211117881.6A
Other languages
Chinese (zh)
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.)
State Grid Information and Telecommunication Co Ltd
Beijing Guodiantong Network Technology Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Beijing Guodiantong Network Technology 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 State Grid Information and Telecommunication Co Ltd, Beijing Guodiantong Network Technology Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202211117881.6A priority Critical patent/CN115761831A/en
Publication of CN115761831A publication Critical patent/CN115761831A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The embodiment of the application provides a safety helmet detection method and a safety helmet detection device, which comprise the steps of initializing a multi-scale generation countermeasure network; reducing the collected normal image of the safety helmet to a preset size, inputting the reduced normal image of the safety helmet into a multi-scale generator, and outputting a reconstructed image of the safety helmet by the multi-scale generator; inputting the reconstructed image of the safety helmet and the acquired abnormal image of the safety helmet into a discriminator, and outputting whether the reconstructed image of the safety helmet is an abnormal image or not by the discriminator; training the multi-scale generator and the discriminator until convergence is achieved, and obtaining a trained multi-scale generation countermeasure network; generating a confrontation network by utilizing the trained multi-scale to generate a plurality of safety helmet abnormal images; the method comprises the steps of constructing a sample set comprising collected normal images of the safety helmet, abnormal images of the safety helmet and generated abnormal images of the safety helmet, training a machine learning model by using the sample set to obtain a safety helmet detection model, and accurately detecting whether a constructor wears the safety helmet or not and whether the safety helmet is in a standard or not by using the model.

Description

Safety helmet detection method and device
Technical Field
The embodiment of the application relates to the technical field of engineering safety, in particular to a safety helmet detection method and device.
Background
The wearing of the safety helmet is a powerful measure for the safety precaution of constructors in the industries of electric power, mines and the like. The traditional supervision means is to manually patrol or check the monitoring video on site, and completely depends on the safety consciousness and the responsibility of supervisors, so that missed inspection is easily caused. Whether the image of job site is handled based on machine learning model, discernment constructor wears the safety helmet, can realize automated inspection, however, because of the job site environment is complicated, the mounted position of image acquisition unit is limited, and the ubiquitous article shelters from, light shelters from the scheduling problem, leads to being difficult to accurate effectual detection safety helmet and wears the standard.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a method and a device for detecting a safety helmet, which can accurately and effectively detect whether the safety helmet is worn according to a standard.
Based on the above purpose, an embodiment of the present application provides a method for detecting a safety helmet, including:
initializing a multiscale generation countermeasure network; the multi-scale generation countermeasure network comprises a multi-scale generator and a discriminator;
reducing the collected normal image of the safety helmet to a preset size, inputting the reduced normal image of the safety helmet into the multi-scale generator, and outputting a reconstructed image of the safety helmet by the multi-scale generator; inputting the reconstructed image of the safety helmet and the acquired abnormal image of the safety helmet into a discriminator, and outputting whether the reconstructed image of the safety helmet is an abnormal image or not by the discriminator; training the multi-scale generator and the discriminator until convergence is achieved, and obtaining a trained multi-scale generation countermeasure network;
generating a confrontation network by utilizing the trained multi-scale to generate a plurality of safety helmet abnormal images;
and constructing a sample set comprising the collected normal images of the safety helmet, the abnormal images of the safety helmet and the generated abnormal images of the safety helmet, and training a machine learning model by using the sample set to obtain a safety helmet detection model.
Optionally, the multi-scale generator comprises a low resolution generator and a high resolution generator;
inputting the reduced normal image of the safety helmet into the multi-scale generator, and outputting a reconstructed image of the safety helmet by the multi-scale generator, wherein the method comprises the following steps:
inputting the reduced helmet normal image into the low-resolution generator, and outputting a low-resolution helmet image by the low-resolution generator;
after the reduced normal image of the safety helmet is amplified, the normal image is input into the high-resolution generator, and the high-resolution generator outputs a high-resolution safety helmet image;
and performing feature fusion on the low-resolution safety helmet image and the high-resolution safety helmet image to obtain the reconstructed safety helmet image.
Optionally, the discriminator comprises an auxiliary network for calculating mutual information loss of the reconstructed images of the helmet.
Optionally, the generator is implemented based on a deconvolution network structure, the discriminator is implemented based on a convolution neural network structure, convolution layers of the discriminator and the auxiliary network are the same, and full connection layers are different.
The embodiment of the present application further provides a safety helmet detection device, including:
the initialization module is used for initializing the multi-scale generation countermeasure network; the multi-scale generation countermeasure network comprises a multi-scale generator and a discriminator;
the first training module is used for reducing the collected normal image of the safety helmet to a preset size, inputting the reduced normal image of the safety helmet into the multi-scale generator and outputting a reconstructed image of the safety helmet by the multi-scale generator; inputting the reconstructed image of the safety helmet and the acquired abnormal image of the safety helmet into a discriminator, and outputting whether the reconstructed image of the safety helmet is an abnormal image or not by the discriminator; training the multi-scale generator and the discriminator until convergence is achieved, and obtaining a trained multi-scale generation countermeasure network;
the sample expansion module is used for generating a plurality of abnormal images of the safety helmet by utilizing the trained multi-scale generation countermeasure network;
and the second training module is used for constructing a sample set comprising the collected normal images of the safety helmet, the abnormal images of the safety helmet and the generated abnormal images of the safety helmet, and training the machine learning model by using the sample set to obtain the detection model of the safety helmet.
Optionally, the multi-scale generator comprises a low resolution generator and a high resolution generator;
the first training module is used for inputting the reduced normal image of the safety helmet into the low-resolution generator and outputting the low-resolution safety helmet image by the low-resolution generator; after the reduced normal image of the safety helmet is amplified, the normal image is input into the high-resolution generator, and the high-resolution generator outputs a high-resolution safety helmet image; and performing feature fusion on the low-resolution safety helmet image and the high-resolution safety helmet image to obtain a reconstructed safety helmet image.
Optionally, the discriminator comprises an auxiliary network for calculating mutual information loss of the reconstructed images of the helmet.
Optionally, the generator is implemented based on a deconvolution network structure, the discriminator is implemented based on a convolution neural network structure, convolution layers of the discriminator and the auxiliary network are the same, and full connection layers are different.
From the above, it can be seen that the safety helmet detection method and the safety helmet detection device provided by the embodiment of the application aim at the problems that a construction site is complex, a safety helmet is easy to be shielded, and various wearing irregularities exist, the countermeasure network is generated by utilizing multiple scales to richly expand abnormal images of the safety helmet, a safety helmet detection model is trained based on expanded safety helmet image samples, whether a worker wears the safety helmet on the construction site or not and the wearing problems of various safety helmets can be accurately identified by utilizing the safety helmet detection model, and a guarantee is provided for safety supervision of constructors.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only the embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of generation of a countermeasure network model according to an embodiment of the present application;
FIG. 3 is a block diagram of an apparatus according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It should be noted that technical terms or scientific terms used in the embodiments of the present application should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in the embodiments of the present application do not denote any order, quantity, or importance, but rather the terms are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
In the related technology, a machine learning model is adopted to identify constructor images collected on a construction site, and whether the constructor wears a safety helmet or not can be detected in an auxiliary mode. However, due to the fact that the environment of a construction site is complex, the installation position, the angle, the distance and the like of the image acquisition unit are limited, the distance of a constructor is far away, so that a target of the safety helmet is small, the constructor is easily shielded by on-site objects, the light of the head lamp worn by the constructor can influence the identification of the safety helmet, meanwhile, the situation that the safety helmet is worn loosely, too high, or leaned on the back is not standardized exists, and therefore, the situation that whether the safety helmet is worn in a standard mode or not is difficult to detect accurately exists.
The accuracy of the machine learning model depends on a sample set used in model training to a great extent, if the sample set is too small, the training process is easy to overfit, and if the sample set is large enough, but the types are not rich enough, and accurate detection results are difficult to obtain in a complex environment.
In view of this, an embodiment of the present application provides a method for detecting a safety helmet, which automatically generates a large number of abnormal confrontation sample images of a safety helmet based on an original safety helmet image sample by using a generated confrontation network through unsupervised learning, thereby constructing a rich and diverse sample set, trains a machine learning model by using the constructed sample set, generates a safety helmet detection model, and can accurately detect whether a constructor wears a safety helmet regularly by using the safety helmet detection model.
As shown in fig. 1 and 2, an embodiment of the present application provides a method for detecting a safety helmet, including:
s101: initializing a multiscale generation countermeasure network; the multi-scale generation countermeasure network comprises a multi-scale generator and a discriminator;
in this embodiment, a multi-scale generation countermeasure network is initialized, where the multi-scale generation countermeasure network includes a multi-scale generator and a discriminator, the multi-scale generator is used to generate an abnormal image of the crash helmet, and the discriminator is used to determine a difference between the abnormal image of the crash helmet generated by the multi-scale generator and a real abnormal image of the crash helmet.
S102: reducing the collected normal image of the safety helmet to a preset size, inputting the reduced normal image of the safety helmet into a multi-scale generator, and outputting a reconstructed image of the safety helmet by the multi-scale generator; inputting the reconstructed image of the safety helmet and the acquired abnormal image of the safety helmet into a discriminator, and outputting whether the reconstructed image of the safety helmet is an abnormal image or not by the discriminator; training the multi-scale generator and the discriminator until convergence is achieved, and obtaining a trained multi-scale generation countermeasure network;
in this embodiment, the initialized multi-scale generated countermeasure network is trained to obtain the trained multi-scale generated countermeasure network. Before training, a plurality of normal images of the safety helmet and abnormal images of the safety helmet need to be acquired, wherein the normal images of the safety helmet are images of the safety helmet normally worn by constructors, the abnormal images of the safety helmet are images of the safety helmet which is not normally worn or shielded, for example, the images of the safety helmet in an abnormal state such as loose wearing, untying of a protection rope and the like, the images of the safety helmet shielded by fences, cables, light and the like, and the types of the abnormal images can be enriched as much as possible.
After obtaining a normal image and an abnormal image of the safety helmet, training a multi-scale generation countermeasure network, reducing the normal image of the safety helmet, inputting the reduced image into a multi-scale generator, generating a reconstructed image of the safety helmet by using the multi-scale generator, inputting the reconstructed image of the safety helmet and the abnormal image of the safety helmet into a discriminator, and discriminating whether the abnormal image of the safety helmet is a real abnormal image or not by the discriminator.
In some embodiments, the multi-scale generator includes a low resolution generator and a high resolution generator; the method for generating the reconstructed image of the safety helmet by the multi-scale generator comprises the following steps:
inputting the reduced normal image of the safety helmet into a low-resolution generator, and outputting a low-resolution safety helmet image by the low-resolution generator;
after the reduced normal image of the safety helmet is amplified, the normal image is input into a high-resolution generator, and the high-resolution generator outputs a high-resolution safety helmet image;
and performing feature fusion on the low-resolution safety helmet image and the high-resolution safety helmet image to obtain a safety helmet reconstruction image.
In the embodiment, the multi-scale generator is composed of a low-resolution generator and a high-resolution generator, the low-resolution abnormal image of the safety helmet is roughly reconstructed by the low-resolution generator, the high-resolution abnormal image of the safety helmet is reconstructed by the high-resolution generator, and the high-resolution abnormal image are subjected to feature fusion, so that the reconstructed image of the safety helmet with refined features is obtained, and the detection accuracy of the small target can be improved.
In some embodiments, the discriminator includes an auxiliary network for calculating mutual information loss of the helmet reconstructed image. After the discriminator outputs the discrimination result, the mutual information loss Q (c '| x) of the safety helmet reconstruction image output by the multi-scale generator is calculated by using an auxiliary network, wherein x is the safety helmet reconstruction image output by the multi-scale generator, and c' is an approximate value of introduced mutual information.
Let G (z, c) be represented by a reconstructed image of the safety helmet generated by the multi-scale generator, wherein z is random noise input into the generator, c is a hidden variable used for representing a significant feature of the reconstructed image of the safety helmet, the hidden variable and the reconstructed image of the safety helmet have strong correlation, mutual information of the hidden variable and the reconstructed image of the safety helmet is represented as I (c; G (z, c)), and an optimization objective function of the multi-scale generator is as follows:
min G max D V I (D,G)=V(D,G)-λ I (c;G(z,c)) (1)
where V (D, G) is the objective function, V 1 And (D, G) is an optimized objective function after mutual information is introduced, G is a multi-scale generator, D is a discriminator, lambda is a constant with a positive value, lambda I (c; G (z, c)) represents the mutual information between the hidden variable c and the helmet reconstruction image output by the generator, and the larger the item is, the more relevant the hidden variable c and the output helmet reconstruction image is. During the training process, the value of the discriminator D is maximized, and the data generation capacity of the generator is minimized, so that two networks compete with each other and mutually competeWith the progress, the generator has stronger and stronger capability of generating data, and the discriminator has stronger and stronger capability of distinguishing data.
Because the mutual information I (c; G (z, c)) can not be directly calculated, the probability P (c | x) of the auxiliary network Q for approximating the hidden variable c through the mutual information loss is utilized, and the lower limit of the mutual information of the multi-scale generator G and the auxiliary network Q is as follows:
Figure BDA0003846118900000061
where H (c) is the entropy of the hidden variable c.
The loss function of the discriminator is:
Figure BDA0003846118900000062
wherein, P data Is the probability distribution of the real data sample (acquired helmet anomaly image).
The loss function of the generator is:
Figure BDA0003846118900000063
in some embodiments, the generator is implemented based on a deconvolution network structure, the discriminator is implemented based on a convolutional neural network structure, the convolutional layers of the discriminator and the auxiliary network are the same, and the fully connected layers are different.
S103: generating a confrontation network by utilizing the trained multi-scale to generate a plurality of safety helmet abnormal images;
s104: and constructing a sample set comprising the collected normal images of the safety helmet, the abnormal images of the safety helmet and the generated abnormal images of the safety helmet, and training the machine learning model by using the sample set to obtain the detection model of the safety helmet.
In this embodiment, after the countermeasure network is generated in a multi-scale manner, a rich and diverse abnormal image of the helmet is generated by using the multi-scale generation countermeasure network, a sample set is constructed based on the acquired normal image of the helmet, the abnormal image of the helmet and the abnormal image of the helmet generated by the multi-scale generation countermeasure network, a machine learning model is trained based on the sample set to obtain a detection model of the helmet, and whether a constructor wears the helmet or not and whether the wearing of the helmet is normative or not can be detected by using the detection model of the helmet. Due to the fact that the abundant diversity of the abnormal images in the training sample set is improved, the safety helmet detection model is applied to a construction site with a complex environment, and the wearing condition of the safety helmet can be accurately detected.
The safety helmet detection method provided by the embodiment of the application aims at the problems that a construction site is complex, a safety helmet is easy to be shielded, and multiple wearing irregularities exist, the countermeasure network is generated by utilizing multiple scales to abundantly expand abnormal images of the safety helmet, a safety helmet detection model is trained based on expanded safety helmet image samples, whether workers wear the safety helmet on the construction site or not and the wearing problems of various safety helmets can be accurately identified by utilizing the safety helmet detection model, and guarantee is provided for safety supervision of the constructors.
It should be noted that the method of the embodiment of the present application may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment, and the multiple devices interact with each other to complete the method.
It should be noted that the above description describes certain embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
As shown in fig. 3, an embodiment of the present application further provides a safety helmet detection device, including:
the initialization module is used for initializing the multi-scale generation countermeasure network; the multi-scale generation countermeasure network comprises a multi-scale generator and a discriminator;
the first training module is used for reducing the collected normal image of the safety helmet to a preset size, inputting the reduced normal image of the safety helmet into the multi-scale generator and outputting a reconstructed image of the safety helmet by the multi-scale generator; inputting the reconstructed image of the safety helmet and the acquired abnormal image of the safety helmet into a discriminator, and outputting whether the reconstructed image of the safety helmet is an abnormal image or not by the discriminator; training the multi-scale generator and the discriminator until convergence is achieved, and obtaining a trained multi-scale generation countermeasure network;
the sample expansion module is used for generating a confrontation network by utilizing the trained multi-scale to generate a plurality of safety helmet abnormal images;
and the second training module is used for constructing a sample set comprising the collected normal images of the safety helmet, the abnormal images of the safety helmet and the generated abnormal images of the safety helmet, and training the machine learning model by using the sample set to obtain the detection model of the safety helmet.
For convenience of description, the above devices are described as being divided into various modules by functions, which are described separately. Of course, the functions of the modules may be implemented in the same or multiple software and/or hardware when implementing the embodiments of the present application.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Fig. 4 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called by the processor 1010 for execution.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and the output devices may include a display, speaker, vibrator, indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the present disclosure, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the application. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the application, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the application are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that the embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures, such as Dynamic RAM (DRAM), may use the discussed embodiments.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present disclosure are intended to be included within the scope of the disclosure.

Claims (8)

1. A method of headgear detection, comprising:
initializing a multiscale generation countermeasure network; the multi-scale generation countermeasure network comprises a multi-scale generator and a discriminator;
reducing the collected normal image of the safety helmet to a preset size, inputting the reduced normal image of the safety helmet into the multi-scale generator, and outputting a reconstructed image of the safety helmet by the multi-scale generator; inputting the reconstructed image of the safety helmet and the acquired abnormal image of the safety helmet into a discriminator, and outputting whether the reconstructed image of the safety helmet is an abnormal image or not by the discriminator; training the multi-scale generator and the discriminator until convergence is achieved, and obtaining a trained multi-scale generation countermeasure network;
generating a confrontation network by utilizing the trained multi-scale to generate a plurality of safety helmet abnormal images;
and constructing a sample set comprising the collected normal images of the safety helmet, the abnormal images of the safety helmet and the generated abnormal images of the safety helmet, and training a machine learning model by using the sample set to obtain a safety helmet detection model.
2. The method of claim 1, wherein the multi-scale generator comprises a low resolution generator and a high resolution generator;
inputting the reduced normal image of the safety helmet into the multi-scale generator, and outputting a reconstructed image of the safety helmet by the multi-scale generator, wherein the method comprises the following steps:
inputting the reduced helmet normal image into the low-resolution generator, and outputting a low-resolution helmet image by the low-resolution generator;
after the reduced normal image of the safety helmet is amplified, the normal image is input into the high-resolution generator, and the high-resolution generator outputs a high-resolution safety helmet image;
and performing feature fusion on the low-resolution safety helmet image and the high-resolution safety helmet image to obtain the reconstructed safety helmet image.
3. The method of claim 1, wherein the discriminator comprises an auxiliary network for calculating a mutual information loss of the headgear reconstruction image.
4. The method of claim 3, wherein the generator is implemented based on a deconvolution network structure, the discriminator is implemented based on a convolution neural network structure, convolution layers of the discriminator and the auxiliary network are the same, and fully connected layers are different.
5. A safety helmet detection device, comprising:
the initialization module is used for initializing the multi-scale generation countermeasure network; the multi-scale generation countermeasure network comprises a multi-scale generator and a discriminator;
the first training module is used for reducing the collected normal image of the safety helmet to a preset size, inputting the reduced normal image of the safety helmet into the multi-scale generator and outputting a reconstructed image of the safety helmet by the multi-scale generator; inputting the reconstructed image of the safety helmet and the acquired abnormal image of the safety helmet into a discriminator, and outputting whether the reconstructed image of the safety helmet is an abnormal image or not by the discriminator; training the multi-scale generator and the discriminator until convergence is achieved, and obtaining a trained multi-scale generation countermeasure network;
the sample expansion module is used for generating a confrontation network by utilizing the trained multi-scale to generate a plurality of safety helmet abnormal images;
and the second training module is used for constructing a sample set comprising the collected normal images of the safety helmet, the abnormal images of the safety helmet and the generated abnormal images of the safety helmet, and training the machine learning model by using the sample set to obtain the detection model of the safety helmet.
6. The apparatus of claim 5, wherein the multi-scale generator comprises a low resolution generator and a high resolution generator;
the first training module is used for inputting the reduced normal image of the safety helmet into the low-resolution generator and outputting the low-resolution safety helmet image by the low-resolution generator; after the reduced normal image of the safety helmet is amplified, the normal image is input into the high-resolution generator, and the high-resolution generator outputs a high-resolution safety helmet image; and performing feature fusion on the low-resolution safety helmet image and the high-resolution safety helmet image to obtain the reconstructed safety helmet image.
7. The apparatus of claim 5, wherein the discriminator comprises an auxiliary network for calculating a mutual information loss of the helmet reconstructed image.
8. The apparatus of claim 7, wherein the generator is implemented based on a deconvolution network structure, wherein the discriminator is implemented based on a convolutional neural network structure, and wherein convolutional layers of the discriminator and the auxiliary network are the same and fully connected layers are different.
CN202211117881.6A 2022-09-14 2022-09-14 Safety helmet detection method and device Pending CN115761831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211117881.6A CN115761831A (en) 2022-09-14 2022-09-14 Safety helmet detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211117881.6A CN115761831A (en) 2022-09-14 2022-09-14 Safety helmet detection method and device

Publications (1)

Publication Number Publication Date
CN115761831A true CN115761831A (en) 2023-03-07

Family

ID=85349863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211117881.6A Pending CN115761831A (en) 2022-09-14 2022-09-14 Safety helmet detection method and device

Country Status (1)

Country Link
CN (1) CN115761831A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117934869A (en) * 2024-03-22 2024-04-26 中铁大桥局集团有限公司 Target detection method, system, computing device and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117934869A (en) * 2024-03-22 2024-04-26 中铁大桥局集团有限公司 Target detection method, system, computing device and medium

Similar Documents

Publication Publication Date Title
CN109063920B (en) Transaction risk identification method and device and computer equipment
CN102859565B (en) Method and system for security system tampering detection
US20190011263A1 (en) Method and apparatus for determining spacecraft attitude by tracking stars
US9971954B2 (en) Apparatus and method for producing image processing filter
CN106777622A (en) The method and system of the electromechanical equipment on-line fault diagnosis based on artificial intelligence
CN113343779B (en) Environment abnormality detection method, device, computer equipment and storage medium
KR20190015214A (en) Activity Recognition Technique in Sequence of Video Images Using Depth Information
CN115761831A (en) Safety helmet detection method and device
CN116933145B (en) Method for determining faults of components in industrial equipment and related equipment
CN112559978B (en) Multithreading program plagiarism detection method based on dynamic birthmarks and related equipment
CN116503318A (en) Aerial insulator multi-defect detection method, system and equipment integrating CAT-BiFPN and attention mechanism
WO2017112131A1 (en) Determining values of angular gauges
CN117422991B (en) Intelligent mine detection system and method based on big data and readable storage medium
CN114973053A (en) Detection method, device and system, storage medium and computer equipment
US9607210B2 (en) Video surveillance system and method for fraud detection
CN116092198B (en) Mining safety helmet identification detection method, device, equipment and medium
CN113191202B (en) Image processing method and device and electronic equipment
CN115766090A (en) Multi-feature fusion neural network security detection method
US9842402B1 (en) Detecting foreground regions in panoramic video frames
CN114359490A (en) Electromagnetic map construction method based on multi-mode fusion and related device
KR100902389B1 (en) Vibration measurement system, vibration measurement method and computer readble medium on which vibration measurement program is recorded
WO2020031423A1 (en) Object detection method, object detection device, and computer program
CN113343848B (en) Instrument reading identification method and device, computer equipment and storage medium
JP2014002502A (en) Stretched-out hand detector, stretched-out hand detecting method and program
US20240025046A1 (en) Abnormality detection apparatus, abnormality detection method, and program

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