State lamp detection method and device, electronic equipment and medium
By using image acquisition components and target recognition models in the status light detection system, fully automated detection of status lights is achieved, which solves the problems of low detection accuracy and high labor costs caused by manual visual inspection, and improves detection efficiency and accuracy. sex.
Patent Information
- Application Number
- CN202410703864.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-08-30
AI Technical Summary
In the existing technology, the detection of status lights relies on manual visual inspection, resulting in low accuracy of detection results and high labor costs.
By using the image acquisition component in the status light detection system to collect the image of the device to be detected, and inputting it into the target recognition model for identification, the status information of the status light is generated, thereby realizing fully automated detection.
No manual intervention is required, which improves the accuracy and efficiency of status light detection, reduces labor costs, and realizes automated detection of status lights.
Smart Images

Figure CN118570782A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a status light detection method, device, electronic device and medium. Background Art
[0002] With the development of computer technology, more and more devices are equipped with status lights to display the operating status of the device or the components installed on the device, such as the power on / off status light. Therefore, the detection of status lights is particularly important.
[0003] Currently, the detection of status lights is often carried out through manual visual inspection, that is, manually observing whether the color and brightness of the status lights are normal. However, the manual visual inspection method relies on the personal experience of the inspectors and is easily affected by subjective factors, resulting in low accuracy of the detection results. Summary of the invention
[0004] The present application provides a status light detection method, device, electronic device and medium to solve the technical problem of low accuracy of status light detection in the related art.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, the present application provides a status light detection method, which is applied to a server included in a status light detection system, wherein the status light detection system further includes an image acquisition component, and the status light detection method includes:
[0007] In response to a status light detection request, the image acquisition component acquires an image of the device to be detected indicated by the status light detection request to obtain an image to be detected;
[0008] Inputting the image to be detected into a target recognition model to recognize the image to be detected and obtain status information of a status light included in the device to be detected;
[0009] A status light detection result of the device to be detected is generated based on the status information.
[0010] In a second aspect, the present application provides a status light detection device, which is applied to a server included in a status light detection system, the status light detection system also includes an image acquisition component, and the device includes:
[0011] A collection module, used for, in response to a status light detection request, collecting images of the device to be detected indicated by the status light detection request through the image collection component to obtain an image to be detected;
[0012] An input module, used for inputting the image to be detected into a target recognition model to recognize the image to be detected and obtain status information of the status light included in the device to be detected;
[0013] A result generating module is used to generate a status light detection result of the device to be detected based on the status information.
[0014] In a third aspect, the present application provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the program.
[0015] In a fourth aspect, the present application provides a readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is able to execute the method of the first aspect above
[0016] In the embodiment of the present application, the status light detection system includes a server, and the status light detection system also includes an image acquisition component. In response to a status light detection request, the image acquisition component acquires an image of the device to be detected indicated by the status light detection request to obtain an image to be detected; the image to be detected is input into a target recognition model to recognize the image to be detected to obtain the status information of the status light contained in the device to be detected; and the status light detection result of the device to be detected is generated based on the status information. In this way, there is no need for manual visual inspection. The image acquisition component in the status light detection system acquires an image of the device to be detected, and the server in the status light detection system inputs the acquired image to be detected into the target recognition model, and the status information of the status light contained in the device to be detected is recognized by the target recognition model, so as to generate the status light detection result of the device to be detected based on the status information, so as to realize fully automated detection of the status light, without relying on the personal experience of the detection personnel, and ensure the accuracy of the detection result. At the same time, fully automated detection is realized through the image acquisition component and the target recognition model, which can realize unmanned detection, thereby reducing the labor cost of status light detection to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a flowchart of a method for detecting a status light provided by an embodiment of the present application;
[0019] Figure 2 It is a structural diagram of a training framework provided in an embodiment of the present application;
[0020] Figure 3 It is a structural diagram of an identification framework provided in an embodiment of the present application;
[0021] Figure 4 It is a partial structural diagram of a status light detection system provided in an embodiment of the present application;
[0022] Figure 5 is a schematic diagram of a scenario of status light detection provided by an embodiment of the present application;
[0023] Figure 6 is a structural diagram of a status light detection device provided in an embodiment of the present application;
[0024] Figure 7 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] Figure 1 is a flowchart of the steps of a status light detection method provided in an embodiment of the present application. The method can be applied to a server included in a status light detection system. The status light detection system can also include an image acquisition component, such as Figure 1 As shown, the method may include:
[0027] Step 101: In response to a status light detection request, the image acquisition component acquires an image of the device to be detected indicated by the status light detection request to obtain an image to be detected.
[0028] Step 102: input the image to be detected into a target recognition model to recognize the image to be detected and obtain status information of the status light included in the device to be detected.
[0029] Step 103: Generate a status light detection result of the device to be detected based on the status information.
[0030] The status light detection system provided by the embodiment of the present invention can be applied to the production plant of the equipment equipped with the status light, and can also be applied to the user-end plant of the equipment equipped with the status light. It can be understood that during the equipment production process, the production plant needs to weld the status light on the main board or small card of the equipment through the surface mount technology (SMT), and then export some status lights to the chassis panel of the equipment through the light guide column to realize the assembly of the equipment. In this process, the status light may not be able to emit light normally due to welding or collision. Or, for some status lights directly mounted on the equipment (for example, hard disk status light), there may be a problem with the raw materials of the status light itself and it cannot emit light normally. Therefore, there is a demand for status light detection in the equipment production plant. Correspondingly, for the user-end plant, the user needs to observe the operating status of the equipment through the status light. If the status light is not on or the color of the light does not meet the requirements, it will affect the observation of the equipment. Therefore, the user-end plant also needs to detect the status light.
[0031] Among them, the above-mentioned server can be a computer device with data processing capabilities and image analysis capabilities. The above-mentioned image acquisition component refers to a device that can be used to acquire images, which can be an ordinary camera or a miniature camera. It can be set according to actual needs, and the embodiment of the present invention does not limit this. In addition, the status light detection system of the embodiment of the present invention may include an image acquisition component, and of course, it can also include multiple image acquisition components, which can be set according to the number and location distribution of the devices to be detected, and the embodiment of the present invention does not limit this. Furthermore, the above-mentioned server can communicate with the image acquisition component through a network or hardware connection, so that the server receives the image to be detected acquired by the image acquisition component.
[0032] Among them, the above-mentioned status light detection request can be automatically triggered according to a certain detection cycle, or it can be generated after receiving a detection instruction from a relevant person. In one case, the server can periodically execute a self-test program, and the self-test program can include a subroutine for detecting the status light of the device, so that when the server executes the subroutine, a status light detection request can be generated. In another case, a detection instruction for the device to be detected can be input by a relevant person on the server, and the detection instruction can be a string instruction or a voice instruction, which is not limited in the embodiment of the present invention.
[0033] Furthermore, when the number of devices to be detected is large, the image acquisition component provided in the embodiment of the present invention may be movable. Accordingly, the above-mentioned status light detection request may also carry the location information of the device to be detected, thereby facilitating the control of the image acquisition component to move to the position indicated by the location information to perform image acquisition on the corresponding device to be detected.
[0034] Among them, the above-mentioned target recognition model can be obtained by pre-training, and can be a neural network model. The target recognition model is used to recognize the image to be detected and obtain the status information of the status light contained in the device to be detected. Specifically, since the status light is often composed of a light emitting diode (LED), it can be a multi-color light or a single-color light, and its status information usually includes visual information such as light, dark, and the color of the light when it is on. Therefore, the target recognition model can be a pre-trained image recognition model, which can recognize the visual information in the image to be detected and obtain the status information of the status light. Specifically, a large number of device images with labeled status light information can be used to train the image recognition model until the training stop condition is met to obtain the target recognition model.
[0035] Furthermore, the target recognition model can be trained on the basis of a model for target detection (You look only, YOLO). The YOLO model can detect and identify the position and type of an object in a picture through a convolutional neural network structure, and usually only one forward propagation is required to locate and identify the object in the image. Therefore, the embodiment of the present invention can use the status light as the object to be identified, and obtain the target recognition model required by the embodiment of the present invention by training the YOLO model.
[0036] The status information of the status light may include the switch status, color information and configuration position information of each status light included in the device to be detected, the switch status indicates whether the status light is on, the color information indicates the color of the status light at this time, and the configuration position information represents the position of the status light on the device to be detected. Accordingly, the embodiment of the present invention can generate the status light detection result of the device to be detected based on the obtained status information.
[0037] Specifically, since each status light has corresponding status information when the device to be detected is working normally when there is no fault in the status light, the embodiment of the present invention can use the status information corresponding to each status light when the device to be detected is working normally as reference status information, and compare the status information identified by the target recognition model with the reference status information to generate a status light detection result of the device to be detected. Specifically, when the status information is completely consistent with the reference status information, a detection result indicating that the status light of the device to be detected meets the requirements can be generated. Correspondingly, when the status information is not completely consistent with the reference status information, a detection result indicating that the status light of the device to be detected does not meet the requirements is generated.
[0038] In summary, the status light detection method provided by the embodiment of the present application is applied to the server included in the status light detection system, and the status light detection system also includes an image acquisition component. By responding to the status light detection request, the image acquisition component performs image acquisition on the device to be detected indicated by the status light detection request to obtain the image to be detected; the image to be detected is input into the target recognition model to identify the image to be detected, and the status information of the status light contained in the device to be detected is obtained; based on the status information, the status light detection result of the device to be detected is generated. In this way, there is no need for manual visual inspection, and the image acquisition component in the status light detection system performs image acquisition on the device to be detected, and the server in the status light detection system inputs the collected image to be detected into the target recognition model, and the target recognition model identifies the status information of the status light contained in the device to be detected, thereby generating the status light detection result of the device to be detected based on the status information, so as to realize the fully automated detection of the status light, without relying on the personal experience of the detection personnel, and ensuring the accuracy of the detection result. At the same time, the fully automated detection is realized by the image acquisition component and the target recognition model, which can realize unmanned operation, thereby reducing the labor cost of the status light detection to a certain extent.
[0039] In one implementation, before the above operation of inputting the image to be detected into the target recognition model, the embodiment of the present application may further include the following steps:
[0040] S21. Adjusting image parameters of the image to be detected to target parameter values; the image parameters include at least one of resolution, brightness, saturation and contrast.
[0041] And / or, S22, based on the pixel value of each pixel in the image to be detected, perform color complementation on each pixel of the image to be detected.
[0042] And / or, S23, rotating the image to be detected so that the direction of the device to be detected in the image to be detected is the target direction.
[0043] It should be noted that since the environment in which the device is located is usually more complex, there may be insufficient shooting brightness. At the same time, different devices may be located in different shooting environments. In addition, the types of image acquisition components used may not be consistent. For example, the image acquisition component may be a camera used for monitoring, and the sample image may be taken by a mobile phone or a SLR camera. This leads to large differences in the image parameters of the image to be detected and the sample image used for model training, which greatly affects the recognition effect of the target recognition model on the image to be detected.
[0044] In view of the above situation, the embodiment of the present invention can adjust the image parameters of the image to be detected before inputting the image to be detected into the target recognition model, and adjust it to the target parameter value. Among them, the image parameter can be resolution, and / or brightness, and / or saturation, and / or contrast. The number of image parameters that need to be adjusted can be set according to the actual application environment, and the embodiment of the present invention does not limit this.
[0045] The target parameter value may be a parameter value that is not less than a lower limit of an image parameter that can be recognized by the target recognition model, and may be pre-set based on a sample image used for model training.
[0046] Specifically, when the image parameters include resolution, the embodiment of the present invention can adjust the resolution of the image to be detected to the target resolution value through the interpolation algorithm (resize) in the third-party image processing library (Python Image Library, PIL) provided by the interpreted, high-level programming, general-purpose programming language (Python). Exemplarily, the above target resolution value can be 1920x1080, and images with this resolution are often relatively high-definition and can be quickly recognized by the model.
[0047] Accordingly, in the case where the image parameters include at least one of brightness, saturation and contrast, the embodiment of the present invention can adjust the brightness, and / or saturation, and / or contrast of the image to be detected to their respective corresponding target parameter values by calling the image enhancement algorithm (Image Enhance) in the PTL library, thereby further ensuring the image quality of the image to be detected in the input target recognition model.
[0048] The purpose of the above color complementation operation is to make the boundary between the status light and the surrounding parts clearer. Specifically, since the input to the target recognition model is the image to be detected obtained by collecting the entire device to be detected, the target recognition model needs to obtain the part belonging to the status light, so the status light and the background need to be segmented. On this basis, the embodiment of the present invention can enhance the boundary between the status light and the surrounding parts through the color complementation operation.
[0049] Specifically, the above color complementation operation can be performed on each pixel in the image to be detected. Specifically, the pixel value of each pixel in the image to be detected can be obtained through the attribute acquisition algorithm (getattribute) of the PTL library, and then for any pixel, the embodiment of the present invention can use the following formula to complement the pixel:
[0050] pixel new =pixel max +pixel min -pixel current.
[0051] Among them, the above pixel max Indicates the maximum value (brightest value) of all pixels in the image to be detected. min Indicates the minimum pixel value (darkest value) of all pixels in the image to be detected. current Indicates the actual pixel value of the pixel. new Indicates the complementary color value of the pixel.
[0052] Furthermore, the complementary color operation can be completed by adjusting the pixel value of each pixel to the calculated complementary color value.
[0053] Among them, in actual scenarios, the placement direction of the device may be inconsistent with the shooting direction of the image acquisition component. For example, the image acquisition component may be capturing normally, and the device may be upside down. This causes the various status lights in the image to be detected to be actually upside down compared to a normally placed device, which may cause inaccurate recognition results of the target recognition model.
[0054] On this basis, the embodiment of the present invention can rotate the image to be detected so that the direction of the device to be detected in the image to be detected is the target direction. The above-mentioned target direction refers to the normal placement direction, that is, the designated top surface of the device is placed upwards, and the designated bottom surface of the device is placed downwards. Specifically, the embodiment of the present invention can first detect the direction of the image to be detected, and can detect the characters in the image to be detected. Since the characters contained in the normally placed device are usually also positive, the embodiment of the present invention can rotate the image to be detected with non-positive characters so that it is rotated to the direction where the characters are positive. Furthermore, since a device to be detected may include multiple status lights located in different positions, the embodiment of the present invention can rotate the image to be detected to the target direction, and the target recognition model can output the recognition results in sequence according to the distribution positions of the status lights in the normally placed device to be detected.
[0055] In an embodiment of the present invention, the image parameters of the image to be detected are adjusted to the target parameter values; the image parameters include at least one of resolution, brightness, saturation and contrast; and / or, based on the pixel values of each pixel in the image to be detected, each pixel of the image to be detected is complemented; and / or, the image to be detected is rotated so that the direction of the device to be detected in the image to be detected is the target direction. By performing the above-mentioned preprocessing operation before inputting the image to be detected into the target recognition model, the image quality of the image to be detected can be improved to a certain extent, thereby improving the recognition effect of the target recognition model. At the same time, the model restrictions on the image acquisition component can also be reduced.
[0056] In one implementation, the device to be detected includes at least one target sub-device, which is a sub-device equipped with at least one status light, and the target recognition model is obtained by training through the following steps:
[0057] S31, obtaining a plurality of sample images and sample image labels; the sample image labels are used to represent the status information of each of the target sub-devices contained in each of the sample images.
[0058] S32: Input the plurality of sample images into an initial image recognition model to obtain a sample recognition result of each of the sample images.
[0059] S33: Adjust the model parameters of the initial image recognition model based on the sample recognition result and the sample image label.
[0060] S34: When the training stop condition is reached, the current initial image recognition model is determined as the target recognition model.
[0061] It should be noted that in the relevant technology, the detection of status lights often uses the method of comparing with standard pictures. Taking electric vehicles as an example, when testing LED matrix lights, a camera is used to shoot the matrix lights to be tested, and the shot pictures are compared with standard pictures to obtain test results. However, there are many models of equipment such as servers, and the number of models usually exceeds 20,000. In addition, the status lights included in different models and the position distribution of each status light on the equipment are different. If the above-mentioned standard picture comparison method is used, it is necessary to make standard pictures for each model. Obviously, this method is inefficient and the workload is large. At the same time, the update cycle of equipment such as servers is short, and the above-mentioned method requires continuous production of standard pictures for newly updated models, which further increases the workload.
[0062] On this basis, when training to obtain a target recognition model, the embodiment of the present invention uses sample image labels that represent the status information of each target sub-device contained in the sample image for training.
[0063] Among them, the above-mentioned target sub-device refers to a sub-device equipped with at least one status light, for example, it can be a switch, storage device, network card or hard disk and other components. The device to be detected contains at least one target sub-device. Correspondingly, the status information of the above-mentioned target sub-device refers to the status information of the status light contained in the target sub-device, and optionally, it can also include the name of the target sub-device. Specifically, although there are many models of equipment such as servers, the components equipped with status lights contained in different models are often the same, and the only difference is the location or direction of these components installed. For example, on some servers, the hard disk is installed upright, while the hard disk of some servers is installed horizontally. On this basis, the embodiment of the present invention can use these components equipped with status lights as identification units, so that it can be adapted to devices of different models.
[0064] Among them, the above-mentioned sample images can be obtained by pre-shooting devices of different models, and the number of sample images can be no less than 1000 or no less than 2000. It can be understood that the more sample images used for training, the better the training effect of the model. The number of the above-mentioned sample images can be set according to the actual number of models, and the embodiment of the present invention does not limit this. Optionally, before the above-mentioned sample images are input into the initial image recognition model, the above-mentioned steps S21, and / or, S22, and / or, S23 operations can be performed on each sample image to improve the training efficiency of the model and improve the accuracy of the trained model.
[0065] Among them, the above-mentioned sample image labels are used to characterize the status information of each target sub-device contained in each sample image. Specifically, the above-mentioned sample image labels can be obtained by manually annotating each sample image separately, and specifically, the obtained multiple sample images can be output to the display end in sequence, so that the relevant annotation personnel can view the sample images through the display end, and since the status information is visual information, the relevant annotation personnel can complete the manual annotation of the sample images through observation. At the same time, the sample image labels of each sample image can be obtained by receiving the annotation information input by the relevant annotation personnel. Exemplarily, the above-mentioned sample images can be pictures of servers of different models, and the target sub-device, that is, the components where the status light (for example: switch status light or unit identification light (Unit Identification, UID)) is located can be clearly photographed. Furthermore, multiple sample images of the status light in different states can be obtained, for example, sample images when the UID is not on, and sample images when the UID is on and blue.
[0066] Furthermore, the embodiment of the present invention can also convert the sample image and the sample image label into a file in a recognizable format (eg, YOLO format) through a labeling tool (X-Anylabeling) and then input it into the initial image recognition model.
[0067] Furthermore, the above-mentioned initial image recognition model may be pre-built or pre-selected. Specifically, a previously built image recognition model may be randomly selected as the initial image recognition model, or an image recognition model with poor recognition effect may be selected as the initial image recognition model, etc. Specifically, the purpose of training the initial image recognition model is to learn the visual features of the target sub-device and the status light so that it can recognize the status information of the target sub-device and the status light according to the input image.
[0068] For example, the output of the model can be in the following form:
[0069] "name":"networkconnect_lit_green", / / Name of the status light
[0070] "class": 72, / / represents the category of the recognized status light
[0071] "confidence": 0.985517680644989, / / represents the current confidence of the model
[0072] "box":{
[0073] "x1":1456.9259033203125,
[0074] "y1":357.71966552734375,
[0075] "x2":1580.2762451171875,
[0076] "y2":508.41436767578125
[0077] } / / Represents the coordinates of the identified status light on the image to be detected, x1 is the horizontal coordinate of the left boundary of the status light, y1 is the vertical coordinate of the upper boundary of the status light, x2 is the horizontal coordinate of the right boundary of the status light, and y2 is the vertical coordinate of the lower boundary of the status light.
[0078] Specifically, the embodiments of the present invention can input the acquired multiple sample images into the initial image recognition model, so that the initial image recognition model recognizes the sample images and outputs the sample recognition results of each sample image. Furthermore, the embodiments of the present invention can adjust the model parameters based on the sample recognition results and sample image labels output by the initial image recognition model until the training stop condition is reached. When the training stop condition is reached, it is determined that the training is ended, and the current initial image recognition model can be determined as the target recognition model.
[0079] Among them, the above-mentioned training stop condition can be that the training time reaches a preset time threshold, or the confidence of the model is not less than a preset confidence threshold, or the loss function of the model is not greater than a preset loss threshold. Different training stop conditions can be determined according to actual conditions, and the embodiments of the present invention are not limited to this.
[0080] Optionally, when the above training stop condition is that the confidence of the model is not less than a preset confidence threshold, during the model training process, the embodiment of the present invention may further:
[0081] For any sample image and the sample recognition result corresponding to the sample image, if the sample image label corresponding to the sample image and the sample recognition result are completely consistent, the preset count item can be increased by 1. Correspondingly, if the sample recognition result and the sample image label are not completely consistent, the preset count item can be reduced by 1.
[0082] Furthermore, the confidence of the model can be generated by using the ratio of the count value of the preset count item to the number of sample images that have been identified. In one case, the preset confidence threshold can be 95%, or 90%, 96% or 94%, etc., which is not limited in the embodiment of the present invention.
[0083] By calculating the confidence of the model through the above steps and setting a preset confidence threshold as a training stop condition, the recognition accuracy of the trained target recognition model can be guaranteed.
[0084] In the embodiment of the present application, the device to be detected includes at least one target sub-device, and the target sub-device is a sub-device configured with at least one status light; a plurality of sample images and sample image labels are obtained; the sample image labels are used to characterize the status information of each target sub-device contained in each sample image; the plurality of sample images are input into the initial image recognition model to obtain the sample recognition results of each sample image; based on the sample recognition results and the sample image labels, the model parameters of the initial image recognition model are adjusted; when the training stop condition is reached, the current initial image recognition model is determined as the target recognition model. In this way, since the sample image labels that can characterize the status information of the target sub-device contained in each sample image are used for model training, the trained target recognition model can use the target sub-device as a recognition unit, so that no matter where the target sub-device is installed in the device to be detected and how many, the target recognition model can recognize the status information of the status light for the image to be detected, avoiding the problem of needing to make standard pictures for each model in the related art. The target recognition model provided by the embodiment of the present invention can be applied to complex scenes with many device models, greatly reducing the workload of status light detection. At the same time, there is no need to retrain for devices with short model update cycles, further reducing the workload of status light detection.
[0085] In one implementation, the target recognition model is obtained by training based on a training framework built by a training end; the training framework includes a first hardware layer, a first driver layer, and a first container layer, and the first container layer includes a first operating system layer, a first processing layer, and a model layer; before the image acquisition component performs image acquisition on the device to be detected indicated by the status light detection request in response to the status light detection request, the embodiment of the present invention may further include the following steps:
[0086] S41. Building an identification framework on the server, wherein the identification framework includes a second hardware layer, a second driver layer, and a second container layer; the second container layer includes a second operating system layer, a second processing layer, and an engine layer.
[0087] S42: Import the target recognition model generated by the training end into the engine layer.
[0088] Among them, the above-mentioned training end can be another computer device with data calculation and processing capabilities. The above-mentioned model layer can be an initial image recognition model. The above-mentioned first hardware layer is used to provide hardware resources for the model layer, which is the basic component structure of the training framework, which may include hardware components for performing actual physical operations, such as: microprocessors, memories, power management modules, etc., which can be used to perform operations such as data processing, signal conversion, and communication. The first driver layer is used to provide the model layer with a calling interface for calling the first hardware layer, that is, the model layer calls the hardware resources of the first hardware layer through the first driver layer. The first operating system layer is used to configure resources for the model layer, and can configure software or hardware resources such as memory for the model layer. The first processing layer is used to provide a data processing library for the model layer, which may contain programs or functions related to image processing, natural language processing, etc., for easy calling by the model layer. The first hardware layer can be the central processing unit (CPU) or graphics processing unit (GPU) of the training end, and the first driver layer can include an operating system (for example, a Linux-based operating system (Redhat 8.6Linux) provided by Red Hat), a GPU driver (for example, version 535.154.05) and a graphics driver (Compute Unified Device Architecture, CUDA), and the CUDA version can be 12.2. Of course, other versions can also be used, and the versions of each layer can be selected according to the actual situation of the GPU hardware, which is not limited in the embodiment of the present invention.
[0089] The first container layer refers to deploying the first operating system layer, the first processing layer and the model layer on the training framework in a container (docker), so that the first operating system layer, the first processing layer and the model layer are no longer dependent on hardware, and hardware replacement can be easily achieved. The first operating system layer can be a Linux distribution operating system (Ubuntu22.04) based on desktop applications, the first processing layer can be an open source Python machine learning library (Pytorch), and the model layer is an initial image recognition model, which can be a YOLO v8 model.
[0090] The initial image recognition model may be a YOLO v8 model, which may be mounted in the first container layer. Figure 2 is a structural diagram of a training framework provided in an embodiment of the present application, such as Figure 2As shown, starting from the bottom layer, there are the first hardware layer (CPU, GPU and other hardware), the first driver layer (Redhat8.6Linux, GPU driver, CUDA), the first container layer (Docker), and on Docker, the first operating system layer (Ubuntu22.04), Pytorch and YOLO v8 model are installed in sequence.
[0091] Furthermore, the recognition framework on the server may include a second hardware layer, a second driver layer and a second container layer, and the second container layer may include a second operating system layer, a second processing layer and an engine layer. The second hardware layer is used to provide hardware resources for the engine layer, the second driver layer is used to provide the engine layer with a calling interface for calling the second hardware layer, the second operating system layer is used to configure resources for the engine layer, and the second processing layer is used to provide a data processing library for the engine layer. The specific functions of each layer in the recognition framework are similar to those of each layer in the training framework, and will not be repeated here. Among them, the above-mentioned engine layer is used to run and optimize the target recognition model.
[0092] For example, Figure 3 is a structural diagram of an identification framework provided in an embodiment of the present application, such as Figure 3 As shown, the second hardware layer may include a graphics card (e.g., RTX4090 video memory from NVIDIA) and a CPU. The second driver layer may include an operating system (e.g., a Linux-based operating system (Redhat 8.6Linux) provided by Red Hat), a GPU driver (e.g., version 535.154.05), a graphics driver (Compute Unified Device Architecture, CUDA), and a driver (Driver), a second container layer (Docker), and on Docker, the second operating system layer (Ubuntu 22.04), the second processing layer (cross-platform computer vision and machine learning software library OpenCV and NVIDIA's acceleration library cuDNN) and the engine layer (inference framework TensorRT) are installed in sequence. Among them, TensorRT can be used to improve the reasoning speed and efficiency of the model, thereby improving the recognition efficiency of the target recognition model.
[0093] Furthermore, the hardware layer and the driver layer are used to provide hardware computing power to the container layer, the processing layer is used to provide relevant image processing algorithms to the model layer or the engine layer, and the operating system layer is used to provide an operating environment to the model layer or the engine layer. At the same time, by building a first container layer in the training framework, the embodiment of the present invention can make the operating system, the processing layer, and the model layer no longer dependent on the hardware. In the case of insufficient computing power of the training framework, the hardware can be easily replaced through the first container layer to achieve one-click deployment.
[0094] Accordingly, by building a recognition framework with a structure similar to the training framework on the server, it is easier to import the target recognition model. At the same time, the use of the second container layer can also facilitate the replacement of hardware when the computing power of the recognition framework is insufficient.
[0095] Among them, after the training of the training end is completed, the generated target recognition model is often an open neural network exchange format file (Open Neural Network Exchange, ONNX). The embodiment of the present invention can receive the ONNX file generated by the training end through the communication interface between the training end and the server end, and import it into the engine layer of the recognition framework for operation.
[0096] In one implementation, the operation of generating the status light detection result of the device to be detected based on the status information may include:
[0097] S51. Based on the identification of the device to be detected, obtain reference status information corresponding to the status light included in the device to be detected from a pre-built device database.
[0098] S52: When the state information is consistent with the reference state information, generate a first detection result, where the first detection result is used to indicate that the state light included in the device to be detected meets the detection requirement.
[0099] S53: When the status information is inconsistent with the reference status information, generate a second detection result, where the second detection result is used to indicate that the status light included in the device to be detected does not meet the detection requirement.
[0100] The identification of the device to be detected refers to the unique identification of the device to be detected. Different devices have different identifications. The serial number (SN) of the device can be used as the unique identification of the device. The device database can be pre-built, which contains the reference status information of the status lights included in the device to be detected. The reference status information can include the configuration position and lighting status (whether it is lit and the color of the light) of each status light when the status light configuration of the device is complete and the function is normal.
[0101] Specifically, the embodiment of the present invention may compare the status information with the reference status information. When the status information is consistent with the reference status information, a first detection result indicating that the detection requirements are met may be generated. Accordingly, when there is an inconsistency between the status information and the reference status information (for example, the lighting state of the status light at a certain position is inconsistent with the lighting state in the reference status information, or there is a target sub-device at a certain position in the reference status information, but the status information of the target sub-device at the corresponding position does not exist in the status information), a second detection result indicating that the detection requirements are not met may be generated. The above-mentioned first detection result and second detection result may be in text form or in character string form. For example, the first detection result may be pass or pass, and the second detection result may be fail or fail.
[0102] Furthermore, the embodiment of the present invention can also output the generated status light detection result to a display component, so that relevant personnel can view it in time.
[0103] In an embodiment of the present invention, based on the identification of the device to be detected, reference status information corresponding to the status light included in the device to be detected is obtained from a pre-constructed device database; when the status information is consistent with the reference status information, a first detection result is generated, and the first detection result is used to characterize that the status light included in the device to be detected meets the detection requirements; when the status information is inconsistent with the reference status information, a second detection result is generated, and the second detection result is used to characterize that the status light included in the device to be detected does not meet the detection requirements. In this way, by using the identification of the device to be detected to obtain the reference status information, and by comparing the reference status information with the status information of the target recognition model to generate the detection result, the accuracy of the detection result can be guaranteed.
[0104] In one implementation, the server includes a first server and a second server;
[0105] The above-mentioned operation of performing image acquisition on the device to be detected indicated by the status light detection request through the image acquisition component in response to the status light detection request to obtain the image to be detected includes:
[0106] In response to the status light detection request, the first server acquires an image of the device to be detected indicated by the status light detection request through the image acquisition component to obtain an image to be detected;
[0107] The above-mentioned identification framework is built on the server, including:
[0108] Building an identification framework on the second server;
[0109] The step of inputting the image to be detected into the target recognition model includes:
[0110] The first server transmits the image to be detected to the target recognition model on the second server.
[0111] Among them, the above-mentioned first server and second server refer to different computer devices. In the embodiment of the present invention, the first server can receive the status light detection request, and the first server can perform image acquisition through the image acquisition component, and the second server can run the target recognition model, and the first server can transmit the acquired image to be detected to the target recognition model on the second server.
[0112] Specifically, since the number of devices to be detected and image acquisition components may be large, in order to reduce the workload of the server, the embodiment of the present invention can set a first server and a second server, so that the second server performs image recognition operations, and the first server only needs to perform image acquisition and generate detection results. By setting the two servers to perform different operations respectively, the calculation and resource pressure of each server can be shared. At the same time, since the second server only needs to run the target recognition model, multiple first servers can also share one second server, which can reduce costs when there are many devices to be detected.
[0113] In one implementation, the above-mentioned status light detection system further includes a driving component, a connecting component, a fixing component, a guide rail and a mounting platform; the mounting platform is used to place the device to be detected; the image acquisition component is arranged on the fixing component, the fixing component is connected to the guide rail, the guide rail is arranged on the mounting platform along a specified direction, and the connecting component is used to connect the driving component and the fixing component;
[0114] The first server, in response to the status light detection request, acquires an image of the device to be detected indicated by the status light detection request through the image acquisition component to obtain an operation of the image to be detected. The embodiment of the present invention may specifically include:
[0115] S61. The first server obtains the location information of the device to be detected indicated by the status light detection request in response to the status light detection request;
[0116] S62, sending a driving instruction to the driving component;
[0117] S63, based on the driving component driving the connecting component according to the driving instruction, so that the connecting component links with the fixing component to slide on the guide rail along the specified direction, and the fixing component slides to the position indicated by the position information;
[0118] S64: Capture an image of the device to be detected by using the image acquisition component to obtain an image to be detected.
[0119] Wherein, the above-mentioned driving component can be a motor (also can be called a motor), can be a stepping motor, which is connected to the connecting component and is used to drive the connecting component to move. The above-mentioned connecting component can be a cable, and the above-mentioned fixing component can be a fixing rod for fixing the image acquisition component. The above-mentioned guide rail can be a sliding groove, which is arranged on the mounting table along a specified direction. Wherein, the above-mentioned specified direction can be the distribution direction of different mounting tables, and a device to be detected is placed on a mounting table. Exemplarily, when each mounting table is vertically distributed, the above-mentioned specified direction can be a direction perpendicular to the mounting table, that is, a direction perpendicular to the ground. Correspondingly, when each mounting table is horizontally distributed in the same plane, the above-mentioned specified direction can be a direction parallel to the mounting table.
[0120] Among them, the above-mentioned location information refers to the location information of the device to be detected in the real space. Specifically, since the equipment is often placed in a workbench in the equipment production plant or the operation plant. The embodiment of the present invention can record the SN information and the location information of the workbench when the equipment is placed on the workbench, and at the same time, the recorded SN information and the location information of the workbench can be uploaded to the preset equipment database through a scanner, so that in the above-mentioned step S61, the identification (i.e., SN) of the device to be detected carried by the status light detection request can be obtained from the equipment database. The location information of the workbench corresponding to the SN. In addition, a workbench can include one mounting table, or it can include multiple mounting tables. In the case of including multiple mounting tables, the above-mentioned equipment database can also include the location information of the equipment on the workbench.
[0121] Specifically, the equipment database may be in the form of a data table, which may include multiple items, which may be order information, SN, production line identification, workbench position, position on the workbench, and recording time. The order information may include the component configuration information of the equipment and the lighting status of each status light of the equipment during normal operation.
[0122] Further, a driving instruction can be sent to the driving component, and the driving instruction can be an electrical signal to drive the motor to rotate. Accordingly, the driving component can drive the connecting component to move according to the driving instruction, so that the connecting component drives the fixed component to slide on the guide rail, and the fixed component slides to the position indicated by the position information and stops. At this time, the fixed component is located at the position where the device to be detected is located, and accordingly, the image acquisition component is also located on the fixed component at the position where the device to be detected is located, and at this time, the image acquisition component can be used to acquire images of the device to be detected.
[0123] For example, Figure 4 is a partial structural diagram of a status light detection system provided in an embodiment of the present application, such as Figure 4As shown, there are three devices to be tested, and the loading platforms (installation platforms) where the three devices to be tested are located are vertically distributed. Specifically, since devices such as servers often have status lights on the front and rear panels, on this basis, Figure 4 Image acquisition components (cameras) are arranged in the front and rear directions of the device to be detected, which are the front camera and the rear camera respectively.
[0124] Furthermore, if Figure 4 As shown, for the front or rear cameras, the cameras are fixed on the fixing components and connected to the motor through cables. The fixing components (camera fixing rods) are connected to the guide rails. The motor can drive the cables to move, and the cables can drive the fixing rods to move in the distribution direction of the loading platform. It should be noted that Figure 4 The driving instructions received by the front motor and the rear motor shown in the figure are the same, that is, the front camera driven by the front motor and the rear camera driven by the rear motor shoot the same device under test. Figure 4 As shown, each loading platform is provided with a bayonet, and the camera slides up and down along the cable at the bayonet position.
[0125] Optionally, LED lights may be provided on both sides of the image acquisition component for supplementary lighting.
[0126] Further, Figure 5 is a schematic diagram of a scene of status light detection provided by an embodiment of the present application, such as Figure 5 As shown, pictures of devices of different models can be collected to obtain a data set. After data cleaning and organization, the data set is input into the training server (i.e., the above-mentioned training end) for model training. After the training, a neural network ONNX is generated, and ONNX is deployed to the inference server (i.e., the above-mentioned second server end). The diagnostic cloud server (i.e., the above-mentioned first server end) can receive a status light detection request from a machine under test (device to be tested, system under test, SUT), control the image acquisition component to perform image acquisition on the SUT, and send the acquired image to the inference server for identification to obtain status light information. Furthermore, the status light information can be sent to the SUT or the diagnostic cloud server to generate a status light detection result.
[0127] Optionally, the diagnostic cloud server can also store the test logs of the machine under test, so that relevant testers can view them in a timely manner.
[0128] It should be noted that the related art also uses a color analyzer to detect the status light. During the test, the board is fixed on the test fixture, and the light of the status light is guided to the color analyzer by a light guide column, and the light signal is converted into an electrical signal, which is transmitted to the test machine through the Universal Serial Bus (USB), so as to determine whether the color display and brightness of the status light meet the design standards. However, the cost of the color analyzer is high, and it needs to be fixed with a special test fixture. In addition, there are often many models of equipment such as servers, which contain many parts. When using a color analyzer for testing, it is often impossible to accurately judge more complex models.
[0129] The status light detection method provided in the embodiment of the present invention is applied to the server end included in the status light detection system, and the status light detection system also includes an image acquisition component. In response to the status light detection request, the image acquisition component performs image acquisition on the device to be detected indicated by the status light detection request to obtain the image to be detected; the image to be detected is input into the target recognition model to identify the image to be detected to obtain the status information of the status light contained in the device to be detected; and the status light detection result of the device to be detected is generated based on the status information. In this way, there is no need for manual visual inspection. The image acquisition component in the status light detection system performs image acquisition on the device to be detected, and the server end in the status light detection system inputs the acquired image to be detected into the target recognition model, and the status information of the status light contained in the device to be detected is identified by the target recognition model, so as to generate the status light detection result of the device to be detected based on the status information, so as to realize the fully automated detection of the status light, without relying on the personal experience of the detection personnel, and ensure the accuracy of the detection result. At the same time, the fully automated detection is realized by the image acquisition component and the target recognition model, which can realize unmanned detection, thereby reducing the labor cost of status light detection to a certain extent.
[0130] Figure 6 : is a structural diagram of a status light detection device provided in an embodiment of the present application. The device is applied to a server end included in a status light detection system. The status light detection system also includes an image acquisition component. The device 20 may include:
[0131] The acquisition module 201 is used for, in response to a status light detection request, acquiring an image of the device to be detected indicated by the status light detection request through the image acquisition component to obtain an image to be detected;
[0132] An input module 202 is used to input the image to be detected into a target recognition model to recognize the image to be detected and obtain status information of the status light included in the device to be detected;
[0133] The result generating module 203 is used to generate the status light detection result of the device to be detected based on the status information.
[0134] Optionally, the device further comprises:
[0135] A parameter adjustment module, used to adjust the image parameters of the image to be detected to a target parameter value; the image parameters include at least one of resolution, brightness, saturation and contrast;
[0136] And / or, a color complementation module, used for performing color complementation on each pixel of the image to be detected based on the pixel value of each pixel in the image to be detected;
[0137] And / or, a rotation module, used for rotating the image to be detected so that the direction of the device to be detected in the image to be detected is the target direction.
[0138] Optionally, the device to be detected includes at least one target sub-device, and the target sub-device is a sub-device configured with at least one status light; the target recognition model is obtained by training the following modules:
[0139] A sample acquisition module, used to acquire a plurality of sample images and sample image labels; the sample image labels are used to represent the status information of each of the target sub-devices contained in each of the sample images;
[0140] An initial recognition module, used for inputting the plurality of sample images into an initial image recognition model to obtain a sample recognition result of each of the sample images;
[0141] A model adjustment module, used to adjust the model parameters of the initial image recognition model based on the sample recognition result and the sample image label;
[0142] The target determination module is used to determine the current initial image recognition model as the target recognition model when the training stop condition is met.
[0143] Optionally, the target recognition model is obtained by training based on a training framework built by the training end; the training framework includes a first hardware layer, a first driver layer and a first container layer, the first container layer includes a first operating system layer, a first processing layer and a model layer; the model layer is the initial image recognition model, the first hardware layer is used to provide hardware resources for the model layer, the first driver layer is used to provide the model layer with a calling interface for calling the first hardware layer, the first operating system layer is used to configure resources for the model layer, and the first processing layer is used to provide a data processing library for the model layer;
[0144] The device also includes:
[0145] A building module is used to build an identification framework on the server, wherein the identification framework includes a second hardware layer, a second driver layer and a second container layer; the second container layer includes a second operating system layer, a second processing layer and an engine layer; the second hardware layer is used to provide hardware resources for the engine layer, the second driver layer is used to provide the engine layer with a calling interface for calling the second hardware layer, the second operating system layer is used to configure resources for the engine layer, the second processing layer is used to provide the engine layer with a data processing library, and the engine layer is used to run and optimize the target recognition model;
[0146] The import module is used to import the target recognition model generated by the training end into the engine layer.
[0147] Optionally, the result generation module 203 includes:
[0148] A reference submodule, configured to obtain reference status information corresponding to the status light included in the device to be detected from a pre-built device database based on the identification of the device to be detected;
[0149] A first generating submodule, configured to generate a first detection result when the state information is consistent with the reference state information, wherein the first detection result is used to indicate that the state light included in the device to be detected meets the detection requirement;
[0150] The second generating submodule is used to generate a second detection result when the state information is inconsistent with the reference state information, wherein the second detection result is used to indicate that the state light included in the device to be detected does not meet the detection requirements.
[0151] Optionally, the server includes a first server and a second server;
[0152] The acquisition module 201 is specifically used for: the first server responds to the status light detection request, and acquires the image of the device to be detected indicated by the status light detection request through the image acquisition component to obtain the image to be detected;
[0153] The building module is used to: build an identification framework on the second server;
[0154] The input module 202 is specifically used for: the first server end transmits the image to be detected to the target recognition model on the second server end.
[0155] Optionally, the status light detection system further includes a driving component, a connecting component, a fixing component, a guide rail and a mounting platform; the mounting platform is used to place the device to be detected; the image acquisition component is arranged on the fixing component, the fixing component is connected to the guide rail, the guide rail is arranged on the mounting platform along a specified direction, and the connecting component is used to connect the driving component and the fixing component;
[0156] The acquisition module 201 is specifically used for:
[0157] The first server obtains, in response to the status light detection request, the location information of the device to be detected indicated by the status light detection request;
[0158] Sending a driving instruction to the driving component;
[0159] Based on the driving component driving the connecting component according to the driving instruction, the connecting component links the fixing component to slide on the guide rail along the specified direction, and the fixing component slides to the position indicated by the position information;
[0160] The image acquisition component is used to acquire an image of the device to be detected, thereby obtaining an image to be detected.
[0161] In summary, the status light detection device provided by the embodiment of the present application is applied to the server included in the status light detection system, and the status light detection system also includes an image acquisition component. By responding to the status light detection request, the image acquisition component performs image acquisition on the device to be detected indicated by the status light detection request to obtain the image to be detected; the image to be detected is input into the target recognition model to identify the image to be detected, and the status information of the status light contained in the device to be detected is obtained; and the status light detection result of the device to be detected is generated based on the status information. In this way, there is no need for manual visual inspection, and the image acquisition component in the status light detection system performs image acquisition on the device to be detected, and the server in the status light detection system inputs the acquired image to be detected into the target recognition model, and the target recognition model identifies the status information of the status light contained in the device to be detected, thereby generating the status light detection result of the device to be detected based on the status information, so as to realize the fully automated detection of the status light, without relying on the personal experience of the detection personnel, and ensuring the accuracy of the detection result. At the same time, the fully automated detection is realized by the image acquisition component and the target recognition model, which can realize unmanned operation, thereby reducing the labor cost of the status light detection to a certain extent.
[0162] The present application also provides an electronic device, see Figure 7, including: a processor 3001, a memory 3002, and a computer program 30021 stored in the memory and executable on the processor, wherein the processor implements the method of the aforementioned embodiment when executing the program.
[0163] The present application also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method of the aforementioned embodiment.
[0164] The present application also provides a computer program product, including a computer program / instruction, which implements the method of the aforementioned embodiment when executed by a processor.
[0165] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0166] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the application described herein, and the description of the specific language above is for the purpose of disclosing the best mode of implementation of the application.
[0167] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0168] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0169] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0170] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the sorting device according to the present application. The present application can also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0171] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0172] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0173] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0174] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0175] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A status light detection method, It is characterized in that The method is applied to a server included in a status light detection system, wherein the status light detection system further includes an image acquisition component, and the method includes: In response to a status light detection request, the image acquisition component acquires an image of the device to be detected indicated by the status light detection request to obtain an image to be detected; Inputting the image to be detected into a target recognition model to recognize the image to be detected and obtain status information of a status light included in the device to be detected; A status light detection result of the device to be detected is generated based on the status information.
2. The method according to claim 1, It is characterized in that Before inputting the image to be detected into the target recognition model, the method further includes: Adjusting the image parameters of the image to be detected to target parameter values; the image parameters include at least one of resolution, brightness, saturation and contrast; and / or, based on the pixel value of each pixel in the image to be detected, performing color complementation on each pixel of the image to be detected; And / or, the image to be detected is rotated so that the direction of the device to be detected in the image to be detected is the target direction.
3. The method according to claim 1, It is characterized in that The device to be detected includes at least one target sub-device, and the target sub-device is a sub-device configured with at least one status light; the target recognition model is trained by the following steps: Acquire multiple sample images and sample image labels; the sample image labels are used to represent the status information of each of the target sub-devices contained in each of the sample images; Inputting the plurality of sample images into an initial image recognition model to obtain a sample recognition result of each of the sample images; Adjusting the model parameters of the initial image recognition model based on the sample recognition result and the sample image label; When the training stop condition is reached, the current initial image recognition model is determined as the target recognition model.
4. The method according to claim 3, It is characterized in that The target recognition model is obtained by training based on a training framework built by the training end; the training framework includes a first hardware layer, a first driver layer and a first container layer, the first container layer includes a first operating system layer, a first processing layer and a model layer; the model layer is the initial image recognition model, the first hardware layer is used to provide hardware resources for the model layer, the first driver layer is used to provide the model layer with a calling interface for calling the first hardware layer, the first operating system layer is used to configure resources for the model layer, and the first processing layer is used to provide a data processing library for the model layer; Before, in response to the status light detection request, performing image acquisition on the device to be detected indicated by the status light detection request through the image acquisition component, the method further includes: An identification framework is built on the server, the identification framework includes a second hardware layer, a second driver layer and a second container layer; the second container layer includes a second operating system layer, a second processing layer and an engine layer; the second hardware layer is used to provide hardware resources for the engine layer, the second driver layer is used to provide the engine layer with a calling interface for calling the second hardware layer, the second operating system layer is used to configure resources for the engine layer, the second processing layer is used to provide the engine layer with a data processing library, and the engine layer is used to run and optimize the target recognition model; The target recognition model generated by the training end is imported into the engine layer.
5. The method according to claim 1, It is characterized in that The generating a status light detection result of the device to be detected based on the status information includes: Based on the identification of the device to be detected, obtaining reference status information corresponding to the status light included in the device to be detected from a pre-built device database; In the case where the state information is consistent with the reference state information, a first detection result is generated, where the first detection result is used to indicate that the state light included in the device to be detected meets the detection requirement; In the case where the status information is inconsistent with the reference status information, a second detection result is generated, where the second detection result is used to indicate that the status light included in the device to be detected does not meet the detection requirement.
6. The method according to claim 4, It is characterized in that The server includes a first server and a second server; The step of performing image acquisition on the device to be detected indicated by the status light detection request through the image acquisition component in response to the status light detection request to obtain the image to be detected comprises: the first server performs image acquisition on the device to be detected indicated by the status light detection request through the image acquisition component in response to the status light detection request to obtain the image to be detected; The step of building an identification framework on the server includes: building an identification framework on the second server; The step of inputting the image to be detected into the target recognition model includes: the first server end transmitting the image to be detected to the target recognition model on the second server end.
7. The method according to claim 6, It is characterized in that The status light detection system further includes a driving component, a connecting component, a fixing component, a guide rail and a mounting platform; the mounting platform is used to place the device to be detected; the image acquisition component is arranged on the fixing component, the fixing component is connected to the guide rail, the guide rail is arranged on the mounting platform along a specified direction, and the connecting component is used to connect the driving component and the fixing component; The first server, in response to the status light detection request, acquires an image of the device to be detected indicated by the status light detection request through the image acquisition component to obtain an image to be detected, including: The first server obtains, in response to the status light detection request, the location information of the device to be detected indicated by the status light detection request; Sending a driving instruction to the driving component; Based on the driving component driving the connecting component according to the driving instruction, the connecting component links the fixing component to slide on the guide rail along the specified direction, and the fixing component slides to the position indicated by the position information; The image acquisition component is used to acquire an image of the device to be detected, thereby obtaining an image to be detected.
8. A status light detection device, It is characterized in that The device is applied to a server end included in a status light detection system, the status light detection system also includes an image acquisition component, and the device includes: A collection module, used for, in response to a status light detection request, collecting images of the device to be detected indicated by the status light detection request through the image collection component to obtain an image to be detected; An input module, used for inputting the image to be detected into a target recognition model to recognize the image to be detected and obtain status information of the status light included in the device to be detected; A result generating module is used to generate a status light detection result of the device to be detected based on the status information.
9. An electronic device, It is characterized in that include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A readable storage medium, It is characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described in claims 1-7.
Citation Information
Patent Citations
Machine room equipment failure detection device and method based on signal lamp recognition
CN110134111A
Equipment fault alarm method and system
CN112100039A
Indicator light state identification method
CN112364780A
Equipment state detection method and device for flicker mode indicator lamp
CN114820616A
Goods sorting method and device, computer equipment and storage medium
CN115471155A
