Method, system, electronic device and storage medium for automated identification of luminaire failure
By recording the lighting process of the three primary colors of the lamps with a camera and combining it with a convolutional neural network optimization learning algorithm, the problem of low efficiency in lamp fault inspection has been solved, and efficient and accurate automated identification and reporting of lamp faults has been achieved.
Patent Information
- Application Number
- CN202211149088.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-09-21
AI Technical Summary
Existing technologies have low efficiency in inspecting lighting fixtures for faults. Maintenance units need to spend a lot of manpower and resources on inspections and it is difficult to accurately determine the location of the fault. Outdoor light interference seriously affects fault diagnosis.
Using a combination of hardware and software, the system records the lighting process by illuminating the lights with the three primary colors of red, green, and blue through a camera. The grayscale values are analyzed by taking screenshots, and a convolutional neural network is used to optimize the learning algorithm. This allows for accurate location of the lights and identification of faults. During the optimization learning process, the data acquisition points and the algorithm are adjusted to improve accuracy.
It improves the efficiency and accuracy of lamp fault diagnosis, reduces the impact of outdoor light interference, reduces the error rate of judgment, and realizes automated fault reporting.
Smart Images

Figure CN115457444B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image recognition and processing, in particular to a method and system for automatic identification of lamp failures, an electronic device and a storage medium. BACKGROUND
[0002] With the rapid development of domestic economy and science and technology, night scene lighting projects have developed rapidly in major cities, playing a great role in promoting the development of China's night economy. Lighting projects have developed rapidly, but the corresponding maintenance is relatively lagging behind. When we appreciate the lighting effect, we often find that some lamps have faults, but the maintenance unit has not found it. The reason is that the maintenance unit needs to spend a lot of manpower and material resources to patrol the lamps and lanterns to see if they have faults, and also needs to record the specific fault points. This point confirmation and recording is a very tedious thing.
[0003] With the rapid development of artificial intelligence, the use of surveillance cameras to inspect lamps and lanterns is basically based on the comparison of the gray values of faulty lamps and normal lamps to determine the fault points. The core point of this process is to determine the specific location of the lamps and lanterns and analyze the fault points. Since outdoor light (such as indoor light, street lamps, vehicle light, natural environment light, etc.) has a great interference on the positioning and fault judgment of lamps and lanterns, and the shape of buildings is irregular, it is basically impossible to directly analyze and calculate the position of lamps and lanterns from the pictures taken.
[0004] In order to maximize noise reduction, we need to not only start from the algorithm point of view, but also from the perspective of controllable on-site lamps and lanterns. Through the combination of software and hardware, the noise is reduced to the minimum, and the specific position of the lamps and lanterns is accurately determined. Therefore, it is urgent to develop a way to improve the judgment of lamp failure points by combining software and hardware. SUMMARY
[0005] The technical problem to be solved by the present application is the automatic monitoring and reporting of lamp failures in night scene lighting projects. A night scene lighting lamp failure AI processing method is proposed to enable users to real-time control the fault conditions of building facade lamps and lanterns.
[0006] To solve the above technical problems, according to one aspect of the present application, a method for automatic identification of lamp failure is provided, comprising the following steps: S1, video monitoring, using a camera to aim at a lamp to be evaluated for failure, lighting the lamp with red, green and blue three primary colors respectively, and keeping a specific lighting time, and recording the lighting process through video monitoring; S2, taking pictures, receiving the video monitoring and recording, saving the picture screenshots in the video segment, and marking the red, green and blue gray values of the corresponding picture positions according to the red, green and blue gray values in the pictures; S3, analyzing the specific lamp positions obtained, determining the common area in the pictures of the three lighting of red, green and blue as the base point for determining the specific position of the lamp; S4, identifying the lamp failure through pictures, periodically identifying the failure of the lamp, such as once a quarter, and staggering with the lighting time of major holidays, and performing multiple tests (early morning, evening, late night, etc.); taking the lamp position map obtained in step S3 and the saved monitoring map as layer 1 and layer 2 respectively, taking layer 1 as the main reference position to take the gray value in layer 2 at multiple points, and then calculating the average value of the gray value obtained in each area, and comparing the average value with the actual gray value, if the difference is within a certain range, the lamp is evaluated as normal; if the difference exceeds a certain range, the point lamp is determined to be faulty.
[0007] According to an embodiment of the present application, the method for automatic identification of lamp failure can further comprise the step of: S5, optimization learning, wherein after step S4, personnel check the lamp failure map obtained by the processor on the monitoring camera to confirm whether the lamp failure judgment is correct; if the results of the judgment are all true, it is considered that the algorithm is correct, if it is found that some point positions are incorrectly judged, the processor needs to be optimized and learned again, wherein if some point positions are incorrectly judged, the picture recognition of the lamp failure fails, at this time, step S5 is entered: optimization learning, and then the cycle enters steps S1, S2, S3 and S4, until the lamp failure is successfully identified through pictures. Wherein, the optimization learning process is to change different collection points according to different algorithms, to reacquire the gray value until the judgment is correct, to use multiple algorithms to take points multiple times to collect the gray value before reporting the lamp failure point position judged in the next time, and to judge again whether it is a failure, if the multiple judgment results are all failures, it is considered that this is a failure, and the failure point position is reported.
[0008] According to the embodiment of the present application, the algorithm of the optimized learning can adopt a convolutional neural network (CNN), select a LeNet-5 model, collect data on site and label, and then train, and the optimized learning includes the following steps: S51, collecting a picture data set on site, and dividing the data set, wherein 80% is a training set and 20% is a test set; S52, convolution calculation, performing a dropout of part of neurons of each layer of the convolutional neural network through Droupout, performing forward propagation and reverse propagation using Droupout regularization, training and learning the training set and test machine data output by S51, and learning a feature map from the convolution layer through convolution calculation; the convolutional neural network: the purpose of convolution operation is to extract different features of the input, some convolution layers can only extract some low-level features such as edges, lines and the like, and more layers of the network can iteratively extract more complex features from the low-level features, and it can be found that the picture is smaller after convolution, assuming that N is the picture size and F is the convolution kernel size, which is equivalent to N-F+1=5-3+1=3; S53, activation calculation, performing activation calculation using an activation layer to activate the feature map learned by the convolution layer; S54, pooling calculation, performing pooling calculation using a pooling layer to sample the feature map learned by the convolution layer, and the sampling processing of the pooling layer includes: maximum pooling and average pooling, wherein the maximum pooling takes the maximum value in the window as the output, the average pooling takes the average value of all values in the window as the output, so as to reduce the input dimension of the subsequent network layer, reduce the model size, thereby improving the calculation speed, improving the robustness of the feature (Feature Map), and preventing overfitting; S55, determining the algorithm, taking the fully connected layer including the convolution layer, the activation layer and the pooling layer as the feature learning layer and the feature extraction layer of the convolutional neural network, and finally applying the feature (Feature Map) learned by the picture data to a model task including classification and regression, the model task first flattens (reshape into a 1xN vector) the feature (Feature Map), and then connects one or more fully connected layers to learn the model. In the convolutional neural network, the size of the region mapped on the original image by the pixel points on the feature map (feature map) output by each layer of the convolutional neural network forms a receptive field, wherein the receptive field calculation formula is:
[0009] r=r+(k-1)*s
[0010] wherein r is the size of the receptive field of the current layer, r is the size of the receptive field of the upper layer, s is the product of the convolution or step size before the i-1th layer, and k is the convolution kernel size.
[0011] According to an embodiment of the present application, in step S52, in the neural network, the forward propagation can be a process that information flows directly from a previous neuron to a next neuron until the output, and the output can be calculated according to the input of each neuron and according to a corresponding rule, and finally the loss function under the current parameters is obtained.
[0012] The output of the hidden layer is as follows:
[0013] a11=x1·W1,1(1)+x2·W2,1(1)
[0014] a12=x1·W1,2(1)+x2·W2,2(1)
[0015] a13=x1·W1,3(1)+x2·W2,3(1)
[0016] The output of the final output layer is as follows:
[0017] y^=a11·W1,1(2)+a12·W1,2(2)+a13·W1,3(2)
[0018] The final loss function is calculated as follows (taking the mean square error loss function as an example):
[0019]
[0020] Gradient descent algorithm:
[0021] The update formula of the parameters w and b is:
[0022]
[0023] According to an embodiment of the present application, in step S52, in the neural network,
[0024] Back propagation is based on the algorithm of forward propagation, and the gradient of the loss function with respect to each parameter is calculated from the output layer to the input layer of the neural network in sequence, and the relevant parameters are updated under a given learning rate.
[0025] The specific formula is:
[0026] According to an embodiment of the present application, the method for automatically identifying lamp faults can further include the steps of:
[0027] S6, the application end feeds back the lamp fault condition, identifies the position of the fault lamp, and sends it to the web end to present to the user.
[0028] According to an embodiment of the present application, the specific light-on time can be 1-10 seconds, preferably 3-7 seconds, and more preferably 5 seconds.
[0029] According to a second aspect of the present application, a system for automatic identification of lamp failure is provided, comprising: a video monitoring module, the video monitoring module comprising a camera, the camera being aimed at a lamp to be evaluated for failure, the lamp being lit in red, green and blue three primary colors respectively and being kept for a specific lighting time, the video monitoring module recording the lighting process through video monitoring; a screenshot module, the video monitoring module receiving the video monitoring and recording, the screenshot module being used to save the picture screenshots in the video segment, the red, green and blue gray scale values of the corresponding picture positions being marked out respectively according to the gray scale values of red, green and blue in the picture; a positioning module, being used to analyze the specific lamp positions obtained, determining the common area in the pictures of the three times of lighting in red, green and blue as the base point for determining the specific position of the lamp; a picture identification lamp failure module, the lamp failure being identified periodically and multiple tests being performed, the lamp position map obtained by the positioning module and the saved monitoring map being set as layer 1 and layer 2 respectively, multiple point gray scale values being taken in layer 2 with layer 1 as the main reference position, the average value of the gray scale values taken in each area being calculated, the average value being compared with the actual gray scale value, if the difference is within a certain range, the lamp is evaluated as normal, if the difference exceeds a certain range, the picture identification lamp failure module determines that the lamp at this point is faulty; an optimization learning module, personnel checking the lamp failure map obtained by the processor on the monitoring camera to confirm whether the lamp failure determination is correct; if the results determined by the picture identification lamp failure module are all true, it is considered that the algorithm is correct, if it is found that the picture identification lamp failure module has incorrect point determination, the optimization learning module needs to learn again to determine, wherein the optimization algorithm of the optimization learning module is a convolutional neural network, the LeNet-5 model is selected, data is collected and labeled on site and then trained, wherein the optimization learning process is that different collection points are transformed according to different algorithms, the gray scale values are reacquired until the determination is correct, multiple algorithms are used for machine learning, before the lamp failure points determined in the next time are reported, multiple point taking is performed using multiple algorithms, the gray scale values are collected, and the determination is analyzed again to see whether it is a failure, if the multiple determination results are all failures, it is considered that there is a failure at this place and the failure point is reported; wherein the optimization learning process comprises convolution calculation, activation calculation, pooling calculation and determination algorithm; an application end feedback module, being used to identify the lamp failure condition and the position of the faulty lamp and sending them to the web end to present them to the user.
[0030] According to a third aspect of the present application, an electronic device is provided, comprising: a memory, a processor and a lamp failure automatic identification program stored on the memory and executable on the processor, the lamp failure automatic identification program realizing the steps of the lamp failure automatic identification method when executed by the processor.
[0031] According to a fourth aspect of the present application, a computer storage medium is provided, wherein a lamp fault automatic identification program is stored on the computer storage medium, and the lamp fault automatic identification program, when executed by a processor, implements the steps of the lamp fault automatic identification method described above.
[0032] According to a further aspect of the present application, a method for installing and implementing a lamp fault automatic identification system is provided, comprising the following steps: S01, installing a building lamp, installing the lamp on the building; S02, installing a master controller, a sub-controller and a distribution box, sequentially connecting the distribution box, the master controller, the sub-controller and the building lamp; S03, performing lamp debugging; S04, monitoring installation, installing a camera for monitoring, the camera being arranged to face the building, and all building lamps being visible in a camera picture for monitoring; S05, determining the specific positions of the lamps; S06, regularly checking lamp faults, analyzing and identifying lamp faults through videos / pictures captured by the camera; S07, if an individual point is found to be incorrectly judged in step S06, then entering an optimized learning, confirming the faulty lamps by using an optimized learning algorithm, and feeding back the positions of the faulty lamps to a user.
[0033] According to an embodiment of the present application, the lamp can be an LED lamp supporting a DMX512 protocol.
[0034] According to an embodiment of the present application, step S03 can comprise the following steps: S031, supplying power to the lamp, the master controller and the sub-controller through the distribution box; S032, drawing a lamp distribution diagram according to the relationship between the lamps carried by the ports of the sub-controller and the actual building lamps; and S033, debugging the light-on state of all lamps and excluding faults.
[0035] According to an embodiment of the present application, the camera can be a Hikvision camera, model iDS-2DF8C435MHS-AFW / SP(T5).
[0036] According to an embodiment of the present application, in step S05, the lamps can be respectively lit in red, green and blue three primary colors, and a specific light-on time is maintained, the camera records the light-on process through video monitoring; a picture screenshot in the video segment is saved, the gray scale values of red, green and blue corresponding to the picture position are marked out respectively according to the gray scale values of red, green and blue in the picture; and the specific lamp positions are obtained through analysis.
[0037] According to an embodiment of the present application, after step S05, the camera can be rotated for analyzing the specific positions of other building lamps, and the camera keeps the position at a watch point.
[0038] According to the embodiment of the present application, in step S06, all building lamps can be turned on, and a single color including red, green and blue can be brightened. A monitoring video is recorded by the camera, and a screenshot is saved. The lamp position map obtained in step S05 and the saved to-be-monitored map are respectively set as layer 1 and layer 2. The layer 1 is taken as a main reference position to obtain a plurality of gray scale values in the layer 2. An average value of the obtained gray scale values of each region is calculated. If the average value is within a certain range of an actual gray scale value, the lamp is considered to be normal, otherwise, the lamp is considered to be faulty. If the lamp is determined to be faulty in multiple tests, the faulty lamp position is identified and sent to the web end to be presented to the user.
[0039] Further, the periodic inspection of the lamp fault can include one quarter, and the test time includes early morning, evening and late night. Preferably, the test time is staggered with the light-on time of major holidays.
[0040] According to the embodiment of the present application, in step S07, the lamp fault map obtained by the processor can be checked on the monitoring camera to confirm whether the lamp fault judgment is correct. If the judgment result is all true, the algorithm is considered to be correct. If it is found that individual point positions are incorrectly judged, the processor needs to be optimized and learned. Different collection points are changed according to different algorithms, and the gray scale values are re-acquired until the judgment is correct. The machine learning algorithm for optimization and learning can include convolution calculation, activation calculation and pooling calculation.
[0041] Further, the machine learning algorithm for optimization and learning can include convolution calculation, activation calculation and pooling calculation.
[0042] Compared with the prior art, the technical solution provided by the embodiment of the present application can at least achieve the following beneficial effects:
[0043] The present application provides a night scene lamp fault AI processing method. The lamp position is automatically analyzed accurately by using software and hardware combination, optimization and learning and the like. Compared with the traditional inspection method, the efficiency is greatly improved. Compared with the pure software analysis method, the development cycle of the present method is short, the anti-outdoor light (such as indoor light, street light, vehicle light, natural environment light and the like) interference is more excellent, and the error rate of the lamp fault position judgment is much lower. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments will be briefly described below. Obviously, the drawings described below only relate to some embodiments of the present invention and are not intended to limit the present invention.
[0045] Figure 1 This is a flowchart illustrating the automated identification of lighting fixture faults according to an embodiment of the present invention;
[0046] Figure 2 yes Figure 1 The flowchart for optimization learning. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the described embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” and similar terms used in the specification and claims of this patent application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a limitation of quantity, but rather indicate the presence of at least one.
[0049] like Figure 1 and Figure 2 As shown, the method for automated identification of lighting fixture faults includes the following steps:
[0050] S1. Video monitoring: A camera is used to point at the light fixture to be evaluated for malfunction. The light fixture is lit up with the three primary colors of red, green and blue respectively, and kept lit for a specific time. The lighting process is recorded by video monitoring.
[0051] S2. Take screenshot: Receive the video surveillance footage and record it. Save the screenshot from the video clip. Mark the corresponding red, green, and blue grayscale values at the image locations based on the red, green, and blue grayscale values in the image.
[0052] S3. Analyze the specific locations of the lamps and determine the common area in the images of the red, green, and blue lights, using it as the base point for determining the specific locations of the lamps.
[0053] S4, the picture recognition lamp failure, the lamp failure is periodically identified, such as once a quarter, and the major holiday opening time is staggered, and multiple tests (early morning, evening, late night, etc.) are performed; the obtained lamp position map in step S3 and the saved to-be-monitored map are respectively set as layer 1 and layer 2, the multi-point gray value is taken in layer 2 with layer 1 as the main reference position, the average value of the obtained gray value of each region is calculated, and the average value is compared with the actual gray value; if the difference is within a certain range, the lamp is evaluated as normal; if the difference exceeds a certain range, the point lamp is determined to be faulty.
[0054] The present application provides a night scene light lamp failure AI processing method. The lamp position is automatically analyzed accurately by using software and hardware combination, optimization learning and the like. Compared with the traditional inspection method, the efficiency is greatly improved; compared with the pure software analysis method, the development cycle is short, the outdoor light (such as indoor light, street lamp, vehicle light, natural environment light and the like) interference is more excellent, and the error rate of judging the lamp failure position is much lower.
[0055] According to one or some embodiments of the present application, the method for automatically identifying lamp failure further comprises the step of: S5, optimization learning, wherein after step S4, personnel check the lamp failure map obtained by the processor on the monitoring camera to confirm whether the lamp failure judgment is correct; if the results of the judgment are all true, it is considered that the algorithm is correct, if it is found that there are point positions that are not correctly judged, the processor needs to be optimized and learned again, wherein if there are point positions that are not correctly judged, the picture recognition lamp failure fails, at this time, step S5 is entered: optimization learning, and the cycle enters steps S1, S2, S3 and S4 until the lamp failure is successfully identified by the picture. The optimization learning process is to change different collection points according to different algorithms, reacquire the gray value until the judgment is correct, machine learning multiple algorithms, and multiple points are taken using multiple algorithms before the lamp failure point position judged in the next time is reported, the gray value is collected, and whether it is a failure is judged and analyzed again, if the multiple judgment results are all failures, it is considered that this is a failure, and the failure point position is reported.
[0056] According to one or some embodiments of the present application, the algorithm of the optimized learning adopts a convolutional neural network (CNN), selects a LeNet-5 model, collects data on site and labels the data for training, and the optimized learning includes the following steps: S51, collecting a picture data set on site, and dividing the data set, wherein 80% is a training set and 20% is a test set; S52, convolution calculation, performing a dropout operation of discarding part of neurons of each layer of the convolutional neural network by using Droupout, performing forward propagation and reverse propagation by using Droupout regularization, training and learning the training set and test machine data output by S51, and learning a feature map from the convolution layer by convolution calculation; the convolutional neural network: the purpose of convolution operation is to extract different features of the input, and some convolution layers can only extract some low-level features such as edges, lines and the like, and more layers of the network can iteratively extract more complex features from the low-level features, and it can be found that the picture after convolution is smaller, assuming that N is the picture size and F is the convolution kernel size, which is equivalent to N-F+1=5-3+1=3; S53, activation calculation, performing activation calculation by using an activation layer to activate the feature map learned by the convolution layer; S54, pooling calculation, performing pooling calculation by using a pooling layer to sample (subsampling) the feature map learned by the convolution layer, and the sampling processing of the pooling layer includes: maximum pooling (Max Pooling) taking the maximum value in the window as the output, and average pooling (Avg Pooling) taking the average value of all values in the window as the output, so as to reduce the input dimension of the subsequent network layer, reduce the model size, thereby improving the calculation speed, improving the robustness of the feature (Feature Map), and preventing overfitting; S55, determining the algorithm, taking the fully connected layer including the convolution layer, the activation layer and the pooling layer as the feature learning layer and the feature extraction layer of the convolutional neural network, and finally applying the feature (Feature Map) learned by the picture data to a model task including classification and regression, the model task first flattens (reshape into a 1xN vector) the feature (Feature Map), and then connects one or more fully connected layers to perform model learning. In the convolutional neural network, the size of the region mapped on the original image by the pixel points on the feature map (feature map) output by each layer of the convolutional neural network forms a receptive field, wherein the receptive field calculation formula is:
[0057] r=r+(k-1)*s
[0058] wherein r is the size of the receptive field of the current layer, r is the size of the receptive field of the upper layer, s is the product of the convolution or step size before the i-1 layer, and k is the size of the convolution kernel.
[0059] According to one or some embodiments of the present application, in step S52, in the neural network, the forward propagation is a process that information flows directly from the previous neuron to the next neuron until the output, and the output can be calculated according to the input of each neuron and according to the corresponding rules, and finally the loss function under the current parameters is obtained.
[0060] The output of the hidden layer is as follows:
[0061] a11=x1·W1,1(1)+x2·W2,1(1)
[0062] a12=x1·W1,2(1)+x2·W2,2(1)
[0063] a13=x1·W1,3(1)+x2·W2,3(1)
[0064] The output of the final output layer is as follows:
[0065] y^=a11·W1,1(2)+a12·W1,2(2)+a13·W1,3(2)
[0066] The final loss function is calculated as follows (taking the mean square error loss function as an example):
[0067]
[0068] Gradient descent algorithm:
[0069] The update formula of the parameters w and b is:
[0070]
[0071] According to an embodiment of the present application, in step S52, in the neural network,
[0072] Back propagation is based on the algorithm of forward propagation, and the gradient of the loss function with respect to each parameter is calculated from the output layer to the input layer of the neural network, and the relevant parameters are updated under a given learning rate.
[0073] The specific formula is:
[0074] According to one or some embodiments of the present application, the method for automatically identifying lamp faults further comprises the steps of:
[0075] S6, the application end feeds back the lamp fault condition, identifies the position of the fault lamp, and sends it to the web end to present to the user.
[0076] According to one or some embodiments of the present application, the specific light-on time is 1-10 seconds, preferably 3-7 seconds, and more preferably 5 seconds.
[0077] In use, the lamp failure automatic system identifies lamp failure by image recognition, optimizes learning and re-judgment when lamp failure identification fails, and the application layer feeds back the lamp failure situation, thereby analyzing the specific lamp position.
[0078] When the building lamps are installed, the lamp position analysis is performed at night; the monitoring probe is installed and aligned with the building facade; the building lamps are all lit in a single color, such as red, for 5 seconds; the monitoring video is recorded and the screenshot is saved to the processor, and the processor marks all red gray scale values according to the red gray scale value; the building lamps are all lit in another single color, such as green, for 5 seconds; the monitoring video is recorded and the screenshot is saved to the processor, and the processor marks all red gray scale values according to the green gray scale value; the building lamps are all lit in a third single color, such as blue, for 5 seconds; the monitoring video is recorded and the screenshot is saved to the processor, and the processor marks all blue gray scale values according to the blue gray scale value; the processor determines the common area in the pictures of the three times of lighting as the specific position of the lamp; the camera is rotated to analyze the specific positions of other building lamps, and the camera saves the positions as watch points.
[0079] The lamps are periodically identified for failure, such as once a quarter, and the lighting time for major holidays is staggered, and multiple tests (early morning, evening, late night, etc.) are performed; the building lamps are all turned on and lit in a single color, such as red; the monitoring video is recorded and the screenshot is saved to the processor; the processor sets the obtained lamp position map and the saved to-be-monitored map as layer 1 and layer 2 respectively; the layer 1 is taken as the main reference position to take multiple gray scale values in layer 2; the average value of the gray scale values obtained in each area is calculated; if the average value is within a certain range of the actual gray scale value, the lamp is considered normal, otherwise it is considered to be faulty; if the lamp is determined to be faulty in multiple tests, it is determined that the lamp at the point is faulty, the lamp failure is identified by image recognition; the position of the faulty lamp is marked and sent to the web end to be presented to the user.
[0080] Optimization learning is performed again for failure of identifying lamp failure. Personnel check the lamp failure diagram obtained by the processor on the monitoring camera to confirm whether the lamp failure judgment is correct. If the results of the judgment are all true, it is considered that the algorithm is correct. If it is found that individual points are not correct, the processor needs to be optimized and learned. Different collection points are changed according to different algorithms, and the gray value is reacquired until the judgment is correct. Machine learning is performed on multiple algorithms. Before the lamp failure point obtained in the next judgment is reported, multiple algorithms are used to take points multiple times, collect gray values, and judge and analyze again whether it is a failure. If the multiple judgment results are all failures, it is considered that there is a failure at this point, and the failure point is reported. Personnel check the lamp failure diagram obtained by the processor on the monitoring camera to confirm whether the lamp failure judgment is correct. If the results of the judgment are all true, it is considered that the algorithm is correct. If it is found that individual points are not correct, the processor needs to be optimized and learned again. The cycle is repeated to make the algorithm more and more accurate.
[0081] According to a second aspect of the present application, a system for automatic identification of lamp failure is provided, which comprises a video monitoring module, a screenshot module, a positioning module, a picture identification lamp failure module and an optimization learning module.
[0082] The video monitoring module comprises a camera, which is aimed at a lamp to be evaluated for failure. The lamp is lit in red, green and blue three primary colors respectively, and a specific lighting time is maintained. The video monitoring module records the lighting process through video monitoring.
[0083] The video monitoring module receives the video monitoring and video recording. The screenshot module is used to save the picture screenshots in the video segment. The red, green and blue gray values of the corresponding picture positions are marked out respectively according to the gray values of red, green and blue in the picture.
[0084] The positioning module is used to analyze the specific lamp positions obtained, to determine the common area in the pictures of the three times of lighting in red, green and blue as the base point for determining the specific position of the lamp.
[0085] The picture identification lamp failure module periodically identifies the failure of the lamp and performs multiple tests. The lamp position diagram obtained by the positioning module and the saved monitoring diagram are respectively set as layer 1 and layer 2. The gray values are taken at multiple points in layer 2 with layer 1 as the main reference position. The average value of the gray values taken in each area is calculated. If the average value and the actual gray value are compared and the difference is within a certain range, it is evaluated that the lamp is normal. If the average value and the actual gray value are compared and the difference exceeds a certain range, the picture identification lamp failure module determines that the lamp at the point is faulty.
[0086] The personnel check the lamp failure diagram obtained according to the judgment of the processor on the monitoring camera, and confirm whether the lamp failure judgment is correct; if the results of the picture recognition lamp failure module are all true, it is considered that the algorithm is correct, if it is found that the picture recognition lamp failure module has incorrect point judgment, the optimization learning module needs to learn again to judge, wherein the optimization algorithm of the optimization learning module is a convolutional neural network, and a LeNet-5 model is selected, and data is collected and labeled on site and then trained. The optimization learning process is that different collection points are transformed according to different algorithms, and the gray value is reacquired until the judgment is correct, the machine learning multiple algorithms, before the lamp failure point position judged in the next time is reported, multiple algorithms are used to take points multiple times, the gray value is collected, and whether it is a failure is judged again, and if the multiple judgment results are all failures, it is considered that the failure is at this position, and the failure point position is reported. The optimization learning process includes convolution calculation, activation calculation, pooling calculation and determination algorithm; the application end feedback module is used for identifying the lamp failure condition and the failure lamp position, and sending the failure lamp position to the web end and presenting the failure lamp position to the user.
[0087] According to another aspect of the present application, there is provided a device for automatic identification of lamp failure, comprising a memory, a processor and a lamp failure automatic identification program stored in the memory and executable on the processor, the lamp failure automatic identification program realizing the steps of the lamp failure automatic identification method when executed by the processor.
[0088] According to the present application, there is also provided a computer storage medium.
[0089] The computer storage medium stores the lamp failure automatic identification program, and the lamp failure automatic identification program realizes the steps of the lamp failure automatic identification method when executed by the processor.
[0090] The method realized when the lamp failure automatic identification program executable on the processor is executed can refer to the lamp failure automatic identification method of each embodiment of the present application, and will not be described here again.
[0091] The present application also provides a computer program product.
[0092] The computer program product of the present application comprises a lamp failure automatic identification program, and the lamp failure automatic identification program realizes the steps of the lamp failure automatic identification method when executed by the processor.
[0093] The method realized when the lamp failure automatic identification program executable on the processor is executed can refer to the lamp failure automatic identification method of each embodiment of the present application, and will not be described here again.
[0094] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned example method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) as described above, and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in each embodiment of the present application.
[0095] According to another aspect of the present application, a method for installing and implementing a lamp failure automatic identification system is provided.
[0096] 1. Building lamp installation, select DMX512 protocol LED lamp.
[0097] 2. Install the master controller, sub-controller, distribution box, and connect with the building lamp.
[0098] 3. Lamp debugging:
[0099] 3.1 Power supply for lamps, master controller, sub-controller through distribution box;
[0100] 3.2 According to the relationship between the lamps carried by the port of the sub-controller and the actual building lamps, draw a lamp layout;
[0101] 3.3 Debug all lamps to light state, and exclude faults.
[0102] 4. Monitoring installation, the present application selects Hikvision monitoring camera, the camera model is preferably iDS-2DF8C435MHS-AFW / SP(T5), and the specific does not receive this limit. Make the camera face the building, and all lamps in the building can be seen in the monitoring camera picture.
[0103] 5. Make all building lamps single color light, such as red, light for 5 seconds;
[0104] 6. Monitor the video and save the screenshot to the processor, and the processor marks all red gray scale values according to the red gray scale value (including a certain deviation range);
[0105] 7. Make all building lamps light another single color, such as green, light for 5 seconds;
[0106] 8. Monitor the video and save the screenshot to the processor, and the processor marks all red gray scale values according to the red gray scale value (including a certain deviation range);
[0107] 9. Let all the building lamps all light up the third single color, such as blue, light up for 5 seconds;
[0108] 10. Monitor the video and save the screenshot to the processor, and the processor marks all the blue gray values according to the blue (including a certain deviation range) gray value;
[0109] 11. The processor determines the common area in the picture of three lightings and defines it as the specific position of the lamp.
[0110] 12. The camera rotates to analyze the specific position of other building lamps, and the camera saves the position as a watch point.
[0111] 13. The lamp regularly identifies faults, such as once a quarter, and the major holiday lighting time is staggered, and multiple tests are performed (early morning, evening, late night, etc.);
[0112] Let all the building lamps light up, and light up a single color, such as red;
[0113] Monitor the video and save the screenshot to the processor;
[0114] The processor sets the lamp position map obtained in 2 and the saved monitoring map as layer 1 and layer 2 respectively;
[0115] Take the gray value in layer 2 as the main reference position in layer 1;
[0116] Calculate the average value of the gray value obtained in each area;
[0117] The average value and the actual gray value are within a certain range, and the lamp is considered normal, otherwise it is considered faulty;
[0118] Only if it is determined as faulty in multiple tests, can the point lamp be determined as faulty;
[0119] Identify the position of the faulty lamp and send it to the web end to present to the user.
[0120] 14. The personnel check the lamp fault map obtained by the processor on the monitoring camera to confirm whether the lamp fault judgment is correct;
[0121] If the judgment result is all true, it is considered that the algorithm is correct, and if it is found that individual point judgment is incorrect, the processor needs to be optimized and learned;
[0122] According to different algorithms, different collection points are transformed, and the gray value is reacquired until the judgment is correct;
[0123] The machine learning algorithm is used for multiple times to take points, collect gray values and judge whether it is a fault before reporting the next determined lamp fault point;
[0124] If the multiple judgment results are all faults, it is considered that this is a fault, and the fault point is reported;
[0125] The personnel check the lamp fault map obtained by the processor on the monitoring camera to confirm whether the lamp fault judgment is correct;
[0126] If the judgment result is all true, it is considered that the algorithm is correct, and if it is found that individual points are not correct, the processor needs to be optimized and learned again;
[0127] The cycle is repeated to make the algorithm more and more accurate.
[0128] The above only describes exemplary embodiments of the present application, and is not used to limit the protection scope of the present application, and the protection scope of the present application is determined by the appended claims.
Claims
1. A method for automatic identification of lamp failure, comprising the following steps: S1, video monitoring, using a camera to aim at a lamp to be evaluated for failure, lighting the lamp with red, green and blue three primary colors respectively, and keeping a specific lighting time, and recording the lighting process through video monitoring; S2, taking a screenshot, receiving the video monitoring and recording, saving the screenshot in the video clip, and marking the red, green and blue gray values of the corresponding picture positions according to the gray values of red, green and blue in the picture; S3, analyzing the specific lamp position obtained, determining the common area in the pictures of red, green and blue three lightings as the base point for determining the specific position of the lamp; S4, identifying the lamp failure through the picture, periodically identifying the failure of the lamp, and performing multiple tests, setting the lamp position map obtained in step S3 and the saved monitoring map as layer 1 and layer 2 respectively, taking multiple gray values in layer 2 with layer 1 as the main reference position, and then calculating the average value of the gray values obtained in each area, if the average value and the actual gray value are within a certain range, the lamp is evaluated as normal; if the average value and the actual gray value are beyond a certain range, the point lamp is determined to be faulty. 2.The method of claim 1, further comprising the step of: S5, optimization learning, wherein After step S4, personnel check the lamp failure map obtained by the processor on the monitoring camera to confirm whether the lamp failure judgment is correct; if the results of the judgment are all true, it is considered that the algorithm is correct, if it is found that some point positions are not correctly judged, the processor needs to be optimized and learned again, wherein, if the judgment has some point positions that are not correctly judged, the picture recognition of the lamp failure fails, at this time, step S5 is entered: optimization learning, and then the steps S1, S2, S3 and S4 are entered again until the lamp failure is successfully identified through the picture; wherein, the optimization learning process is to change different collection points according to different algorithms, and to reacquire the gray values until the judgment is correct, machine learning multiple algorithms, before reporting the lamp failure point position judged in the next time, multiple algorithms are used to take points multiple times, collect gray values, and judge and analyze again whether it is a failure, if the multiple judgment results are all failures, it is considered that there is a failure at this position, and the failure point position is reported.
3. The method of claim 2, wherein, The optimization learning algorithm uses a convolutional neural network (CNN, Convolutional Neural Network), selects a LeNet-5 model, collects data on site and labels, and then trains, and the optimization learning includes the following steps: S51, collecting picture data sets on site, dividing the data sets, wherein 80% is a training set and 20% is a test set; S52, convolution calculation, performing a dropout operation on each layer of the convolutional neural network by randomly discarding part of the neurons, using Droupout regularization to perform forward propagation and back propagation, training and learning the training set and test machine data output by S51, and learning a feature map from the convolution layer through convolution calculation; S53, activation calculation, the activation calculation adopts an activation layer to perform activation processing on a feature map learned by a convolution layer; S54, pooling calculation, the pooling calculation adopts a pooling layer to perform subsampling processing on the feature map learned by the convolution layer, the subsampling processing of the pooling layer includes maximum pooling and average pooling, wherein the maximum pooling takes a maximum value in a window as an output, and the average pooling takes a mean value of all values in a window as an output, so as to reduce an input dimension of a subsequent network layer, reduce a model size, improve a calculation speed, improve robustness of a feature, and prevent overfitting; S55, determination algorithm, a fully connected layer including a convolution layer, an activation layer and a pooling layer is determined as a feature learning layer and a feature extraction layer of a convolution neural network, and a feature learned by picture data is finally applied to a model task including classification and regression, the model task first flattens the feature, and then connects one or more fully connected layers to perform model learning.
4. The method of claim 3, wherein, In step S52, in the neural network, the forward propagation is a process in which information is directly transferred from a previous neuron to a next neuron until an output is obtained, and an output can be calculated according to an input of each neuron and according to a corresponding rule, and finally a loss function under a current parameter is obtained.
5. The method of claim 4, wherein, In step S52, in the neural network, The back propagation is a process in which a gradient of a loss function with respect to each parameter is calculated in sequence from an output layer to an input layer of the neural network on the basis of the algorithm of the forward propagation, and the related parameters are updated under a given learning rate.
6. The method of claim 2, further comprising the step of: S6, the application end feeds back the lamp fault condition, identifies the position of the fault lamp, and sends the web end to present to the user.
7. The method of claim 1, wherein the specific lighting time is 1-10 seconds.
8. A system for automatic identification of lamp faults, comprising: a video monitoring module, the video monitoring module comprising a camera, the camera aiming at a lamp to be evaluated for faults, the lamp being lit in red, green and blue three primary colors respectively and maintaining a specific lighting time, the video monitoring module recording the lighting process through video monitoring; a screenshot module, the video monitoring module receiving the video monitoring and recording, the screenshot module being used to save a picture screenshot in a video segment, and marking out red, green and blue gray scale values of a corresponding picture position according to red, green and blue gray scale values in the picture; a positioning module, used to analyze a specific lamp position obtained, and determine a common area in pictures of three times of lighting in red, green and blue as a base point for determining the specific position of the lamp. The picture recognition lamp failure module periodically identifies lamp failures, and performs multiple tests. The obtained lamp position map of the positioning module and the saved to-be-monitored map are respectively set as layer 1 and layer 2, and the gray scale values of multiple points in layer 2 are obtained with layer 1 as the main reference position. The average value of the obtained gray scale values of each region is calculated. If the average value and the actual gray scale value differ within a certain range, the lamp is evaluated as normal. If the average value and the actual gray scale value differ beyond a certain range, the picture recognition lamp failure module determines that the point lamp fails. The optimization learning module is used for personnel to check the lamp failure map obtained by the processor on the monitoring camera, and to confirm whether the lamp failure judgment is correct. If the results of the picture recognition lamp failure module are all true, the algorithm is considered correct. If the picture recognition lamp failure module is found to have incorrect point judgment, the optimization learning module needs to learn again to make judgments. The optimization algorithm of the optimization learning module is a convolutional neural network, and the LeNet-5 model is selected. After collecting data on site and labeling, training is performed. The optimization learning process is to transform different collection points according to different algorithms, reacquire gray scale values, and judge until correct. Machine learning multiple algorithms, and multiple points are taken using multiple algorithms before the next determined lamp failure point is reported. The gray scale values are collected, and it is judged again whether it is a failure. If the multiple judgment results are all failures, it is considered that there is a failure at this point, and the failure point is reported. The optimization learning process includes convolution calculation, activation calculation, pooling calculation, and algorithm determination. The application end feedback module is used for identifying the lamp failure condition and the failure lamp position, and sending them to the web end to present them to the user.
9. An electronic device comprising: The memory, the processor, and the lamp failure automatic identification program stored on the memory and executable on the processor are used to implement the steps of the lamp failure automatic identification method according to any one of claims 1 to 7.
10. A computer storage medium, wherein, The computer storage medium stores the lamp failure automatic identification program, and the lamp failure automatic identification program is executed by the processor to implement the steps of the lamp failure automatic identification method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Machine-vision-based fault diagnosis method and system for large landscape light group
CN110196152A
Traffic signal lamp identification method and system, computing device and intelligent vehicle
CN111507210A