A tool management method and system based on artificial intelligence learning
By setting up reflective mirrors and image acquisition equipment above the tool cabinet drawers, artificial intelligence is used to identify and manage the status of tools in the tool cabinet, solving the problem of low tool cabinet management efficiency and loss, and achieving efficient tool status monitoring and recording.
Patent Information
- Application Number
- CN202410968708.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The management efficiency of existing tool cabinets is low and the problem of tool loss is prone to occur.
Using a tool management method based on artificial intelligence learning, by setting up reflective mirrors and image acquisition equipment above the tool cabinet drawer, multiple image fragments when the drawer is opened are obtained, spliced into a complete image, and combined with the pre-built full and empty images. The tool image template is used for similarity comparison, and the tool status is determined based on the comparison model.
It achieves effective identification and management of the status of tools in the tool cabinet drawer, improves the efficiency and accuracy of tool management, and saves computer computing resources.
Smart Images

Figure CN118506254B
Abstract
Description
Technical Field
[0001] The present application relates to the field of tool management technology, and specifically to a tool management method and system based on artificial intelligence learning. Background Art
[0002] Tool cabinets are cabinets for storing tools. There are many kinds of tools in tool cabinets, so it is necessary to strengthen the management of tool cabinets to avoid losing or misplacing tools.
[0003] In the prior art, tool cabinets are generally managed manually, which has low management efficiency and is prone to tool loss due to poor management. Summary of the invention
[0004] In view of this, the purpose of this application is to provide a tool management method and system based on artificial intelligence learning to solve the problems of low management efficiency and easy loss of tools in existing tool cabinets.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions:
[0006] The present application provides a tool management method and system based on artificial intelligence learning, comprising the steps of:
[0007] When a drawer of the tool cabinet is opened, a plurality of image segments of the drawer when the drawer is opened are obtained, wherein the image segments are obtained by shooting a preset reflective mirror surface tilted above the drawer by a preset camera;
[0008] splicing the image fragments to obtain a complete image;
[0009] Comparing the complete image with a pre-built fully loaded tool image template for similarity;
[0010] When the complete image and the pre-built fully loaded tool image template pass the similarity comparison, it is determined that the tools in the drawer are normal; when the complete image and the pre-built fully loaded tool image template do not pass the similarity comparison, the complete image and the pre-built empty tool image template are compared for similarity;
[0011] When the complete image and the pre-built empty tool image template pass the similarity comparison, it is determined that the tool in the drawer has been taken out; when the complete image and the pre-built empty tool image template do not pass the similarity comparison, the complete image and the pre-built fully loaded tool image template are compared for similarity based on the pre-built comparison model;
[0012] When the comparison model compares the similarity between the complete image and the pre-built image template of the unloaded tool, it determines that the tools in the drawer are normal. When the comparison model fails to compare the similarity between the complete image and the pre-built image template of the unloaded tool, it determines that the tools in the drawer are incorrectly placed.
[0013] In one embodiment of the present application, identification point strips are provided on both sides of the drawer, wherein the image fragments are spliced to obtain a complete image, including:
[0014] Determining relative positions of a plurality of image segments based on the identification point bands;
[0015] Multiple image segments with determined relative positions are stitched together to obtain a complete image.
[0016] In one embodiment of the present application, the complete image is compared with a pre-built fully loaded tool image template for similarity, or the complete image is compared with a pre-built unloaded tool image template for similarity, including:
[0017] Extracting structural features and feature histograms of the complete image; and extracting structural features and feature histograms of image templates; wherein the image template is a fully loaded tool image template or an unloaded tool image template, and the feature histogram is a histogram of color or intensity values;
[0018] Calculating a first similarity between a feature histogram of the complete image and a feature histogram of the image template, and calculating a second similarity between a structural feature of the complete image and a structural feature of the image template;
[0019] When the first similarity is greater than a preset first similarity threshold, and the second similarity is greater than a preset second similarity threshold, it is determined that the complete image has passed the similarity comparison with the pre-built fully loaded tool image template, or that the complete image has passed the similarity comparison with the pre-built empty tool image template; otherwise, it is determined that the complete image has not passed the similarity comparison with the pre-built fully loaded tool image template, or that the complete image has not passed the similarity comparison with the pre-built empty tool image template. In one embodiment of the present application, the first similarity The mathematical expression is:
[0020]
[0021] in, is the feature histogram of the complete image, is the feature histogram of the image template, is the feature histogram of the complete image. The number of pixels with the same color or intensity value, is the average number of pixels of multiple colors or intensity values in the feature histogram of the complete image, is the feature histogram of the image template The number of pixels with the same color or intensity value, It is the average number of pixels of multiple colors or intensity values in the feature histogram of the image template.
[0022] In an embodiment of the present application, the structural feature includes average brightness, standard deviation and covariance, wherein calculating the second similarity between the structural feature of the complete image and the structural feature of the image template includes:
[0023] Calculate the brightness similarity between the average brightness of the complete image and the average brightness of the image template based on the average brightness of the complete image and the average brightness of the image template;
[0024] Calculating a standard deviation similarity between the standard deviation of the complete image and the standard deviation of the image template based on the standard deviation of the complete image and the standard deviation of the image template;
[0025] Calculating the covariance similarity of the covariance of the complete image and the covariance of the image template based on the standard deviation of the complete image, the standard deviation of the image template, and the covariance;
[0026] Construct a second similarity based on the brightness similarity, the standard deviation similarity and the covariance similarity , wherein the second similarity The mathematical expression is:
[0027]
[0028] in, is the first weight, is the second weight, is the third weight, For the complete image and image templates The brightness similarity of For the complete image and image templates The standard deviation similarity of For the complete image and image templates The covariance similarity of .
[0029] In one embodiment of the present application, the brightness similarity The mathematical expression is:
[0030]
[0031] in, For the complete image The average brightness, For image template The average brightness, is the first preset constant used to prevent the denominator from being zero.
[0032] In one embodiment of the present application, the standard deviation similarity The mathematical expression is:
[0033]
[0034] in, For the complete image The standard deviation of the pixel values, For image template The standard deviation of the pixel values, is a second preset constant used to prevent the denominator from being zero.
[0035] In one embodiment of the present application, the covariance similarity The mathematical expression is:
[0036]
[0037] in, is the covariance, For the complete image The standard deviation of the pixel values, For image template The standard deviation of the pixel values, is a third preset constant used to prevent the denominator from being zero.
[0038] In one embodiment of the present application, the comparison model is obtained by training a CNN convolutional neural network, and the comparison model is used to output a similarity score between a complete image and a fully loaded tool image template, wherein the complete image and the pre-constructed fully loaded tool image template are compared for similarity based on the pre-constructed comparison model, including:
[0039] Inputting the complete image into the comparison model to obtain a similarity score;
[0040] When the similarity score is greater than a preset score threshold, it is determined that the complete image and the fully loaded tool image template pass the similarity comparison; otherwise, it is determined that the complete image and the fully loaded tool image template do not pass the similarity comparison.
[0041] The present application also provides a tool management system based on artificial intelligence learning, including:
[0042] An image acquisition module, used for acquiring a plurality of image segments of the drawer when the drawer of the tool cabinet is opened, wherein the image segments are obtained by shooting a reflective mirror surface preset and tilted above the drawer with a preset camera;
[0043] A stitching module, used for stitching the image fragments to obtain a complete image;
[0044] A first comparison module, used for performing a similarity comparison between the complete image and a pre-built fully loaded tool image template;
[0045] a second comparison module, for determining that the tools in the drawer are normal when the complete image and the pre-built fully loaded tool image template pass the similarity comparison; and for performing a similarity comparison between the complete image and the pre-built empty tool image template when the complete image and the pre-built fully loaded tool image template do not pass the similarity comparison; a third comparison module, for determining that the tools in the drawer have been taken out when the complete image and the pre-built empty tool image template pass the similarity comparison; and for performing a similarity comparison between the complete image and the pre-built fully loaded tool image template based on a pre-built comparison model when the complete image and the pre-built empty tool image template do not pass the similarity comparison;
[0046] A determination module is used to determine that the tools in the drawer are normal when the comparison model compares the similarity between the complete image and the pre-constructed image template of the unloaded tool, and to determine that the tools in the drawer are incorrectly placed when the comparison model fails to compare the similarity between the complete image and the pre-constructed image template of the unloaded tool.
[0047] The beneficial effects of the present application are as follows: a tool management method and system based on artificial intelligence learning of the present application, by setting a reflective mirror and an image acquisition device above the drawer of the tool cabinet, when the drawer is opened, the image acquisition device acquires multiple image fragments corresponding to the drawer being opened in the reflective mirror, and then splices the multiple image fragments into a complete image. The present application first compares the complete image with the full-loaded tool image template. If they are similar, it is determined that the placement of the tools in the drawer at this time is normal. If they are not similar, it is then compared with the full-loaded tool image template. If they are similar, it is determined that the tools in the drawer at this time are taken out. If they are not similar, a pre-built comparison model is used for comparison. The comparison model determines whether the tools in the drawer are placed normally or incorrectly at this time. The present application can effectively identify the status of the tools in the drawer, thereby facilitating tool management. In addition, the present application first uses image comparison, and then uses the comparison model after no results can be obtained through image comparison, which can effectively save computer computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The present application is further described below in conjunction with the accompanying drawings and embodiments:
[0049] Figure 1 It is an application scenario diagram of a tool management method based on artificial intelligence learning shown in an embodiment of the present application;
[0050] Figure 2 is a flow chart of a tool management method based on artificial intelligence learning shown in one embodiment of the present application;
[0051] Figure 3 It is a structural diagram of a tool management system based on artificial intelligence learning shown in one embodiment of the present application;
[0052] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0053] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0054] It should be noted that the illustrations provided in the following embodiments are only used to schematically illustrate the basic concept of the present application. Therefore, the drawings only show the layers related to the present application rather than being drawn according to the number, shape and size of the layers in actual implementation. In actual implementation, the type, quantity and proportion of each layer may be changed arbitrarily, and the layer layout may also be more complicated.
[0055] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present application; however, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details.
[0056] Figure 1 is an application scenario diagram of a tool management method based on artificial intelligence learning shown in an embodiment of the present application, such as Figure 1As shown, the core components in the present application include a first color array camera 1, a second color array camera 2, a reflector 4, a strip light source 3, a light strip 5 and two identification point strips 6. The system synchronously collects image data of each drawer 7 of the tool cabinet through the first color array camera 1, the second color array camera 2 and the reflector 4, and uses the identification point strip 6 to perform image stitching to generate a complete image of the interior of the drawer 7. After the image data is uploaded to the host, it is analyzed by a deep learning algorithm to identify the removal or return of the tool, and combined with other modules to record user information, including specific tool operation time and operation object. The system has the functions of high-precision recognition, real-time monitoring and detailed recording, and is suitable for places such as industrial production workshops, laboratories and maintenance stations that require strict tool management, effectively improving the efficiency and accuracy of tool management.
[0057] Figure 2 is a flowchart of a tool management method based on artificial intelligence learning shown in an embodiment of the present application. Figure 2 As shown: A tool management method based on artificial intelligence learning in this embodiment includes the following steps:
[0058] S210, when a drawer of the tool cabinet is opened, obtaining a plurality of image segments of the drawer when the drawer is opened, wherein the image segments are obtained by shooting a preset reflective mirror surface tilted above the drawer by a preset camera;
[0059] Please combine Figure 1 For reference, when the user opens the tool cabinet drawer 7, the system automatically starts the internal strip light source 3 and light strip 5. The light source will remain on during the entire process of opening the drawer 7 to ensure uniform and sufficient light during image acquisition. This design ensures the quality of image data and avoids image blur or data loss caused by insufficient light;
[0060] The two area array cameras 1 and 2 start working at the same time when the drawer 7 is opened, and record image data through the reflective mirror 4, thereby obtaining multiple image segments. Each image segment is obtained by taking a single shot by the camera. By taking multiple shots, the entire process of the drawer 7 being opened can be recorded.
[0061] S220, stitching the image segments to obtain a complete image;
[0062] In the present application, dot bands for positioning are provided on both sides of the drawer 7, so the present application determines the relative positions of multiple image segments based on the identification dot bands; the multiple image segments with determined relative positions are spliced to obtain a complete image.
[0063] That is, the system processes the collected image data, identifies and locates the identification point strips 6 installed on both sides of the drawer 7 in the image. These identification point strips provide position information, and the system splices the image data into a complete picture of the interior of the drawer 7 according to the regularity of the preset arrangement of these point strip information.
[0064] For the stitched complete picture, this application first performs grayscale processing to make the contrast of the image data more prominent to highlight the outline and details of the tool. Subsequently, Gaussian blur processing is performed to reduce noise and interference in the image, further improving the clarity and recognition accuracy of the image. This processing step lays a good foundation for further analysis and comparison of the image.
[0065] S230, performing a similarity comparison between the complete image and a pre-built fully loaded tool image template;
[0066] S240, when the complete image and the pre-built fully loaded tool image template pass the similarity comparison, determine that the tools in the drawer are normal; when the complete image and the pre-built fully loaded tool image template do not pass the similarity comparison, perform a similarity comparison between the complete image and the pre-built unloaded tool image template;
[0067] For the comparison between the complete image and the fully loaded tool image template, or for the comparison between the complete image and the unloaded tool image template, this application uses color histogram (HSV) comparison and structural similarity (SSIM) method for similarity comparison.
[0068] The histogram algorithm provides information about the color characteristics of an image by counting the distribution of each color value in the image. It can be used to measure the similarity between two images in color distribution, and then can be used to compare image similarity. Therefore, the histogram algorithm is an image similarity algorithm, usually a one-dimensional array (depending on the number of channels used), in which each element represents the number of pixels of a specific color or intensity value.
[0069] SSIM (Structural Similarity Index Measure) is a pointer to evaluate the similarity between two images. This pointer measures the visual similarity between images by comparing three dimensions: brightness, contrast, and structure, to provide an effective measure that reflects human visual perception.
[0070] Through the above comparison, the image data is scored respectively. The higher the similarity, the higher the score. Then it is determined whether the scores exceed the respective preset thresholds. If both scores are higher than the threshold, the system determines that the tools in the drawer are placed normally.
[0071] For the convenience of description, this application refers to the fully loaded tool image template or the unloaded tool image template as an image template. The specific comparison method is as follows:
[0072] S241, extracting the structural features and feature histogram of the complete image; and extracting the structural features and feature histogram of the image template; wherein the image template is a fully loaded tool image template or an unloaded tool image template, and the feature histogram is a histogram of color or intensity values;
[0073] The structural features include average brightness, standard deviation, and the covariance of the two. The average brightness can be directly extracted using existing tools. The standard deviation can be the standard deviation of the pixel values of each channel or the standard deviation of the grayscale value. The standard deviation can be calculated by directly calling the existing calculation formula, such as directly using the std function of NumPy to calculate the standard deviation of all pixel values.
[0074] Covariance is a statistic used to measure the overall error in pixel values between two images. You can also directly call a function to calculate it, for example, you can use the np.cov function to calculate covariance. You can also use the following formula to calculate covariance:
[0075]
[0076] For the complete image and image templates The covariance of For the complete image The pixel value of a pixel, is the average pixel value of all pixels in the complete image, The image template The pixel value of a pixel, is the pixel average of all pixels of the image template, For the complete image and image templates The number of pixels.
[0077] S242, calculating a first similarity between a feature histogram of the complete image and a feature histogram of the image template, and calculating a second similarity between a structural feature of the complete image and a structural feature of the image template;
[0078] Among them, the first similarity The mathematical expression is:
[0079]
[0080] in, is the feature histogram of the complete image, is the feature histogram of the image template, is the feature histogram of the complete image. The number of pixels with the same color or intensity value, is the average number of pixels of multiple colors or intensity values in the feature histogram of the complete image, is the feature histogram of the image template The number of pixels with the same color or intensity value, It is the average number of pixels of multiple color or intensity values in the feature histogram of the image template.
[0081] The calculation process of the second similarity is as follows:
[0082] S2421, calculating the brightness similarity between the average brightness of the complete image and the average brightness of the image template based on the average brightness of the complete image and the average brightness of the image template; the brightness similarity The mathematical expression is:
[0083]
[0084] in, For the complete image The average brightness, For image template The average brightness, is the first preset constant used to prevent the denominator from being zero.
[0085] S2422, calculating the standard deviation similarity of the standard deviation of the complete image and the standard deviation of the image template based on the standard deviation of the complete image and the standard deviation of the image template; the standard deviation similarity The mathematical expression is:
[0086]
[0087] in, For the complete image The standard deviation of the pixel values, For image template The standard deviation of the pixel values, is a second preset constant used to prevent the denominator from being zero.
[0088] S2423, calculating the covariance similarity of the covariance of the complete image and the covariance similarity of the image template based on the standard deviation of the complete image, the standard deviation of the image template, and the covariance; the covariance similarity The mathematical expression is:
[0089]
[0090] in, is the covariance, For the complete image The standard deviation of the pixel values, For image template The standard deviation of the pixel values, is a third preset constant used to prevent the denominator from being zero. Usually take , in order to stabilize the calculation results.
[0091] S2424: construct a second similarity based on the brightness similarity, the standard deviation similarity, and the covariance similarity. , wherein the second similarity The mathematical expression is:
[0092]
[0093] in, is the first weight, is the second weight, is the third weight. Usually, these three parameters are set to 1, simplifying Calculation.
[0094] For the complete image and image templates The brightness similarity of For the complete image and image templates The standard deviation similarity of For the complete image and image templates The covariance similarity of .
[0095] S243, when the first similarity is greater than a preset first similarity threshold and the second similarity is greater than a preset second similarity threshold, it is determined that the complete image passes the similarity comparison with the pre-constructed fully loaded tool image template, or the complete image passes the similarity comparison with the pre-constructed unloaded tool image template; otherwise, it is determined that the complete image fails to pass the similarity comparison with the pre-constructed fully loaded tool image template, or the complete image fails to pass the similarity comparison with the pre-constructed unloaded tool image template.
[0096] S250, when the complete image and the pre-built empty tool image template pass the similarity comparison, it is determined that the tool in the drawer has been taken out; when the complete image and the pre-built empty tool image template do not pass the similarity comparison, the complete image and the pre-built fully loaded tool image template are compared for similarity based on a pre-built comparison model;
[0097] In the present application, the comparison model is obtained by training the CNN convolutional neural network, and the comparison model is used to output the similarity score between the complete image and the fully loaded tool image template. The convolutional neural network in the present application is ResNet50 (Residual Network, 50 layers). ResNet50 is a deep convolutional neural network (CNN) that is widely used in various computer vision tasks, including image classification, target detection, image segmentation, etc. ResNet50 solves the degradation problem of deep neural networks by introducing residual learning, so that the network can be trained at a deeper level without performance degradation. In each residual block, the input data is not only processed by a series of convolution and activation functions, but also directly added to the output result. Expressed as:
[0098]
[0099] in, Represents the operation result of the convolutional layer, x is the input data, y is the output of the residual block, is the weight of the residual block in the i-th layer.
[0100] ResNet50 contains 50 layers of depth, including multiple residual blocks. These layers can be divided into: initial convolutional layers and pooling layers; 4 residual modules (each module contains multiple residual blocks), the number and size of convolutional layers in each module are different; the final global average pooling layer and fully connected layer, at the end of the network, after the global average pooling layer and fully connected layer for classification.
[0101] In this application, ResNet50 is trained by constructing sample training, so that the similarity between the complete image and the pre-built fully loaded tool image template can be compared to obtain a similarity score.
[0102] In the present application, the complete image is input into the comparison model to obtain a similarity score; when the similarity score is greater than a preset score threshold, it is determined that the complete image and the fully loaded tool image template have passed the similarity comparison; otherwise, it is determined that the complete image and the fully loaded tool image template have not passed the similarity comparison.
[0103] S260, when the comparison model compares the similarity between the complete image and the pre-constructed image template of the unloaded tool, it determines that the tools in the drawer are normal; when the comparison model fails to compare the similarity between the complete image and the pre-constructed image template of the unloaded tool, it determines that the tools in the drawer are incorrectly placed.
[0104] The present application discloses a tool management method based on artificial intelligence learning. By setting a reflective mirror and an image acquisition device above the drawer of the tool cabinet, when the drawer is opened, the image acquisition device acquires multiple image fragments corresponding to the drawer being opened in the reflective mirror, and then splices the multiple image fragments into a complete image. The present application first compares the complete image with the full-loaded tool image template. If they are similar, it is determined that the placement of the tools in the drawer at this time is normal. If they are not similar, it is then compared with the full-loaded tool image template. If they are similar, it is determined that the tools in the drawer at this time are taken out. If they are not similar, a pre-built comparison model is used for comparison. The comparison model determines whether the tools in the drawer are placed normally or incorrectly at this time. The present application can effectively identify the status of the tools in the drawer, thereby facilitating tool management. In addition, the present application first uses image comparison, and then uses the comparison model after no results can be obtained through image comparison, which can effectively save computer computing resources.
[0105] like Figure 3 As shown, the present application also provides a tool management system based on artificial intelligence learning, including:
[0106] An image acquisition module 310 is used to obtain a plurality of image segments of the drawer when the drawer of the tool cabinet is opened, wherein the image segments are obtained by shooting a preset reflective mirror surface tilted above the drawer with a preset camera;
[0107] A stitching module 320 is used to stitch the image segments to obtain a complete image;
[0108] A first comparison module 330 is used to compare the complete image with a pre-built fully loaded tool image template for similarity;
[0109] The second comparison module 340 is used to determine that the tools in the drawer are normal when the complete image and the pre-built fully loaded tool image template pass the similarity comparison; when the complete image and the pre-built fully loaded tool image template do not pass the similarity comparison, perform a similarity comparison between the complete image and the pre-built unloaded tool image template;
[0110] The third comparison module 350 is used to determine that the tools in the drawer have been taken out when the complete image and the pre-built empty tool image template pass the similarity comparison; when the complete image and the pre-built empty tool image template do not pass the similarity comparison, perform a similarity comparison between the complete image and the pre-built fully loaded tool image template based on a pre-built comparison model;
[0111] The judgment module 360 is used to judge that the tools in the drawer are normal when the comparison model compares the similarity between the complete image and the pre-constructed image template of the unloaded tool, and to judge that the tools in the drawer are incorrectly placed when the comparison model fails to compare the similarity between the complete image and the pre-constructed image template of the unloaded tool.
[0112] The present application discloses a tool management system based on artificial intelligence learning. By setting a reflective mirror and an image acquisition device above the drawer of a tool cabinet, when the drawer is opened, the image acquisition device acquires multiple image fragments corresponding to the drawer being opened in the reflective mirror, and then splices the multiple image fragments into a complete image. The present application first compares the complete image with the full-loaded tool image template. If they are similar, it is determined that the tools in the drawer are placed normally at this time. If they are not similar, it is then compared with the full-loaded tool image template. If they are similar, it is determined that the tools in the drawer are taken out at this time. If they are not similar, a pre-built comparison model is used for comparison. The comparison model determines whether the tools in the drawer are placed normally or incorrectly at this time. The present application can effectively identify the status of the tools in the drawer, thereby facilitating tool management. In addition, the present application first uses image comparison, and then uses the comparison model when no result can be obtained through image comparison, which can effectively save computer computing resources.
[0113] Figure 4 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application. Figure 4As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 404, such as executing the method in the above embodiment. In RAM 403, various programs and data required for system operation are also stored. CPU 401, ROM 402 and RAM 403 are connected to each other through bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0114] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0115] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, various functions defined in the system of the present application are executed.
[0116] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0117] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0119] Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the above method. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0120] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in each of the above embodiments.
[0121] The above embodiments are only preferred embodiments for fully illustrating the present application, and the protection scope of the present application is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present application is within the protection scope of the present application.
Claims
1. A tool management method based on artificial intelligence learning, It is characterized in that include: When a drawer of the tool cabinet is opened, a plurality of image segments of the drawer when the drawer is opened are obtained, wherein the image segments are obtained by shooting a preset reflective mirror surface tilted above the drawer by a preset camera; The image fragments are stitched together to obtain a complete image; and the complete image is compared with a pre-constructed fully loaded tool image template for similarity, or the complete image is compared with a pre-constructed unloaded tool image template for similarity, including: Extract the structural features and feature histogram of the complete image; and extract the structural features and feature histogram of the image template; wherein the image template is a fully loaded tool image template or an unloaded tool image template, and the feature histogram is a histogram of color or intensity values; calculate a first similarity between the feature histogram of the complete image and the feature histogram of the image template, and calculate a second similarity between the structural features of the complete image and the structural features of the image template; when the first similarity is greater than a preset first similarity threshold, and the second similarity is greater than a preset second similarity threshold, determine that the complete image and the pre-constructed fully loaded tool image template pass the similarity comparison, or determine that the complete image and the pre-constructed unloaded tool image template pass the similarity comparison; otherwise, determine that the complete image and the pre-constructed fully loaded tool image template do not pass the similarity comparison, or determine that the complete image and the pre-constructed unloaded tool image template do not pass the similarity comparison; the first similarity The mathematical expression is: in, is the feature histogram of the complete image, is the feature histogram of the image template, is the feature histogram of the complete image. The number of pixels with the same color or intensity value, is the average number of pixels of multiple colors or intensity values in the feature histogram of the complete image, is the feature histogram of the image template. The number of pixels with the same color or intensity value, is the average value of the number of pixels of multiple colors or intensity values in the feature histogram of the image template; the structural features include average brightness, standard deviation and covariance, wherein calculating the second similarity between the structural features of the complete image and the structural features of the image template includes: calculating the brightness similarity between the average brightness of the complete image and the average brightness of the image template based on the average brightness of the complete image and the average brightness of the image template; calculating the standard deviation similarity between the standard deviation of the complete image and the standard deviation of the image template based on the standard deviation of the complete image and the standard deviation of the image template; calculating the covariance similarity between the covariance of the complete image and the covariance of the image template based on the standard deviation of the complete image, the standard deviation of the image template and the covariance; constructing a second similarity based on the brightness similarity, the standard deviation similarity and the covariance similarity , wherein the second similarity The mathematical expression is: in, is the first weight, is the second weight, is the third weight, For the complete image and image templates The brightness similarity of For the complete image and image templates The standard deviation similarity of For the complete image and image templates Covariance similarity of ; Comparing the complete image with a pre-built fully loaded tool image template for similarity; When the complete image and the pre-built fully loaded tool image template pass the similarity comparison, it is determined that the tools in the drawer are normal; when the complete image and the pre-built fully loaded tool image template do not pass the similarity comparison, the complete image and the pre-built empty tool image template are compared for similarity; When the complete image and the pre-built empty tool image template pass the similarity comparison, it is determined that the tool in the drawer has been taken out; when the complete image and the pre-built empty tool image template do not pass the similarity comparison, the complete image and the pre-built fully loaded tool image template are compared for similarity based on the pre-built comparison model; When the comparison model compares the complete image with the pre-built fully loaded tool image template by similarity, it determines that the tools in the drawer are normal. When the comparison model fails to compare the complete image with the pre-built fully loaded tool image template by similarity, it determines that the tools in the drawer are incorrectly placed.
2. According to the tool management method based on artificial intelligence learning as claimed in claim 1, It is characterized in that The drawer is provided with identification point strips on both sides, wherein the image fragments are spliced to obtain a complete image, including: Determining relative positions of a plurality of image segments based on the identification point bands; Multiple image segments with determined relative positions are stitched together to obtain a complete image.
3. According to the tool management method based on artificial intelligence learning as claimed in claim 1, It is characterized in that The brightness similarity The mathematical expression is: in, For the complete image The average brightness, For image template The average brightness, is the first preset constant used to prevent the denominator from being zero.
4. According to the tool management method based on artificial intelligence learning as claimed in claim 1, It is characterized in that The standard deviation similarity The mathematical expression is: in, For the complete image The standard deviation of the pixel values, For image template The standard deviation of the pixel values, is a second preset constant used to prevent the denominator from being zero.
5. According to the tool management method based on artificial intelligence learning as claimed in claim 1, It is characterized in that The covariance similarity The mathematical expression is: in, is the covariance, For the complete image The standard deviation of the pixel values, For image template The standard deviation of the pixel values, is a third preset constant used to prevent the denominator from being zero.
6. According to the tool management method based on artificial intelligence learning as claimed in claim 1, It is characterized in that The comparison model is obtained by training a CNN convolutional neural network, and the comparison model is used to output a similarity score between a complete image and a fully loaded tool image template, wherein the complete image and the pre-constructed fully loaded tool image template are compared for similarity based on the pre-constructed comparison model, including: Inputting the complete image into the comparison model to obtain a similarity score; When the similarity score is greater than a preset score threshold, it is determined that the complete image and the fully loaded tool image template pass the similarity comparison; otherwise, it is determined that the complete image and the fully loaded tool image template do not pass the similarity comparison.
7. A tool management system based on artificial intelligence learning, It is characterized in that include: An image acquisition module, used for acquiring a plurality of image segments of the drawer when the drawer of the tool cabinet is opened, wherein the image segments are obtained by shooting a reflective mirror surface preset and tilted above the drawer with a preset camera; A stitching module, used for stitching the image fragments to obtain a complete image; The first comparison module is used to stitch the image fragments to obtain a complete image; and compare the complete image with a pre-constructed fully loaded tool image template for similarity, or compare the complete image with a pre-constructed unloaded tool image template for similarity, including: Extract the structural features and feature histogram of the complete image; and extract the structural features and feature histogram of the image template; wherein the image template is a fully loaded tool image template or an unloaded tool image template, and the feature histogram is a histogram of color or intensity values; calculate a first similarity between the feature histogram of the complete image and the feature histogram of the image template, and calculate a second similarity between the structural features of the complete image and the structural features of the image template; when the first similarity is greater than a preset first similarity threshold, and the second similarity is greater than a preset second similarity threshold, determine that the complete image and the pre-constructed fully loaded tool image template pass the similarity comparison, or determine that the complete image and the pre-constructed unloaded tool image template pass the similarity comparison; otherwise, determine that the complete image and the pre-constructed fully loaded tool image template do not pass the similarity comparison, or determine that the complete image and the pre-constructed unloaded tool image template do not pass the similarity comparison; the first similarity The mathematical expression is: in, is the feature histogram of the complete image, is the feature histogram of the image template, is the feature histogram of the complete image. The number of pixels with the same color or intensity value, is the average number of pixels of multiple colors or intensity values in the feature histogram of the complete image, is the feature histogram of the image template. The number of pixels with the same color or intensity value, is the average value of the number of pixels of multiple colors or intensity values in the feature histogram of the image template; the structural features include average brightness, standard deviation and covariance, wherein calculating the second similarity between the structural features of the complete image and the structural features of the image template includes: calculating the brightness similarity between the average brightness of the complete image and the average brightness of the image template based on the average brightness of the complete image and the average brightness of the image template; calculating the standard deviation similarity between the standard deviation of the complete image and the standard deviation of the image template based on the standard deviation of the complete image and the standard deviation of the image template; calculating the covariance similarity between the covariance of the complete image and the covariance of the image template based on the standard deviation of the complete image, the standard deviation of the image template and the covariance; constructing a second similarity based on the brightness similarity, the standard deviation similarity and the covariance similarity , wherein the second similarity The mathematical expression is: in, is the first weight, is the second weight, is the third weight, For the complete image and image templates The brightness similarity of For the complete image and image templates The standard deviation similarity of For the complete image and image templates Covariance similarity of ; A second comparison module is used to determine that the tools in the drawer are normal when the complete image and the pre-built fully loaded tool image template pass the similarity comparison; when the complete image and the pre-built fully loaded tool image template do not pass the similarity comparison, perform a similarity comparison between the complete image and the pre-built unloaded tool image template; a third comparison module, configured to determine that the tool in the drawer has been taken out when the complete image and the pre-built empty tool image template pass the similarity comparison; and to compare the complete image with the pre-built fully loaded tool image template based on a pre-built comparison model when the complete image and the pre-built empty tool image template do not pass the similarity comparison. A determination module is used to determine that the tools in the drawer are normal when the comparison model compares the similarity between the complete image and the pre-constructed fully loaded tool image template, and to determine that the tools in the drawer are incorrectly placed when the comparison model fails to compare the similarity between the complete image and the pre-constructed fully loaded tool image template.
Citation Information
Patent Citations
Control identification method, related device, equipment and storage medium
CN112162930A
Cutter detection method and device, computer equipment and storage medium
CN113870207A
Tool verification method and system, computer equipment and storage medium
CN115294447A
Visual identification method for existence state of tools in tool cabinet
CN115471769A
Method, equipment and system for detecting burrs on edge of battery pole piece
CN116703803A
