A circuit experimental device connection relationship identification method and device
By combining fine-grained target detection and instance segmentation with directed graph construction, the problem of accuracy in identifying the connection relationships of circuit devices in high school physics electrical experiments was solved, achieving high-accuracy identification in complex scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 上海锡鼎智能科技有限公司
- Filing Date
- 2023-03-10
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies struggle to accurately identify the series and parallel connections between circuit components in complex scenarios during high school physics electrical experiments, resulting in low identification accuracy.
By combining target detection, instance segmentation, and directed graph construction, a directed graph for circuit experiments is dynamically constructed, and the connection relationships between circuit devices are determined using fine-grained detection and segmentation results.
It improves the accuracy of identifying the connection relationships of circuit experimental devices, is suitable for detecting the circuit connection status in complex scenarios, and reduces the difficulty of feature extraction.
Smart Images

Figure CN116503719B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of circuit testing technology, and specifically to a method, apparatus, computing device, and storage medium for identifying the connection relationships of circuit experimental devices. Background Technology
[0002] In high school physics electrical experiments, wires are commonly used experimental devices. Related experimental assessments focus on the direction of current in circuits and the series and parallel connections between electrical experimental equipment. Therefore, the ability to correctly determine the series and parallel connections between devices in a circuit is crucial.
[0003] Currently, methods such as image-based object detection and semantic segmentation are mainly used to directly detect the connection relationships between circuit devices. However, this approach suffers from low recognition accuracy when there are a large number of electrical experimental devices and diverse connection relationships.
[0004] Therefore, there is a need to provide a method for identifying the connection relationships between circuit experimental devices, which can accurately identify the connection relationships between circuit experimental devices in complex scenarios, so as to solve the problems existing in the prior art. Summary of the Invention
[0005] In view of the above problems, the present invention proposes a method, apparatus, computing device and storage medium for identifying the connection relationship of circuit experimental devices to overcome or at least partially solve the above problems. By combining target detection, instance segmentation and directed graph construction, a directed graph based on the experimental circuit can be dynamically constructed, and the directed path of the experimental device can be traversed according to the constructed directed graph data, thereby accurately determining the series and parallel connection relationship between the circuit experimental devices. It can be applied to the detection of the connection status of experimental circuits in complex identification scenarios.
[0006] According to a first aspect of the present invention, a method for identifying the connection relationship of circuit experimental devices is provided. First, a circuit experimental image is acquired; then, target detection and instance segmentation are performed on the circuit experimental image to obtain target identification results including circuit experimental devices and connected terminals, and instance segmentation results including connected wires; next, a directed graph corresponding to the circuit experiment is constructed based on the target identification results and instance segmentation results; finally, the series and parallel connection relationship between the circuit experimental devices is determined based on the directed paths of each experimental device in the directed graph.
[0007] By employing the aforementioned technical solution, and through more granular target detection and instance segmentation of circuit experiment images, the positional relationships of various experimental components, terminals, and wires in the images can be determined more accurately. Furthermore, by constructing directed graph data between the various experimental components based on the target recognition and instance segmentation results, a more vivid representation of the true circuit experiment can be achieved, thereby enabling a more accurate determination of the connection relationships between the circuit experiment components using the directed graph data.
[0008] Optionally, in the above method, the circuit experiment image can be input into a pre-trained first target detection model to obtain a circuit experiment device detection box; the circuit experiment image containing the circuit experiment device detection box can be input into a pre-trained second target detection model to obtain a connected terminal detection box; and the circuit experiment image containing both the circuit experiment device detection box and the connected terminal detection box can be input into a pre-trained instance segmentation model to obtain the connected wire recognition result.
[0009] By using more fine-grained object detection and instance segmentation, the difficulty of feature extraction in deep learning models can be reduced, and the accuracy of recognizing different objects can be improved.
[0010] Optionally, in the above method, the first object detection model and the second object detection model can be any one of Faster-RCNN, YOLO, SSD, and Cornernet, and the instance segmentation model can be any one of mask RCNN and cascade RCNN.
[0011] Optionally, in the above method, the circuit experimental device is used as the vertex of the directed graph; the direction of the current in the wire is determined according to the connected terminals and the connected wires, and is used as the edge of the directed graph.
[0012] Optionally, in the above method, the terminals include connected red terminals, connected black terminals, and connected terminals. The direction of the conductor from the connected black terminal to the connected red terminal can be determined as the current direction; the direction of the conductor from the connected black terminal to the connected terminal can be determined as the current direction; the direction of the conductor from the connected terminal to the connected red terminal can be determined as the current direction, thereby generating an initial directed graph.
[0013] Optionally, in the above method, if both ends of the wire are connected to red terminals, a reverse query is performed on the initial directed graph; if both ends of the wire are connected to black terminals, a forward query is performed on the initial directed graph; if both ends of the wire are connected to terminals, a bidirectional edge is added between the circuit experimental devices.
[0014] Optionally, in the above method, a path query is performed on the experimental device in the directed graph until the query path returns to the experimental device; if the query path of the first experimental device does not contain the second experimental device, then the first experimental device and the second experimental device are determined to be in parallel; if the query path of the first experimental device contains the second experimental device, then the first experimental device and the second experimental device are determined to be in series.
[0015] According to a second aspect of the present invention, a device for identifying the connection relationship of circuit experimental devices is provided, comprising: an acquisition module, a detection module, a construction module, and a judgment module.
[0016] The system includes: an acquisition module for acquiring circuit experiment images; a detection module for performing target detection and instance segmentation on the circuit experiment images to obtain target recognition results containing circuit experiment devices and connected terminals, and instance segmentation results containing connected wires; a construction module for constructing a directed graph corresponding to the circuit experiment based on the target recognition results and instance segmentation results; and a judgment module for judging the series and parallel connection relationships between circuit experiment devices based on the directed paths of each experimental device in the directed graph.
[0017] According to a third aspect of the present invention, a computing device is provided, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing a method for identifying the connection relationship of the circuit experimental devices described above.
[0018] According to a fourth aspect of the present invention, a readable storage medium storing program instructions is provided, which, when read and executed by a computing device, causes the computing device to perform the above-described method for identifying the connection relationship of circuit experimental devices.
[0019] According to the present invention, by performing more granular target detection and instance segmentation on circuit experiment images, the difficulty of feature extraction can be reduced, which is conducive to improving the recognition accuracy. Constructing a directed graph based on the recognition results can more vividly express the description of the circuit diagram connection relationship in electrical experiments. Compared with directly using deep learning models to identify connection relationships, this solution can improve the accuracy of identifying the connection relationship between electrical devices and is applicable to the accurate identification of the connection relationship of circuit experiment devices in complex scenarios.
[0020] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0022] Figure 1 A structural block diagram of a computing device 100 according to an embodiment of the present invention is shown;
[0023] Figure 2 A flowchart illustrating a method 200 for identifying the connection relationships of circuit experimental devices according to an embodiment of the present invention is shown.
[0024] Figure 3 A schematic diagram of a circuit experiment according to an embodiment of the present invention is shown;
[0025] Figure 4 A schematic diagram of the circuit experimental device identification results according to an embodiment of the present invention is shown;
[0026] Figure 5 A schematic diagram showing the identification result of the terminal block according to an embodiment of the present invention is illustrated;
[0027] Figure 6 A schematic diagram showing the identification results of connected wires according to an embodiment of the present invention is shown;
[0028] Figure 7 A schematic diagram of an initial directed graph for a circuit experiment according to an embodiment of the present invention is shown;
[0029] Figure 8 A directed graph schematic diagram corresponding to a circuit experiment according to an embodiment of the present invention is shown;
[0030] Figure 9 A schematic diagram of the structure of a circuit experimental device connection identification device 900 according to an embodiment of the present invention is shown. Detailed Implementation
[0031] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0032] In high school physics electrical experiments, connecting circuits according to circuit diagrams is a key focus, such as experiments involving measuring current with an ammeter, measuring voltage with a voltmeter, and changing the current in a circuit using a sliding rheostat. This requires judging the accuracy of the connections between the wires and the positive and negative terminals of the meters, whether the series and parallel connections between electrical components are correct, and whether the circuit connections are complete.
[0033] Currently, existing technologies use the region where two electrical devices are connected as the target detection box. Target detection techniques are then used to train a model on this detection box, which is then directly used to identify the connection relationship between the circuit devices. However, because the detailed differences in the target detection boxes for series and parallel connections are not obvious, feature extraction is difficult, resulting in low recognition accuracy.
[0034] To improve the accuracy of identifying series and parallel connections between circuit experimental devices, this solution provides a method for identifying the connection relationships between circuit experimental devices. By using finer-grained target detection boxes for target detection and combining dynamic directed graphs to construct the connection relationships between devices, the connection relationships between experimental devices can be identified more accurately.
[0035] Figure 1 A structural diagram of a computing device 100 according to an embodiment of the present invention is shown. Figure 1 As shown, in the basic configuration 102, the computing device 100 typically includes system memory 106 and one or more processors 104. Memory bus 108 can be used for communication between processor 104 and system memory 106.
[0036] Depending on the desired configuration, processor 104 can be any type of processor, including but not limited to: microprocessors (µP), microcontrollers (µC), digital information processors (DSPs), or any combination thereof. Processor 104 may include one or more levels of cache such as L1 cache 110 and L2 cache 112, processor core 114, and registers 116. Example processor core 114 may include an arithmetic logic unit (ALU), a floating-point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. Example memory controller 118 may be used with processor 104, or in some implementations, memory controller 118 may be an internal part of processor 104.
[0037] Depending on the desired configuration, system memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. Physical memory in a computing device typically refers to volatile RAM, and data on a disk needs to be loaded into physical memory before it can be read by processor 104. System memory 106 may include operating system 120, one or more applications 122, and program data 124.
[0038] In some implementations, application 122 may be configured to execute instructions on an operating system using program data 124 by one or more processors 104. The operating system 120 may be, for example, Linux, Windows, etc., and includes program instructions for handling basic system services and performing hardware-dependent tasks. Application 122 includes program instructions for implementing various user-desired functions; application 122 may be, for example, a browser, instant messaging software, software development tools (e.g., integrated development environment IDE, compiler, etc.), but is not limited thereto. When application 122 is installed in computing device 100, driver modules may be added to operating system 120.
[0039] When computing device 100 starts up, processor 104 reads and executes program instructions from memory 106 of operating system 120. Application 122 runs on operating system 120, utilizing interfaces provided by operating system 120 and underlying hardware to implement various user-expected functions. When user starts application 122, application 122 is loaded into memory 106, and processor 104 reads and executes program instructions from memory 106 of application 122.
[0040] The computing device 100 also includes a storage device 132, which includes a removable storage device 136 and a non-removable storage device 138, both of which are connected to a storage interface bus 134.
[0041] The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via a bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices such as displays or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via a network communication link through one or more communication ports 164.
[0042] A network communication link can be an example of a communication medium. A communication medium can typically be embodied in computer-readable instructions, data structures, or program modules within a modulated data signal, such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A “modulated data signal” can be a signal whose data set, or whose modifications, can be encoded with information within the signal. As a non-limiting example, a communication medium can include wired media such as wired networks or leased lines, and various wireless media including sound, radio frequency (RF), microwave, infrared (IR), or other wireless media. The term “computer-readable medium” as used herein can include both storage media and communication media. In the computing device 100 according to the invention, application 122 includes instructions for performing a method 200 for identifying the connection relationships of circuit experimental devices according to the invention.
[0043] Intelligent experimental evaluation systems determine whether a circuit is correctly connected by judging the connection status of wires and experimental devices. However, in actual evaluation processes, due to problems such as crossed wires and disordered placement, it is difficult to accurately identify the series and parallel connection status between experimental devices using deep learning algorithms. Therefore, this solution provides a method for identifying the connection relationship of electrical experimental devices, which can accurately identify the series and parallel connection status between circuit experimental devices.
[0044] Figure 2 A flowchart illustrating a method 200 for identifying the connection relationships of circuit experimental devices according to an embodiment of the present invention is shown. Figure 2 As shown, the method begins with step S210, which involves obtaining a circuit experiment image.
[0045] According to one embodiment of the present invention, a camera can be installed above the experimental workbench so that the camera can view the experimental workbench from above and ensure that the entire circuit diagram can be displayed in the camera's view.
[0046] After obtaining the circuit experiment images captured by the camera, the images can be filtered to remove those that are blurry, poorly lit, or shaky, thus failing to meet the recognition criteria. Only clear circuit experiment images are selected as the images to be recognized later.
[0047] Figure 3 A schematic diagram of a circuit experiment according to an embodiment of the present invention is shown. Figure 3 As shown, the circuit experiment diagram includes a voltmeter, an ammeter, a light bulb, a sliding rheostat, a battery, a switch, and wires used to connect the various components.
[0048] Then, step S220 is executed to perform target detection on the circuit experiment image, and obtain the recognition results containing experimental devices, connected terminals and connected wires.
[0049] Object detection and instance segmentation can be performed on circuit experiment images separately, and then the object detection results and instance segmentation recognition results can be superimposed for subsequent construction of directed graphs.
[0050] According to one embodiment of the present invention, the acquired circuit experiment image can be input into a pre-trained first target detection model to obtain the identification results of the circuit experiment device. For example, the power supply, switch, sliding rheostat, bulb base, voltmeter, and ammeter in the circuit experiment image can be detected as targets to be identified to obtain detection frames for the power supply, switch, sliding rheostat, bulb base, voltmeter, and ammeter.
[0051] Then, the circuit experiment image containing the detection boxes of each circuit experiment device is input into the pre-trained second target detection model, and the output is the detection box of the connected terminals. For example, the terminals can be used as the target to be identified by the second target detection model to obtain the detection box of the connected terminals.
[0052] The first and second object detection models can be any one of Faster-RCNN, YOLO series, SSD, or Cornernet. Taking the YOLOv5 model as an example, all connection points of experimental devices can be uniformly identified as terminals. Based on the spatial relationship between the terminals and the experimental devices, it is determined which experimental device the terminal belongs to, and whether the terminal is connected to a wire. If it is connected to a wire, the terminal is identified as a connected terminal, and finally, the bounding box of each connected terminal is obtained.
[0053] It should be noted that, in order to obtain the trained first and second object detection models, image annotation tools can be used to annotate the experimental devices and their terminals. The annotations include the name, the color of the terminal (red for positive, black for negative, and blue for no polarity), and the coordinates of the bounding box, serving as the training dataset. The YOLOv5 model is then used to train and validate the training dataset, resulting in the trained first and second object detection models.
[0054] Figure 4 A schematic diagram illustrating the identification results of a circuit experimental device according to an embodiment of the present invention is shown. Figure 4 As shown, the recognition results output by the first target detection model include the category labels and detection boxes for voltmeters, ammeters, sliding rheostats, switches, power supplies, and bulb bases.
[0055] Figure 5 A schematic diagram illustrating the identification result of a terminal block according to an embodiment of the present invention is shown. Figure 5 As shown, the recognition results output by the second target detection model include labels and detection boxes for connected red terminals, connected black terminals, and connected terminals. The connected terminals refer to terminals whose colors cannot be identified and the connected terminals on the sliding rheostat.
[0056] In complex scenarios with many circuit experimental devices, different colors can be used to label different types of experimental devices or connected terminals. For example, red can be used to label voltmeters, blue to label ammeters, yellow to label connected terminals, and purple to label red terminals.
[0057] For long and thin objects like wires, in order to improve the accuracy of recognition, the circuit experiment image containing the detection box of the circuit experiment device and the detection box of the connected terminal can be input into a pre-trained instance segmentation model to obtain the recognition result of the connected wire.
[0058] The instance segmentation model can be Mask R-CNN. First, it obtains feature maps of different scales based on the model's backbone network. Then, the Region Proposal Network (RPN) generates bounding boxes of different scales for each point on the feature maps. These boxes undergo coarse classification and localization, and a large number of bounding boxes are filtered out based on confidence and non-maximum suppression. The remaining bounding boxes are then input into subsequent networks. Subsequently, the bounding boxes of different sizes and scales are passed through the ROI Align layer to output a fixed-size feature map. Finally, the fixed-size feature map is used as input to the classification branch, coordinate regression branch, and Mask branch to further determine the category of the bounding box, identifying which pixels within the bounding box are objects and which are background, thus obtaining a binarized mask image of the wires through instance segmentation.
[0059] The instance segmentation model can also be the HTC model, the cascade maskRCNN model, etc., and this solution does not limit it.
[0060] Figure 6 A schematic diagram illustrating the identification results of connected wires according to an embodiment of the present invention is shown. Figure 6 As shown, each wire in the circuit experiment image is labeled. Wires in the image can also be identified using image processing methods such as mean filtering and edge detection. Then, the connected wires are determined based on their positional relationship with the experimental components and connected terminals.
[0061] After superimposing the target recognition results and instance segmentation results, step S230 can be executed to construct the directed graph corresponding to the circuit experiment based on the target recognition results and instance segmentation results.
[0062] According to one embodiment of the present invention, the current direction in the wire is first determined based on the identified connected terminals and connected wire instances, that is, the direction of the wire from the "connected black terminal" to the "connected red terminal" is the current direction, the direction from the "connected black terminal" to the "connected terminal" is the current direction, and the direction from the "connected terminal" to the "connected red terminal" is the current direction.
[0063] For example, the direction from the connected terminal on the light bulb base to the connected red terminal on the ammeter represents the direction of current flow. The entire dynamic directed graph construction uses the current direction as the direction of edges in the graph data (power source -> switch, switch -> rheostat, rheostat -> light bulb base, light bulb base -> ammeter, ammeter -> power source), with the circuit experimental devices as graph vertices. Cases where both ends of the wire are simultaneously "connected to black terminals" or "connected to red terminals" (making the current direction uncertain) can be ignored initially, and an initial directed graph will be automatically generated.
[0064] Figure 7A schematic diagram of the initial directed graph for a circuit experiment according to an embodiment of the present invention is shown. Figure 7 As shown, the voltmeter, ammeter, light bulb base, rheostat, power supply, and switch are the vertices of the directed graph, and the current directions from the voltmeter to the ammeter, from the light bulb base to the ammeter, from the rheostat to the light bulb base, from the switch to the rheostat, from the power supply to the switch, and from the ammeter to the power supply are the edges of the directed graph.
[0065] When both ends of the wire are connected to the red terminals, according to Figure 7 The initial directed graph shown is then used for reverse lookup, specifically to find the device preceding the light bulb base, namely the sliding rheostat. This adds a directed edge from the rheostat to the voltmeter. Similarly, if both ends of the wire are already connected to the black terminals, then according to... Figure 7 The initial directed graph shown queries the next device for the corresponding device. If both ends of a wire are connected terminals whose colors cannot be identified, a bidirectional edge is added between the two ends of the device.
[0066] Figure 8 A directed graph schematic diagram corresponding to a circuit experiment according to an embodiment of the present invention is shown. For example... Figure 8 As shown, with Figure 7 Compared to the initial directed graph, the final directed graph has an added directed edge from the sliding rheostat to the voltmeter.
[0067] Finally, step S240 is executed to determine the series and parallel connection relationships between the circuit experimental devices based on the directed paths of each experimental device in the directed graph.
[0068] Specifically, a path query can be performed for each experimental device in the directed graph, that is, a connection path can be queried starting from a certain experimental device until the query path returns to that experimental device.
[0069] If the query path of the first experimental device does not contain the second experimental device, then the first experimental device and the second experimental device are determined to be in parallel; if the query path of the first experimental device contains the second experimental device, then the first experimental device and the second experimental device are determined to be in series.
[0070] In one embodiment of the present invention, directed edge path queries can be performed on the graph nodes where the voltmeter and the light bulb base are located, until the specified query device is returned. If the other device exists in the path between them, it means that the two devices are connected in series. If the other device does not exist in the path between them, it means that the two queried devices are connected in parallel.
[0071] For example, a directed path lookup for the voltmeter is: Voltmeter → Ammeter → Power Supply → Switch → Rheostat → Voltmeter. A directed path lookup for the light bulb base is: Light bulb base → Ammeter → Power Supply → Switch → Rheostat → Light bulb base. It is clear that the light bulb base is not in the voltmeter's directed path, and the voltmeter is not in the light bulb base's directed path, indicating that the light bulb base and the voltmeter are connected in parallel.
[0072] By judging the connection relationship between each pair of circuit experimental devices according to the above method, the series and parallel connection relationship between each circuit experimental device in the whole circuit is finally obtained.
[0073] Figure 9 A schematic diagram of a circuit experimental device connection identification device 900 according to an embodiment of the present invention is shown. Figure 9 As shown, the device 900 may include: an acquisition module 910, a detection module 920, a construction module 930, and a judgment module 940.
[0074] The acquisition module 910 can acquire circuit experiment images. It can capture circuit experiment images via a camera above the experimental workbench, and then filter or preprocess the captured images to obtain circuit experiment images that meet the recognition conditions of the target detection model.
[0075] The detection module 920 can perform target detection and instance segmentation on the circuit experiment image acquired by the acquisition module 910, and obtain target recognition results including circuit experiment devices and connected terminals, and instance segmentation results including connected wires.
[0076] According to one embodiment of the present invention, a YOLOv5 network and a mask RCNN network can be constructed using the PyTorch library. First, the circuit experiment image is input into the pre-trained first YOLOv5 network to obtain the circuit experiment device detection box; then, the circuit experiment image containing the circuit experiment device detection box is input into the pre-trained second YOLOv5 network to obtain the connected terminal detection box; and finally, the circuit experiment image is input into the pre-trained mask RCNN network to obtain the connected wire recognition result.
[0077] The construction module 930 can construct a directed graph based on the target recognition results and instance segmentation results obtained from the detection module 920. For example, the circuit experimental device can be used as the vertex of the directed graph; the direction of the current in the wire can be determined based on the terminals and the connected wires, and used as the edge of the directed graph.
[0078] First, determine the direction of the current as the direction of the wire from the connected black terminal to the connected red terminal; then determine the direction of the current as the direction of the wire from the connected black terminal to the connected terminal; finally, determine the direction of the current as the direction of the wire from the connected terminal to the connected red terminal, thus generating an initial directed graph.
[0079] Then, the initial directed graph is corrected: if both ends of the wire are connected to red terminals, a reverse query is performed on the initial directed graph; if both ends of the wire are connected to black terminals, a forward query is performed on the initial directed graph; if both ends of the wire are connected to terminals, a bidirectional edge is added between the circuit experimental devices. Finally, the directed graph corresponding to the entire circuit experimental diagram is obtained.
[0080] The judgment module 940 can determine the series and parallel connection relationships between circuit experimental devices based on the directed paths of each experimental device in the directed graph obtained by the construction module 930.
[0081] Specifically, a path query is performed for each experimental device in the directed graph until the query path returns to the experimental device; if the query path of the first experimental device does not contain the second experimental device, then the first experimental device and the second experimental device are determined to be in parallel; if the query path of the first experimental device contains the second experimental device, then the first experimental device and the second experimental device are determined to be in series.
[0082] The above scheme reduces the difficulty of feature extraction and improves recognition accuracy by performing finer-grained target detection and instance segmentation on circuit experiment images. Constructing a directed graph based on the recognition results can more vividly represent the circuit diagram connection relationships in electrical experiments. Compared with directly using deep learning models to identify connection relationships, this scheme can improve the accuracy of identifying connection relationships between electrical devices and is applicable to the accurate identification of circuit experiment device connection relationships in complex scenarios.
[0083] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0084] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various aspects of the invention, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0085] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in the devices described in this embodiment, or alternatively, can be located in one or more devices different from the devices in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.
[0086] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0087] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0088] Furthermore, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing the functions. Therefore, a processor having the necessary instructions for implementing the methods or method elements forms means for implementing the methods or method elements. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing the functions performed by elements for the purposes of carrying out the invention.
[0089] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.
[0090] Although the invention has been described with respect to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and edibility purposes, and not for the purpose of interpreting or limiting the subject matter of the invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the invention is illustrative rather than restrictive, and the scope of the invention is defined by the appended claims.
Claims
1. A method for identifying the connection relationships of circuit experimental devices, characterized in that, include: Obtain images of electrical experiments; The electrical experiment images are subjected to target detection and instance segmentation to obtain target recognition results including circuit experimental devices and connected terminals, and instance segmentation results including connected wires. Based on the target recognition results and instance segmentation results, a directed graph corresponding to the circuit experiment is constructed, including the following steps: Treat the circuit experimental devices as vertices of a directed graph; The terminals include connected red terminals, connected black terminals, and connected terminals. The direction of current in the conductor is determined based on the terminals and the connected conductors, and is used as an edge of the directed graph. The steps include: The direction of the current is determined by the direction of the wire from the black terminal to the red terminal. The direction of the current is determined by the direction of the conductor from the connected black terminal to the connected terminal; The direction of the current is determined by the direction of the wire from the connected terminal to the connected red terminal, and an initial directed graph is generated. If both ends of the wire are connected to red terminals, then perform a reverse query on the initial directed graph; If both ends of the wire are connected to black terminals, then perform a forward query on the initial directed graph; If both ends of the wire are already connected to terminals, then add a bidirectional side between the circuit experimental components; and Based on the directed paths of each experimental device in the directed graph, the series and parallel connection relationships between the circuit experimental devices are determined.
2. The identification method according to claim 1, characterized in that, The steps of performing target detection and instance segmentation on the electrical experiment image to obtain target recognition results including circuit experimental devices, connected terminals, and connected wires include: The electrical experiment images are input into a pre-trained first target detection model to obtain a detection box for the circuit experiment devices; The electrical experiment image containing the detection frame of the circuit experimental device is input into the pre-trained second target detection model to obtain the detection frame of the connected terminals; and The electrical experiment image containing the detection box of the circuit experimental device and the detection box of the connected terminal is input into the pre-trained instance segmentation model to obtain the identification result of the connected wire.
3. The identification method according to claim 2, characterized in that, The first object detection model and the second object detection model are any one of Faster-RCNN, YOLO, SSD, and Cornernet, and the instance segmentation model is any one of mask RCNN and cascade RCNN.
4. The identification method according to claim 1, characterized in that, The step of determining the series and parallel connection relationships between circuit experimental devices based on the directed paths of each experimental device in the directed graph includes: For each experimental device in the directed graph, perform a path query until the query path returns to the experimental device; If the query path of the first experimental device does not contain the second experimental device, then the first experimental device and the second experimental device are determined to be connected in parallel. If the query path of the first experimental device contains the second experimental device, then the first experimental device and the second experimental device are determined to be in series.
5. A device for identifying the connection relationships of circuit experimental devices, used to execute the method for identifying the connection relationships of circuit experimental devices according to any one of claims 1-4, characterized in that, include: The acquisition module is used to acquire images of electrical experiments; The detection module is used to perform target detection and instance segmentation on the electrical experiment image to obtain target recognition results including circuit experimental devices and connected terminals, and instance segmentation results including connected wires. The construction module is used to construct a directed graph corresponding to the circuit experiment based on the target recognition results and instance segmentation results; as well as The judgment module is used to determine the series and parallel connection relationships between circuit experimental devices based on the directed paths of each experimental device in the directed graph.
6. A computing device, comprising: At least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing a method for identifying the connection relationship of circuit experimental devices according to any one of claims 1-4.
7. A readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to perform a method for identifying the connection relationship of circuit experimental devices as described in any one of claims 1-4.
Citation Information
Patent Citations
Scoring method for electrical experiment and device thereof
CN111833689A
Physical circuit experiment automatic identification method
CN114677586A