Method and device for identifying work clothes at power operation sites based on deep learning
Through the combination of deep learning and color feature information, a feature matrix and ellipsoidal region are constructed, and a clustering algorithm is used to determine whether the power operator is wearing work clothes, which solves the problem of insufficient accuracy in work clothes recognition in the existing technology, and achieves a higher Identify accuracy.
Patent Information
- Application Number
- CN202111572466.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In the prior art, when using computer vision object detection algorithms to identify work clothes on site of electric work, the accuracy is insufficient and misjudgments often occur, which cannot effectively ensure whether the worker is wearing work clothes correctly.
Using a deep learning-based method, by training the combination of deep neural network model and color feature information, a feature color matrix is constructed, and the ellipsoidal region is fitted. The clustering algorithm is used to calculate the clustering center point of the color information to determine whether the power operator is Wearing work clothes.
It significantly improves the accuracy of work clothes recognition, reduces misjudgment, and ensures accurate monitoring of the wear status of electric power workers.
Smart Images

Figure CN114299426B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method and device for recognizing work clothes at an electric power operation site based on deep learning. Background Art
[0002] Electric power workers are required to wear work clothes when working. The traditional method of checking whether workers are wearing work clothes correctly is manual supervision. Due to the limitation of working hours and working scenes, supervisors cannot guarantee to monitor at all times. The current technology used considers the use of computer vision and uses target detection algorithms to identify workers' clothing, but due to the limitation of algorithm accuracy, misjudgment often occurs. Summary of the invention
[0003] In view of the above-mentioned defects, an embodiment of the present invention discloses a method and device for identifying work clothes at an electric power operation site based on deep learning, which can effectively improve the accuracy of work clothes identification.
[0004] A first aspect of an embodiment of the present invention discloses a method for identifying work clothes at an electric power operation site based on deep learning, the method comprising:
[0005] Collect a large number of pictures containing information about power workers wearing work clothes and not wearing work clothes, and manually annotate all the collected pictures to build the first training data set;
[0006] Using the first training data set to train a deep neural network initial model for detecting work clothes and non-work clothes, to obtain a deep neural network model;
[0007] According to the manually annotated content, all the work clothes pictures in the first training data set are cropped to obtain cropped work clothes images, and a second training data set is constructed;
[0008] Extract color information of all work clothes images in the second training data set, and construct a characteristic color matrix through the extracted image color information. The work clothes actually worn during work are blue or gray, and the collected image color points will also be concentrated in the blue-gray area of the color gamut, and the distribution is ellipsoidal. Determine the position ζ of the entire ellipsoidal area by fitting;
[0009] The deep neural network model is used to determine the position information of the target in the image to be identified and the probability information p of the target being work clothes and non-work clothes. h1 、p p1 , cropping the image to be identified according to the position information, counting the color information of the cropped image to be identified, and using a clustering algorithm to calculate k cluster center points of the color information;
[0010] For the i-th cluster center point d i , if d i ∈ζ, then let p di =1; if Set the tolerance distance d tolerance , calculate the distance d from the point to the ellipsoid real , then the point
[0011] If p h1 +p d >p p1 , then it is judged that the clothes are work clothes, otherwise they are not wearing work clothes;
[0012] in, 1≤i≤k,p di is the i-th cluster center point d i Probability information for work clothes.
[0013] As a preferred embodiment, in the first aspect of the embodiment of the present invention, before constructing the second training data set, the method further includes:
[0014] The cropped workwear images are uniformly scaled to the same size.
[0015] As a preferred embodiment, in the first aspect of the embodiment of the present invention, a first training data set is constructed, and then the method further includes:
[0016] The brightness of the images in the first training data set is adjusted.
[0017] As a preferred embodiment, in the first aspect of the embodiment of the present invention, the step of adjusting the brightness of the images in the first training data set includes:
[0018] Convert all images in the first training data set from RGB color domain to HIS color domain, and set the image brightness threshold I θ , if the brightness of an image in the first training data set is I<I θ , then adjust the brightness of the image to make it equal to the image brightness threshold I θ , if the brightness of an image in the first training data set I≥I θ , it is not adjusted.
[0019] As a preferred embodiment, in the first aspect of the embodiment of the present invention, color information of all workwear images in the second training data set is extracted, and a characteristic color matrix is constructed by the extracted image color information, including:
[0020] The number of times the color of the pixel points in all the workwear images in the second training data set appears is counted, and a three-dimensional coordinate system is constructed. The three coordinate axes are R, G, and B respectively. The value of each point in the coordinate system represents the number of times the color point appears in the data set. In order to improve the robustness of the color model and reduce the influence of messy colors, a color point number threshold C is preset. θ , remove the three-dimensional coordinate system with a value less than C θ point.
[0021] As a preferred embodiment, in the first aspect of the embodiment of the present invention, the position z of the entire ellipsoidal area is determined by fitting, including:
[0022] Assuming the standard equation for an ellipsoidal region is:
[0023]
[0024] Among them (O x ,O y ,O z ) is the center of the ellipsoid, R x ,R y ,R z are the lengths of the three semi-axes;
[0025] Remove the internal area points in the three-dimensional coordinate system and keep only the boundary position points to obtain the point set P;
[0026] Rewrite formula (1) as:
[0027]
[0028] Further sorting gives:
[0029] y 2 A+z 2 B+xC+yD+zE+F=-x 2 (3)
[0030] Right now:
[0031] [y 2 z 2 xyz 1][ABCDEF] T =-x 2 (4)
[0032] Rewrite formula (4) as KX=Y, where X=[ABCDEF] T , the least squares solution of X is: X=(K T K) -1 K T Y, X are the results of ellipsoid equation fitting. X is fitted through the point set, and the internal area determined by the ellipsoid equation is ζ.
[0033] The second aspect of the embodiment of the present invention discloses a device for identifying work clothes at a power operation site based on deep learning, which includes:
[0034] A collection unit is used to collect a large number of pictures containing information of power workers wearing work clothes and not wearing work clothes, and manually annotate all the collected pictures to construct a first training data set;
[0035] A training unit, configured to train an initial deep neural network model for detecting work clothes and non-work clothes using the first training data set to obtain a deep neural network model;
[0036] A cropping unit, used to crop all the work clothes images in the first training data set according to the manually annotated content, obtain cropped work clothes images, and construct a second training data set;
[0037] A fitting unit is used to extract color information of all work clothes images in the second training data set, and construct a characteristic color matrix through the extracted image color information. The work clothes actually worn during work are blue or gray, and the collected image color points are also concentrated in the blue-gray area of the color gamut, and the distribution is ellipsoidal. The position ζ of the entire ellipsoidal area is determined by fitting;
[0038] A recognition unit, used to determine the position information of the target in the image to be recognized and the probability information p of the target being work clothes or non-work clothes using the deep neural network model. h1 、p p1 , cropping the image to be identified according to the position information, counting the color information of the cropped image to be identified, and using a clustering algorithm to calculate k cluster center points of the color information;
[0039] The judgment unit is used to judge whether the work clothes are worn at the power operation site. For the i-th cluster center point d i , if d i ∈ζ, then let p di =1; if Set the tolerance distance d tolerance , calculate the distance d from the point to the ellipsoid real , then the point
[0040] If p h1 +p d >p p1 , then it is judged that the clothes are work clothes, otherwise they are not wearing work clothes;
[0041] in, p di is the i-th cluster center point di Probability information for work clothes.
[0042] A third aspect of an embodiment of the present invention discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute a method for identifying work clothes at an electric power operation site based on deep learning disclosed in the first aspect of an embodiment of the present invention.
[0043] A fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute a method for identifying work clothes at an electric power operation site based on deep learning disclosed in the first aspect of an embodiment of the present invention.
[0044] A fifth aspect of an embodiment of the present invention discloses a computer program product. When the computer program product runs on a computer, the computer executes a method for identifying work clothes at an electric power operation site based on deep learning disclosed in the first aspect of an embodiment of the present invention.
[0045] A sixth aspect of an embodiment of the present invention discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes a method for identifying work clothes at an electric power operation site based on deep learning disclosed in the first aspect of an embodiment of the present invention.
[0046] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0047] The embodiment of the present invention improves the overall recognition rate through the organic combination of deep learning neural network and color feature information. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 It is a flowchart of a method for identifying work clothes at a power operation site based on deep learning disclosed in an embodiment of the present invention;
[0050] Figure 2 It is a structural schematic diagram of a device for identifying work clothes at a power operation site based on deep learning disclosed in an embodiment of the present invention;
[0051] Figure 3It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] It should be noted that the terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having" in the embodiments of the present invention and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0054] The embodiment of the present invention discloses a method and device for identifying work clothes at an electric power operation site based on deep learning, which can improve the efficiency of work clothes identification, and is described in detail below with reference to the accompanying drawings.
[0055] Embodiment 1
[0056] Electric power workers are required to wear work clothes when performing their work. In order to monitor whether the electric power workers are wearing work clothes normally, the target detection technology in computer vision is applied. By training a deep neural network to detect work clothes and those not wearing work clothes, the images of the electric power workers' work site are collected at the same time, and the images are put into the neural network for recognition, and the corresponding reasoning results are given. If the neural network detects that there is no work clothes, it is judged that the staff is not wearing work clothes correctly. However, due to the limitation of the recognition accuracy of the neural network, misjudgment often occurs. The embodiment of the present invention provides a method for identifying work clothes at the electric power operation site based on deep learning. The deep learning neural network is trained to make a preliminary judgment, and the output of the neural network is processed to make a secondary judgment using the pre-obtained color feature information. The overall recognition rate is improved by the organic combination of the deep learning neural network and the color feature information.
[0057] See also Figure 1 , Figure 1 1 is a flow chart of a method for identifying work clothes at power operation sites based on deep learning disclosed in an embodiment of the present invention. Figure 1 As shown, the method for identifying work clothes at power operation sites based on deep learning includes the following steps:
[0058] S110, collecting a large number of pictures containing information of power workers wearing work clothes and not wearing work clothes, and manually annotating all collected pictures to construct a first training data set.
[0059] The data set of training samples, i.e., the first training data set, is used to train the deep learning model, and the internal area of the ellipsoidal equation is fitted based on the color feature information, so as to obtain the corresponding recognition model. The collected pictures mainly include two categories, one is pictures of power workers wearing work clothes, and the other is pictures of power workers wearing non-work clothes, i.e., not wearing work clothes. During the collection process, as many pictures of each work clothes as possible are obtained. In a preferred embodiment of the present invention, 10,000 samples of the first category can be collected.
[0060] The collected images are manually annotated, and the manual annotation information mainly includes type information and contour information. Among them, the type information (information on the category to which the image belongs) is work clothes or non-work clothes, which can only be one of them. The contour information refers to drawing the corresponding contour based on the corresponding type information, that is, the contour of work clothes or non-work clothes.
[0061] In order to reduce the influence of light in the original image on the image, the brightness of the images in the first training data set is adjusted to a uniform level, all images in the data set are converted from the RGB color domain to the HIS color domain (H: hue, S: saturation, I: brightness), and the image brightness threshold I is set. θ , if the brightness of the image I<I θ , then let the image I=I θ , if the image brightness I ≥ I θ , the brightness of the image is no longer adjusted. After adjustment, all images are adjusted from the HIS color gamut back to the RGB color gamut.
[0062] S120: Use the first training data set to train an initial deep neural network model for detecting work clothes and non-work clothes to obtain a deep neural network model.
[0063] The deep learning model can be any existing deep learning network. For example, a deep neural network can be used, such as the YOLOv5 algorithm model, which has both high recognition speed and recognition accuracy and is suitable for the high real-time requirements of power operation sites. The YOLOv5 neural network initial model is trained using the existing first training data set to obtain the final deep neural network model.
[0064] The method for detecting work clothes and non-work clothes is the object detection technology in computer vision technology, whose task is to find all the targets (objects) of interest in the image and determine their categories and locations.
[0065] S130: cropping all the work clothes images in the first training data set according to the manually annotated content to obtain cropped work clothes images, and constructing a second training data set.
[0066] According to the contour information in the manual annotation information, the contour of the work clothes contained in each picture in each first training data set is cropped to obtain new pictures, and the second training data set is constructed based on these new pictures. The cropping method can be assisted by OpenCV technology.
[0067] In order to ensure the uniformity of the cropped images, all images in the cropped second training data set are uniformly scaled to w×h size, where w is the width of the image and h is the height of the image. It should be noted here that scaling includes two situations: enlargement or reduction, so that all RGB images have the same size and the same number of pixels. During the enlargement process, the way to increase the pixels can be interpolation, etc., and when reducing, the equal-space sampling method or local mean method can be used.
[0068] S140, extracting the color information of all the work clothes images in the second training data set, constructing a characteristic color matrix through the extracted image color information, the work clothes actually worn for work are blue or gray, and the collected image color points will also be concentrated in the blue-gray area of the color gamut, and the distribution is ellipsoidal, and the position ζ of the entire ellipsoidal area is determined by fitting.
[0069] The number of times the color of the pixel points in all the workwear images in the second training data set is counted, and a three-dimensional coordinate system is constructed. The three coordinate axes are R, G, and B respectively. The value of each point in the coordinate system represents the number of times the color point appears in the data set. In order to improve the robustness of the color model and reduce the influence of messy colors, a color point number threshold C is preset. θ , remove the three-dimensional coordinate system with a value less than C θ The value of is used to obtain the reduced color point.
[0070] The work clothes actually worn during work are blue or gray, and the collected image color points will also be concentrated in the blue-gray area of the color gamut, and the distribution is ellipsoidal. The position ζ of the entire ellipsoidal area is determined by fitting.
[0071] Assume the standard equation for the ellipsoidal region is:
[0072]
[0073] Among them (O x ,O y ,O z ) is the center of the ellipsoid, R x ,R y,R z are the lengths of the three semi-axes.
[0074] By removing the internal area points of the reduced color points and retaining only the boundary position points, the point set P can be obtained.
[0075] The above formula (5) can be rewritten as:
[0076]
[0077] Further sorting out formula (6) yields:
[0078] y 2 A+z 2 B+xC+yD+zE+F=-x 2 (7)
[0079] Right now:
[0080] [y 2 z 2 xyz 1][ABCDEF] T =-x 2 (8)
[0081] Rewrite the above formula (8) as:
[0082] KX=Y (9)
[0083] Where X = [ABCDEF] T .
[0084] The least squares solution of X is:
[0085] X=(K T K) -1 K T Y (10)
[0086] X in formula (10) is the result of ellipsoid fitting. X is fitted by the above point set to determine the internal area determined by the ellipsoid equation, which is denoted as ζ.
[0087] S150, using the deep neural network model to determine the position information of the target in the image to be identified and the probability information p of the target being work clothes and non-work clothes h1 、p p1 , cropping the image to be identified according to the position information, counting color information of the cropped image to be identified, and using a clustering algorithm to calculate k cluster center points of the color information.
[0088] The image to be identified is a relevant image of the power worker taken at the power operation site, which can be a whole image of the power worker or a partial image including the hand area of the power worker. It is preferably adapted to the image of the first training data set.
[0089] Through the trained deep neural network model, the location information of the target (work clothes or non-work clothes) in the image to be identified can be obtained, as well as the probability p of the target being work clothes or non-work clothes. h1 、p p1 .
[0090] Then, the target is cropped according to its position information to obtain a cropped image. After the cropped image is scaled accordingly (to make its size w×h), the color information in the image is counted, and a clustering algorithm is used to calculate the k cluster center points of the colors in the image.
[0091] S160, judging whether the person is wearing work clothes.
[0092] For the i-th cluster center point d i (1≤i≤k), if d i ∈ζ(d i is located inside the interior region determined by the ellipsoid equation), then let p di =1; if Set the tolerance distance d tolerance , calculate the distance d from the point to the ellipsoid real , then the i-th cluster center point d i is the probability information p of work clothes di :
[0093]
[0094] make where p d is the mean of the probability information that all k cluster centers are work clothes.
[0095] If p h1 +p d >p p1 , then it is judged that the person is wearing work clothes, otherwise it is judged that the person is not wearing work clothes. In order to make the recognition more accurate, in a preferred embodiment of the present invention, a preset threshold value p can also be set s , when p h1 +p d >p p1 And p h1 +p d >p s Only when the target is considered to be work clothes and meets the work requirements.
[0096] In summary, by implementing the embodiments of the present invention, a preliminary judgment can be made by training a deep learning neural network, and then the output of the neural network can be processed to make a secondary judgment using the pre-obtained color feature information, thereby improving the overall recognition rate through the organic combination of the deep learning neural network and the color feature information.
[0097] Embodiment 2
[0098] See also Figure 2 , Figure 2 Schematic diagram of a device for identifying work clothes at a power operation site based on deep learning disclosed in an embodiment of the present invention. Figure 2 As shown, the power operation site work clothes recognition device based on deep learning may include:
[0099] The collection unit 210 is used to collect a large number of pictures containing information of power workers wearing work clothes and not wearing work clothes, and manually annotate all the collected pictures to construct a first training data set;
[0100] A training unit 220 is used to train an initial deep neural network model for detecting work clothes and non-work clothes using the first training data set to obtain a deep neural network model;
[0101] A cropping unit 230 is used to crop all the work clothes images in the first training data set according to the manually annotated content to obtain cropped work clothes images and construct a second training data set;
[0102] The fitting unit 240 is used to extract the color information of all the work clothes images in the second training data set, and construct a characteristic color matrix through the extracted image color information. The work clothes actually worn during work are blue or gray, and the collected image color points are also concentrated in the blue-gray area of the color gamut, and the distribution is ellipsoidal. The position ζ of the entire ellipsoidal area is determined by fitting;
[0103] The recognition unit 250 is used to determine the position information of the target in the image to be recognized and the probability information p of the target being work clothes and non-work clothes using the deep neural network model. h1 、p p1 , cropping the image to be identified according to the position information, counting the color information of the cropped image to be identified, and using a clustering algorithm to calculate k cluster center points of the color information;
[0104] The judging unit 260 is used to judge whether the work clothes are worn at the power operation site. For the i-th cluster center point d i , if d i ∈ζ, then let p di =1; if Set the tolerance distance d tolerance , calculate the distance d from the point to the ellipsoid real , then the point
[0105] If p h1 +p d >p p1 , then it is judged that the clothes are work clothes, otherwise they are not wearing work clothes;
[0106] in, p di is the i-th cluster center point d i Probability information for work clothes.
[0107] Embodiment 3
[0108] See also Figure 3 , Figure 3 Schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. Figure 3 As shown, the electronic device may include:
[0109] A memory 310 storing executable program codes;
[0110] a processor 320 coupled to the memory 310;
[0111] The processor 320 calls the executable program code stored in the memory 310 to execute part or all of the steps in a method for identifying work clothes at an electric power operation site based on deep learning in the first embodiment.
[0112] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute part or all of the steps in a method for identifying work clothes at an electric power operation site based on deep learning in embodiment one.
[0113] An embodiment of the present invention further discloses a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps in a method for identifying work clothes at an electric power operation site based on deep learning in embodiment one.
[0114] An embodiment of the present invention also discloses an application publishing platform, wherein the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps in a method for identifying work clothes at an electric power operation site based on deep learning in embodiment one.
[0115] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0117] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the method described in each embodiment of the present invention.
[0119] In the embodiments provided by the present invention, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0120] A person of ordinary skill in the art can understand that some or all of the steps in the various methods of the embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0121] The above is a detailed introduction to a method and device for identifying work clothes on electric power sites based on deep learning disclosed in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for identifying work clothes at power operation sites based on deep learning. It is characterized in that include: Collect a large number of pictures containing information about power workers wearing work clothes and not wearing work clothes, and manually annotate all the collected pictures to build the first training data set; Using the first training data set to train a deep neural network initial model for detecting work clothes and non-work clothes, to obtain a deep neural network model; According to the manually annotated content, all the work clothes pictures in the first training data set are cropped to obtain cropped work clothes images, and a second training data set is constructed; Extract color information of all work clothes images in the second training data set, and construct a characteristic color matrix through the extracted image color information. The work clothes actually worn during work are blue or gray, and the collected image color points will also be concentrated in the blue-gray area of the color gamut, and the distribution is ellipsoidal. Determine the position ζ of the entire ellipsoidal area by fitting; The deep neural network model is used to determine the position information of the target in the image to be identified and the probability information p of the target being work clothes and non-work clothes. h1 、p p1 , cropping the image to be identified according to the position information, counting the color information of the cropped image to be identified, and using a clustering algorithm to calculate k cluster center points of the color information; For the i-th cluster center point d i , if d i ∈ζ, then let p di =1; if Set the tolerance distance d tolerance , calculate the distance d from the point to the ellipsoid real , then the point If p h1 +p d >p p1 , then it is judged that the clothes are work clothes, otherwise they are not wearing work clothes; in, p di is the i-th cluster center point d i Probability information for work clothes; The color information of all workwear images in the second training data set is extracted, and a characteristic color matrix is constructed by using the extracted image color information, including: The number of times the color of the pixel points in all the workwear images in the second training data set appears is counted, and a three-dimensional coordinate system is constructed. The three coordinate axes are R, G, and B respectively. The value of each point in the coordinate system represents the number of times the color of the pixel point appears in the data set. In order to improve the robustness of the color model and reduce the influence of messy colors, a color point number threshold C is preset. θ , remove the three-dimensional coordinate system with a value less than C θ point; The position ζ of the entire ellipsoidal area is determined by fitting, including: Assuming the standard equation for an ellipsoidal region is: Among them (O x ,O y ,O z ) is the center of the ellipsoid, R x ,R y ,R z are the lengths of the three semi-axes; Remove the internal area points in the three-dimensional coordinate system and keep only the boundary position points to obtain the point set P; Rewrite formula (1) as: Further sorting gives: y 2 A+z 2 B+xC+yD+zE+F=-x 2 (3) Right now: [y 2 z 2 x y z 1][A B C D E F] T =-x 2 (4) Rewrite formula (4) as KX=Y, where X=[ABCDEF] T , the least squares solution of X is: X=(K T K) -1 K T Y, X are the results of ellipsoid equation fitting. X is fitted through the point set, and the internal area determined by the ellipsoid equation is ζ.
2. The method for identifying work clothes at power operation sites based on deep learning according to claim 1, It is characterized in that Before constructing the second training data set, it also includes: The cropped workwear images are uniformly scaled to the same size.
3. The method for identifying work clothes at power operation sites based on deep learning according to claim 1, It is characterized in that Construct the first training data set, then also include: The brightness of the images in the first training data set is adjusted.
4. The method for identifying work clothes at power operation sites based on deep learning according to claim 3, It is characterized in that The adjusting the brightness of the images in the first training data set comprises: Convert all images in the first training data set from RGB color domain to HIS color domain, and set the image brightness threshold I θ , if the brightness of an image in the first training data set is I<I θ , then adjust the brightness of the image to make it equal to the image brightness threshold I θ , if the brightness of an image in the first training data set I≥I θ , it is not adjusted.
5. A device for identifying work clothes at power operation sites based on deep learning. It is characterized in that It includes: A collection unit is used to collect a large number of pictures containing information of power workers wearing work clothes and not wearing work clothes, and manually annotate all the collected pictures to construct a first training data set; A training unit, configured to train an initial deep neural network model for detecting work clothes and non-work clothes using the first training data set to obtain a deep neural network model; A cropping unit, used to crop all the work clothes images in the first training data set according to the manually annotated content, obtain cropped work clothes images, and construct a second training data set; A fitting unit is used to extract color information of all work clothes images in the second training data set, and construct a characteristic color matrix through the extracted image color information. The work clothes actually worn during work are blue or gray, and the collected image color points are also concentrated in the blue-gray area of the color gamut, and the distribution is ellipsoidal. The position ζ of the entire ellipsoidal area is determined by fitting; A recognition unit, used to determine the position information of the target in the image to be recognized and the probability information p of the target being work clothes or non-work clothes using the deep neural network model. h1 、p p1 , cropping the image to be identified according to the position information, counting the color information of the cropped image to be identified, and using a clustering algorithm to calculate k cluster center points of the color information; The judgment unit is used to judge whether the work clothes are worn at the power operation site. For the i-th cluster center point d i , if d i ∈ζ, then let p di =1; if Set the tolerance distance d tolerance , calculate the distance d from the point to the ellipsoid real , then the point If p h1 +p d >p p1 , then it is judged that the clothes are work clothes, otherwise they are not wearing work clothes; in, p di is the i-th cluster center point d i Probability information for work clothes; The fitting unit includes: The number of times the color of the pixel points in all the workwear images in the second training data set appears is counted, and a three-dimensional coordinate system is constructed. The three coordinate axes are R, G, and B respectively. The value of each point in the coordinate system represents the number of times the color of the pixel point appears in the data set. In order to improve the robustness of the color model and reduce the influence of messy colors, a color point number threshold C is preset. θ , remove the three-dimensional coordinate system with a value less than C θ point; Assuming the standard equation for an ellipsoidal region is: Among them (O x ,O y ,O z ) is the center of the ellipsoid, R x ,R y ,R z are the lengths of the three semi-axes; Remove the internal area points in the three-dimensional coordinate system and keep only the boundary position points to obtain the point set P; Rewrite formula (1) as: Further sorting gives: y 2 A+z 2 B+xC+yD+zE+F=-x 2 (3) Right now: [y 2 z 2 x y z 1][A B C D E F] T =-x 2 (4) Rewrite formula (4) as KX=Y, where X=[ABCDEF] T , the least squares solution of X is: X = (K T K) -1 K T Y, X are the results of ellipsoid equation fitting. X is fitted through the point set, and the internal area determined by the ellipsoid equation is ζ.
6. An electronic device, It is characterized in that include: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for identifying work clothes at power operation sites based on deep learning as described in any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute a method for identifying work clothes at an electric power operation site based on deep learning as described in any one of claims 1 to 4.
