Device identification and matching model training method, device identification and matching method and device
By building an information management model and a deep learning algorithm, training the device recognition model, and generating a double-layer dictionary, the problem of low device recognition and matching accuracy is solved, and efficient and accurate device status and name matching is achieved, adapting to different lighting and angle conditions.
Patent Information
- Application Number
- CN202410710619.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Existing device identification methods have low identification and matching accuracy in complex environments, are greatly affected by changes in illumination and angles, lack intelligence and automation, lead to low efficiency and reduced accuracy, and require a large amount of manual annotation of data.
By building an information management model, training image collection classification models and device category block object image clustering models, a double-layer dictionary is generated to achieve efficient recognition and matching of device target states and names, and deep learning algorithms are used to improve recognition accuracy.
It improves the accuracy of device identification and matching, reduces the burden of manual annotation of data, enhances processing efficiency and accuracy, and can effectively identify and match device status and name under different lighting and angle conditions.
Smart Images

Figure CN118298201B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer recognition processing, and in particular to a device recognition matching model training method, a device recognition matching method and a device. Background Art
[0002] In the field of image processing and computer vision, device status recognition and device name matching in images is a challenging task. Existing methods rely on manual operations, which are inefficient and prone to errors; the processing process is time-consuming, especially in the case of a large number of devices; the accuracy is reduced due to changes in lighting and angles; the lack of intelligence and automation can only achieve simple status recognition and name matching; and a large amount of manual annotation data is required, which increases the workload.
[0003] In the process of realizing the present invention, the inventors realized that the prior art has at least the following technical problems: traditional methods often encounter problems such as low recognition rate of device identification boxes and inability to sort the position order, resulting in difficulty in matching device status and device name, and low recognition and matching accuracy. Summary of the invention
[0004] The embodiments of the present invention provide a device identification and matching model training method, a device identification and matching method, a device, a computer device and a storage medium to improve the accuracy of device identification and matching in a complex environment.
[0005] In order to solve the above technical problems, the present application embodiment provides a device identification matching model training method, including:
[0006] Constructing an information management model, and collecting pictures based on the information management model to obtain collected picture data;
[0007] Training a picture acquisition classification model, using the picture acquisition classification model to classify the acquired picture data, obtaining classification results and picture data of each acquisition category, and using the above results and data to construct a first dictionary;
[0008] Training the device category block object image clustering model and the device category block object segmentation and recognition model, for each type of image data collected, using the device category block object image clustering model to perform category block clustering on the image data of the collected category to obtain clustering results, and based on the clustering results, using the device category block object segmentation and recognition model to perform category block segmentation and recognition on the image data of the collected category to obtain category block recognition results, category block segmentation results and recognition box positions;
[0009] Based on the category block segmentation results, the device target state recognition model is used to obtain the state and target frame position of each device target in the captured image;
[0010] Based on the category block recognition result, the recognition box position and the first dictionary, a double-layer dictionary is constructed, and the double-layer dictionary is used as a second dictionary;
[0011] Generate a final recognition dictionary based on the second dictionary, the device target state and the target frame position of the image as a third dictionary;
[0012] A target device recognition matching model is generated by cross-fusion based on the third dictionary and the corresponding image.
[0013] Optionally, collecting pictures based on the information management model to obtain collected picture data includes:
[0014] The images are collected through the state matching system and stored according to the camera identification number;
[0015] The first dictionary is established by using a state matching system based on the classification results obtained by the image acquisition classification model and the device names and all state conditions in reality.
[0016] Optionally, the image acquisition classification model, the device category block object segmentation recognition model, the device category block object image clustering model and the device target state recognition model are deep learning models.
[0017] Optionally, constructing a double-layer dictionary based on the category block recognition result, the recognition box position and the first dictionary, and using the double-layer dictionary as the second dictionary includes:
[0018] The first dictionary is divided into two layers, one layer is the classification result obtained by the image acquisition classification model, that is, the device category block, and the other layer is the status and name of the device target under each device category block;
[0019] Segment the image using the device category block object segmentation and recognition model to obtain the segmented image and the position of the recognition frame;
[0020] The positions of the recognition boxes are sorted according to the fuzzy sorting to form a double-layer dictionary.
[0021] Optionally, the sorting of the recognition box positions according to the fuzzy sorting to form a double-layer dictionary includes:
[0022] Sort the recognition boxes from top to bottom and from left to right to obtain a sorted sequence;
[0023] The two values of the Y axis of the first recognition frame in the sorting sequence are defined as default values, and the subsequent recognition frames are compared in sequence. When the maximum value or the minimum value of the recognition frame is within the range, the recognition frames are judged to be in the same row, and the row where each recognition frame is located is determined to obtain a final sorting result, wherein the Y axis of each row is from small to large, and the X axis of each recognition frame in each row is from small to large;
[0024] Based on the final sorting result, the double-layer dictionary is constructed.
[0025] In order to solve the above technical problems, the present application provides a device identification and matching method, including:
[0026] Receiving an image to be recognized;
[0027] The target device recognition and matching model is used to perform recognition and matching on the image to be recognized to obtain a recognition and matching result.
[0028] In order to solve the above technical problems, the embodiment of the present application further provides a device identification matching model training device, including:
[0029] A first dictionary construction module is used to construct an information management model, and collect pictures based on the information management model to obtain collected picture data, use the picture data to train a picture collection classification model, use the picture collection classification model to classify the collected picture data, obtain classification results and picture data of each collection category, and use the above results and data to construct a first dictionary;
[0030] The image classification and segmentation module is used to train the image acquisition classification model, classify the acquired image data using the image acquisition classification model, and obtain the classification results and the image data of each acquisition category;
[0031] A category classification and segmentation module is used to train a device category block object image clustering model and a device category block object segmentation and recognition model. For each type of image data collected, the device category block object image clustering model is used to perform category block clustering on the image data of the collected category to obtain a clustering result. Based on the clustering result, the device category block object segmentation and recognition model is used to perform category block segmentation and recognition on the image data of the collected category to obtain a category block recognition result, a category block segmentation result and a recognition frame position.
[0032] The state and position recognition module is used to obtain the state and target frame position of each device target in the collected image based on the category block segmentation result and using the device target state recognition model;
[0033] A second dictionary generation module, configured to construct a double-layer dictionary based on the category block recognition result, the recognition frame position and the first dictionary, and use the double-layer dictionary as a second dictionary;
[0034] A third dictionary generation module, used to generate a final recognition dictionary as a third dictionary based on the second dictionary, the device target state and the target frame position of the picture;
[0035] The target model generation module is used to generate a target device recognition matching model by cross-fusion based on the third dictionary and the corresponding image.
[0036] Optionally, the first dictionary building module includes:
[0037] A collection unit, used to collect pictures through a state matching system and store them according to the camera identification number;
[0038] A construction unit is used to establish the first dictionary using a state matching system according to the classification results obtained by the image acquisition classification model and the device names and all state conditions in the actual situation.
[0039] Optionally, the second dictionary generating module includes:
[0040] A stratification unit, used to divide the first dictionary into two layers, one layer is the classification result obtained by the image acquisition classification model, that is, the device category block, and the other layer is the status and name of the device target under each device category block;
[0041] A segmentation unit, used to segment the image using the device category block object segmentation and recognition model to obtain the segmented image and the position of the recognition frame;
[0042] The sorting unit is used to sort the positions of the recognition boxes according to the fuzzy sorting to form a double-layer dictionary.
[0043] Optionally, the sorting unit includes:
[0044] A first sorting subunit is used to sort the recognition frames from top to bottom and from left to right to obtain a sorting sequence;
[0045] The second sorting subunit is used to define the two values of the Y axis of the first identification box in the sorting sequence as default values, compare the subsequent identification boxes in sequence, and determine that the identification boxes are in the same row when the maximum value or the minimum value is within the range, determine the row where each identification box is located, and obtain a final sorting result, wherein the Y axis of each row is from small to large, and the X axis of each identification box in each row is from small to large;
[0046] A dictionary construction unit is used to construct the double-layer dictionary based on the final sorting result.
[0047] In order to solve the above technical problems, the embodiment of the present application further provides a device identification and matching apparatus, including:
[0048] A receiving module, used for receiving an image to be identified;
[0049] The recognition module is used to use the target device recognition and matching model to perform recognition and matching on the image to be recognized to obtain a recognition and matching result.
[0050] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned device identification and matching model training method when executing the computer program, or implements the steps of the above-mentioned device identification and matching method when executing the computer program.
[0051] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned device identification and matching model training method, or when the computer program is executed by a processor, it implements the steps of the above-mentioned device identification and matching method.
[0052] The device identification matching model training method, device identification matching method, apparatus, computer equipment and storage medium provided by the embodiment of the present invention build an information management model, collect pictures based on the information management model to obtain collected picture data, use the collected picture data to train the picture collection classification model, use the picture collection classification model to classify the collected picture data to obtain classification results and picture data of each collected category, and use the above results and data to build a first dictionary; train a device category block object image clustering model and a device category block object segmentation recognition model, for each collected category of picture data, use the device category block object image clustering model to perform category block clustering on the collected category picture data to obtain clustering results, and use the device category block object segmentation recognition model based on the clustering results to perform category block segmentation recognition on the collected category picture data to obtain category block recognition results, category block segmentation results and recognition frame positions; build a double-layer dictionary based on the category block recognition results, recognition frame positions and the first dictionary, and use the double-layer dictionary as the second dictionary; generate a final recognition dictionary based on the second dictionary, the device target state of the picture and the target frame position as the third dictionary; and cross-fuse the third dictionary and the corresponding picture to generate a target device identification matching model. Through deep learning algorithms, high-efficiency and high-precision device status recognition and device name matching are achieved, which can cope with recognition and matching under different lighting and angle conditions, reducing the burden of manual data annotation and improving processing efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0054] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0055] Figure 2 is a flow chart of an embodiment of the device identification matching model training method of the present application;
[0056] Figure 3 is a flow chart of an embodiment of the device identification and matching method of the present application;
[0057] Figure 4 is a structural schematic diagram of an embodiment of a device identification and matching model training apparatus according to the present application;
[0058] Figure 5 is a structural schematic diagram of an embodiment of a device identification and matching apparatus according to the present application;
[0059] Figure 6 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0061] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] See also Figure 1 ,like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0064] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc.
[0065] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0066] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0067] It should be noted that the device identification and matching model training method provided in the embodiment of the present application is executed by a server, and accordingly, the device identification and matching model training device is arranged in the server.
[0068] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application may specifically correspond to application systems in actual production.
[0069] See also Figure 2 , Figure 2 A device identification matching model training method provided by an embodiment of the present invention is shown, and the method is applied in Figure 1 The server in is used as an example to illustrate the details as follows:
[0070] S201: construct an information management model, and collect pictures based on the information management model to obtain collected picture data.
[0071] In a specific optional implementation, in step S201, collecting pictures based on the information management model to obtain collected picture data includes:
[0072] The images are collected through the state matching system and stored according to the camera identification number;
[0073] Specifically, the status matching system for user registration and login is managed according to the software and hardware system information management model, and software information, device information and user information are managed separately, a status matching system for existing software is established and managed, and a status matching system for newly developed software is managed.
[0074] In the cloud backend, record the user's relevant information, including but not limited to the user account password, device configuration, unique number, operating language, camera IP and port number and storage space;
[0075] Images are collected through the state matching system and stored according to the camera identification number.
[0076] S202: training a picture collection classification model, using the picture collection classification model to classify the collected picture data, obtaining classification results and picture data of each collection category, and constructing a first dictionary using the above results and data.
[0077] Specifically, the picture acquisition classification model is enabled, and according to a round of acquisition data of different camera positions, the pictures are classified into different scenes by using the conditions of highly similar categories within the categories and highly exclusive categories between the categories;
[0078] Then, according to the different classification scenarios as initial data, the image collection classification model is used to classify the next round of collected image data, and the wrongly classified images of the two rounds of classification are compared and fed back to the user. The user makes corrections based on the actual situation and repeats the above operations. When the error rate of the two classifications is less than 10%, the current image collection category classification model is saved and used for classification in the future;
[0079] A first dictionary is established using a state matching system according to the classification results of the above model, the device names in reality, and all state conditions;
[0080] If the user has higher requirements for accuracy, the above correction process can be repeated until the user is satisfied.
[0081] S203: Train the device category block object image clustering model and the device category block object segmentation and recognition model. For each type of image data collected, use the device category block object image clustering model to perform category block clustering on the image data of the collected category to obtain clustering results. Based on the clustering results, use the device category block object segmentation and recognition model to perform category block segmentation and recognition on the image data of the collected category to obtain category block recognition results, category block segmentation results and recognition box positions.
[0082] Based on the pictures collected by the camera in each round, the device category block object image clustering model is used to randomly establish recognition frames on each picture. The recognition frames cannot overlap.
[0083] All recognition frames are intercepted and classified. The classification basis is that highly similar categories within a category are highly exclusive, and the categories of the device category block should be as few as possible. All the intercepted recognition frames are classified into different device category blocks.
[0084] Use different types of equipment category blocks as initial data, use the equipment category block object segmentation recognition model and the object image clustering model for classification, compare the misclassified images of the two categories, and feedback to the user. The user makes corrections based on the actual situation and repeats the above operations. When the error rate of the two categories is less than 10%, save the current equipment category block object segmentation recognition model and use it for classification later;
[0085] If the user has higher requirements for accuracy, the above correction process can be repeated until the user is satisfied.
[0086] S204: Based on the category block segmentation result, a device target state recognition model is used to obtain the state and target frame position of each device target in the captured image.
[0087] Specifically, based on the category block segmentation result, the device target state recognition model is used to obtain the state and target frame position of each device target in the captured image.
[0088] The collected images are classified according to the information of the initial dictionary. The user labels the images according to the information of the dictionary, starts the device target state recognition model, and generates results.
[0089] The user checks the results and makes corrections based on the actual situation. The device target state recognition model is iterated repeatedly. When the error rate of the user check is less than 10%, the device target state recognition model is saved and used later to determine the state and recognition frame position of each device target in the image.
[0090] If the user has higher requirements for accuracy, the above correction process can be repeated until the user is satisfied.
[0091] Optionally, the picture acquisition classification model, the device category block object segmentation recognition model, the device category block object image clustering model and the device target state recognition model are deep learning models.
[0092] S205: constructing a double-layer dictionary based on the category block recognition result, the recognition box position and the first dictionary, and using the double-layer dictionary as the second dictionary.
[0093] In a specific optional implementation, in step S205, a double-layer dictionary is constructed based on the category block recognition result, the recognition box position and the first dictionary, and the double-layer dictionary is used as the second dictionary including:
[0094] The first dictionary is divided into two layers: one layer is the classification result obtained by the image acquisition classification model, that is, the device category block, and the other layer is the status and name of the device target under each device category block;
[0095] Use the device target state recognition model to segment the image and obtain the segmented image and segmentation frame position;
[0096] The positions of the recognition boxes are sorted according to the fuzzy sorting to form a double-layer dictionary.
[0097] In a specific optional implementation, the positions of the recognition boxes are sorted according to the fuzzy sorting, and the double-layer dictionary is formed including:
[0098] Sort the recognition boxes from top to bottom and from left to right to obtain a sorted sequence;
[0099] Define the two values of the Y axis of the first recognition frame in the sorting sequence as default values, and compare the subsequent recognition frames in turn. When the maximum or minimum value of the recognition frame is within the range, it is judged to be in the same row. Determine the row where each recognition frame is located and get the final sorting result. The final sorting result is that the Y axis of each row increases from small to large, and the X axis of each recognition frame in each row increases from small to large;
[0100] Based on the final sorting results, a two-layer dictionary is constructed.
[0101] It should be noted that the currently commonly used method is to directly determine the position of the recognition frame based on the X-axis and Y-axis, but this will cause errors in the order of the recognition frame actually inferred and the order estimated by the human eye. The method adopted by the technology of the present invention can effectively avoid such errors, achieve what you see is what you get, better simplify the configuration of the original dictionary, and thus improve the accuracy of the recognition process.
[0102] It should be understood that the state matching system based on object segmentation and recognition in this embodiment can accurately identify the device state in the image, which enables the system to accurately capture the state and position information of the device target, and at the same time infer the device recognition order in the image based on the position information. Through the established recognition dictionary, reliable state matching results can be provided.
[0103] S206: Generate a final recognition dictionary based on the second dictionary, the device target state of the corresponding image, and the target frame position as a third dictionary.
[0104] Specifically, based on the second dictionary, the device target state and the target frame position of the corresponding image, the device state recognition dictionary generation model is used to generate the final recognition dictionary. The device target state recognition model identifies the state of each device target in the image and the generated second dictionary, and the device state recognition dictionary generation model is used to assign a value to the state corresponding to each device in the generated second dictionary to form a complete recognition dictionary.
[0105] S207: Perform cross fusion based on the third dictionary and the corresponding image to generate a target device recognition matching model.
[0106] Based on the third dictionary and the corresponding original image, the third dictionary and the image cross-fusion generation model are used to generate the final result. Based on the third dictionary and the recognition box position of the device target, the label and recognition box position of each device target in the recognition dictionary are matched one by one, and the above characteristics are used to enable the image recognition dictionary and the image cross-fusion generation model, and the final result is written on the image.
[0107] Furthermore, the method also includes testing the state matching system according to the test model to obtain test results, and feeding back the test results to the state matching system developer. The state matching system developer optimizes and improves the device target state recognition model according to the test results, and submits the improved results to the state matching system.
[0108] Return the following results to the state matching system, including but not limited to detailed information such as position error, label error, dictionary generation error, and low final result recognition accuracy;
[0109] Modify the recognition dictionary error or the recognition box position error to obtain a modification result, and submit the modification result.
[0110] In this embodiment, an information management model is constructed, and pictures are collected based on the information management model to obtain collected picture data; a picture collection classification model is trained, and the collected picture data is classified using the picture collection classification model to obtain classification results and picture data of each collection category, and the first dictionary is constructed using the above results and data; a device category block object image clustering model and a device category block object segmentation and recognition model are trained, and for each collection category of picture data, the device category block object image clustering model is used to perform category block clustering on the collection category picture data to obtain clustering results, and based on the clustering results, the device category block object segmentation and recognition model is used to perform category block segmentation and recognition on the collection category picture data to obtain category block recognition results, category block segmentation results and recognition frame positions; based on the category block segmentation results, a device target state recognition model is used to obtain the state and target frame position of each device target in the collected picture; based on the category block recognition results, the recognition frame position and the first dictionary, a double-layer dictionary is constructed, and the double-layer dictionary is used as the second dictionary; based on the second dictionary, the device target state and the target frame position of the picture, a final recognition dictionary is generated as a third dictionary; and the third dictionary and the corresponding picture are cross-fused to generate a target device recognition matching model. Through deep learning algorithms, high-efficiency and high-precision device status recognition and device name matching are achieved, which can cope with recognition and matching under different lighting and angle conditions, reducing the burden of manual data annotation and improving processing efficiency and accuracy.
[0111] See also Figure 3 , Figure 3 A device identification and matching method provided by an embodiment of the present invention is shown, and the method is applied in Figure 1 The server in is used as an example to illustrate the details as follows:
[0112] S208: receiving an image to be recognized;
[0113] S209: Use the target device recognition and matching model to perform recognition and matching on the image to be recognized, and obtain a recognition and matching result.
[0114] In this embodiment, an image to be identified is received; the target device identification and matching model is used to identify and match the image to be identified, and an identification and matching result is obtained. The pre-trained target device identification and matching model is used to perform fast identification and matching, thereby improving the efficiency of device identification and matching.
[0115] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0116] Figure 4The principle block diagram of the device identification matching model training device corresponding to the device identification matching model training method in the above embodiment is shown. Figure 4 As shown, the device recognition matching model training apparatus includes a first dictionary construction module 31, a picture classification and segmentation module 32, a category classification and segmentation module 33, a state position recognition module 34, and a second dictionary generation module 35. The functional modules are described in detail as follows:
[0117] The first dictionary construction module 31 is used to construct an information management model, and collect pictures based on the information management model to obtain collected picture data, use the collected picture data to train a picture collection classification model, use the picture collection classification model to classify the collected picture data, obtain classification results and picture data of each collection category, and use the above results and data to construct a first dictionary;
[0118] The picture classification and segmentation module 32 is used to train the picture acquisition classification model, classify the collected picture data using the picture acquisition classification model, and obtain the classification results and the picture data of each collection category;
[0119] The category classification and segmentation module 33 is used to train the device category block object image clustering model and the device category block object segmentation and recognition model. For each type of image data collected, the device category block object image clustering model is used to perform category block clustering on the image data of the collected category to obtain clustering results. Based on the clustering results, the device category block object segmentation and recognition model is used to perform category block segmentation and recognition on the image data of the collected category to obtain category block recognition results, category block segmentation results and recognition frame positions.
[0120] A state position recognition module 34 is used to obtain the state and target frame position of each device target in the captured image by using a device target state recognition model based on the category block segmentation result;
[0121] A second dictionary generation module 35 is used to construct a double-layer dictionary based on the category block recognition result, the recognition box position and the first dictionary, and use the double-layer dictionary as the second dictionary;
[0122] A third dictionary generating module 36 is used to generate a final recognition dictionary as a third dictionary based on the second dictionary, the device target state and the target frame position of the picture;
[0123] The target model generation module 37 is used to generate a target device identification matching model by cross-fusion based on the third dictionary and the corresponding image.
[0124] Optionally, the first dictionary building module 31 includes:
[0125] A collection unit, used to collect pictures through a state matching system and store them according to the camera identification number;
[0126] A construction unit is used to establish the first dictionary using a state matching system according to the classification results obtained by the image acquisition classification model and the device names and all state conditions in the actual situation.
[0127] Optionally, the second dictionary generating module 35 includes:
[0128] A stratification unit is used to divide the first dictionary into two layers, one layer is the classification result obtained by the image acquisition classification model, that is, the device category block, and the other layer is the status and name of the device target under each device category block;
[0129] A segmentation unit, used to segment the image using a device target state recognition model to obtain the segmented image and the segmentation frame position;
[0130] The sorting unit is used to sort the positions of the recognition boxes according to the fuzzy sorting to form a double-layer dictionary.
[0131] Optionally, the sorting unit includes:
[0132] A first sorting subunit is used to sort the recognition frames from top to bottom and from left to right to obtain a sorting sequence;
[0133] The second sorting subunit is used to define the two values of the Y axis of the first recognition frame in the sorting sequence as default values, and compare the subsequent recognition frames in turn. When the maximum value or the minimum value of the recognition frame is within the range, it is determined that they are in the same row, and the row where each recognition frame is located is determined to obtain the final sorting result. The final sorting result is that the Y axis of each row is from small to large, and the X axis of each recognition frame in each row is from small to large;
[0134] The dictionary construction unit is used to construct a double-layer dictionary based on the final sorting result.
[0135] Figure 5 The principle block diagram of the device identification and matching apparatus corresponding to the device identification and matching method in the above embodiment is shown. Figure 5 As shown, the device identification and matching apparatus includes a receiving module 38 and an identification module 39. The detailed description of each functional module is as follows:
[0136] A receiving module 38, used for receiving an image to be identified;
[0137] The recognition module 39 is used to use the target device recognition and matching model to perform recognition and matching on the image to be recognized to obtain a recognition and matching result.
[0138] For the specific limitations of the device identification and matching model training device, please refer to the limitations of the device identification and matching model training method above, which will not be repeated here. Each module in the above-mentioned device identification and matching model training device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0139] To solve the above technical problems, the present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0140] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0141] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0142] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the device recognition matching model training method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0143] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code of the device recognition matching model training method.
[0144] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0145] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor so that the at least one processor performs the steps of the device recognition matching model training method as described above.
[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0147] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A device identification and matching model training method, characterized in that: include: Constructing an information management model, and collecting pictures based on the information management model to obtain collected picture data; Training a picture acquisition classification model, using the picture acquisition classification model to classify the acquired picture data, obtaining classification results and picture data of each acquisition category, and using the above results and data to construct a first dictionary; Training a device category block object image clustering model and a device category block object segmentation and recognition model, for each type of image data collected, using the device category block object image clustering model to perform category block clustering on the image data of the collected category to obtain clustering results, and based on the clustering results, using the device category block object segmentation and recognition model to perform category block segmentation and recognition on the image data of the collected category to obtain category block recognition results, category block segmentation results and recognition box positions; Based on the category block segmentation results, the device target state recognition model is used to obtain the state and target frame position of each device target in the captured image; Based on the category block recognition result, the recognition box position and the first dictionary, a double-layer dictionary is constructed, and the double-layer dictionary is used as a second dictionary; Generate a final recognition dictionary based on the second dictionary, the device target state and the target frame position of the image as a third dictionary; Perform cross fusion based on the third dictionary and the corresponding image to generate a target device identification matching model; The step of constructing a double-layer dictionary based on the category block recognition result, the recognition box position and the first dictionary, and using the double-layer dictionary as the second dictionary includes: The first dictionary is divided into two layers, one layer is the classification result obtained by the image acquisition classification model, that is, the device category block, and the other layer is the status and name of the device target under each device category block; Segment the image using the device category block object segmentation and recognition model to obtain the segmented image and the position of the recognition frame; The positions of the recognition boxes are sorted according to the fuzzy sorting to form a double-layer dictionary.
2. The device identification matching model training method according to claim 1, characterized in that: The collecting pictures based on the information management model to obtain collected picture data and a training picture collection classification model, using the picture collection classification model to classify the collected picture data to obtain classification results and picture data of each collection category, and using the above results and data to construct a first dictionary includes: The images are collected through the state matching system and stored according to the camera identification number; The first dictionary is established by using a state matching system based on the classification results obtained by the image acquisition classification model and the device names and all state conditions in reality.
3. The device identification matching model training method according to claim 1, characterized in that: The picture acquisition classification model, the device category block object segmentation recognition model, the device category block object image clustering model and the device target state recognition model are deep learning models.
4. The device identification matching model training method according to claim 1, characterized in that: The step of sorting the positions of the recognition boxes according to the fuzzy sorting to form a double-layer dictionary includes: Sort the recognition frames from top to bottom and from left to right to obtain a sorted sequence; The two values of the Y axis of the first recognition frame in the sorting sequence are defined as default values, and the subsequent recognition frames are compared in sequence. When the maximum value or the minimum value of the recognition frame is within the range, the recognition frames are judged to be in the same row, and the row where each recognition frame is located is determined to obtain a final sorting result, wherein the Y axis of each row is from small to large, and the X axis of each recognition frame in each row is from small to large; Based on the final sorting result, the double-layer dictionary is constructed.
5. A device identification and matching method, characterized in that: include: Receiving an image to be recognized; A target device recognition and matching model is used to perform recognition and matching on the image to be recognized to obtain a recognition and matching result, wherein the target device recognition and matching model is trained according to the device recognition and matching model training method according to any one of claims 1 to 4.
6. A device identification matching model training device, characterized in that: include: A first dictionary construction module is used to construct an information management model, and collect pictures based on the information management model to obtain collected picture data, use the collected picture data to train a picture collection classification model, use the picture collection classification model to classify the collected picture data, obtain classification results and picture data of each collection category, and use the above results and data to construct a first dictionary; The image classification and segmentation module is used to train the image acquisition classification model, classify the acquired image data using the image acquisition classification model, and obtain the classification results and the image data of each acquisition category; A category classification and segmentation module is used to train a device category block object image clustering model and a device category block object segmentation and recognition model. For each type of image data collected, the device category block object image clustering model is used to perform category block clustering on the image data of the collected category to obtain a clustering result. Based on the clustering result, the device category block object segmentation and recognition model is used to perform category block segmentation and recognition on the image data of the collected category to obtain a category block recognition result, a category block segmentation result and a recognition frame position. The state and position recognition module is used to obtain the state and target frame position of each device target in the collected image based on the category block segmentation result and using the device target state recognition model; A second dictionary generation module, configured to construct a double-layer dictionary based on the category block recognition result, the recognition frame position and the first dictionary, and use the double-layer dictionary as a second dictionary; A third dictionary generation module, used to generate a final recognition dictionary as a third dictionary based on the second dictionary, the device target state and the target frame position of the picture; A target model generation module, used for performing cross-fusion based on the third dictionary and the corresponding image to generate a target device recognition matching model; Wherein, the second dictionary generation module includes: A stratification unit, used to divide the first dictionary into two layers, one layer is the classification result obtained by the image acquisition classification model, that is, the device category block, and the other layer is the status and name of the device target under each device category block; A segmentation unit, used to segment the image using the device category block object segmentation and recognition model to obtain the segmented image and the position of the recognition frame; The sorting unit is used to sort the positions of the recognition boxes according to the fuzzy sorting to form a double-layer dictionary.
7. A device identification and matching apparatus, characterized in that: include: A receiving module, used for receiving an image to be recognized; The recognition module is used to use a target device recognition and matching model to recognize and match the image to be recognized to obtain a recognition and matching result, wherein the target device recognition and matching model is trained according to the device recognition and matching model training method according to any one of claims 1 to 4.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the device identification and matching model training method as described in any one of claims 1 to 4 is implemented, or when the processor executes the computer program, the device identification and matching method as described in claim 5 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the device identification and matching model training method as described in any one of claims 1 to 4, or, when the computer program is executed by the processor, it implements the device identification and matching method as described in claim 5.
