A single-terminal wire core number recognition method and system

By annotating multiple sample images of the cut end face of a single-terminal wire and training a target detection neural network, combined with nonmaximum suppression and ellipse fitting techniques, the problem of inaccurate wire core counting was solved, and highly accurate wire core quantity identification was achieved.

CN121564305BActive Publication Date: 2026-04-10SHENZHEN HUIZHONG WISDOM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HUIZHONG WISDOM TECH CO LTD
Filing Date
2026-01-20
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies face problems when identifying the number of wire cores in a single-terminal wire, such as uneven cutting end faces leading to disordered wire core distribution, easy adhesion or overlap of multiple thin wire cores, and artifacts produced by the insulating rubber, resulting in inaccurate wire core counting.

Method used

By acquiring multiple typical sample images of single-terminal wire cut end faces, performing fine annotation, and training a target detection neural network model, the specific type and quantity of wire cores are identified and calculated using non-maximum suppression algorithm and ellipse fitting technology, thus filtering out false detections and missed detections.

Benefits of technology

It improves the accuracy of core counting, can accurately identify the specific type of core, effectively filter false detections and make up for missed detections, covers almost all imaging situations, and greatly improves the accuracy of core quantity identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564305B_ABST
    Figure CN121564305B_ABST
Patent Text Reader

Abstract

The application provides a single-terminal wire core quantity identification method and system, which comprises obtaining multi-class typical annotation samples of a single-terminal wire cutting end face, the multi-class typical sample images comprising front core images, inclined core images, adhered core images and typical negative sample images, training a target detection neural network model based on the multi-class typical annotation samples, outputting corresponding categories, obtaining a unique detection frame set of the single-terminal wire by using a non-maximum suppression algorithm according to the annotation samples of the front core images and the inclined core images, calculating the average area of the effective core as a single-core area, and calculating the core quantity of the adhered core based on the ratio of each detection frame of the adhered core to the single-core area. The target detection neural network model is trained through the multi-class typical samples of fine annotation, the specific type of the core can be accurately identified, the core quantity identification can be carried out accordingly, and the accuracy of the core counting is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wire harness detection technology, and in particular to a method and system for identifying the number of wire cores in a single-terminal wire. Background Technology

[0002] With the rapid development of electronic equipment, automotive electronics, industrial automation, and home appliances, higher demands are being placed on the reliability, integration, and assembly efficiency of electrical connection systems. Terminal wires, as cable assemblies reliably combining conductors and terminals through methods such as crimping and welding, are widely used in high-reliability scenarios such as new energy vehicles, battery management systems (BMS), and motor controllers. The accuracy of the number of wire cores during their manufacturing process directly affects electrical performance and safety.

[0003] Currently, core counting commonly uses industrial cameras to image the cut end face of the conductor and relies on visual algorithms to automatically count the number of cores. However, in actual production, this method faces multiple challenges: uneven cut end faces lead to disordered core distribution; multiple thin cores are prone to sticking or overlapping, making them difficult to separate; the insulating sheath produces strong glare under non-ideal lighting, forming a near-circular high-brightness artifact; and when the cores are tilted, only the side outline is shown, making them easy to miss or misjudge, among other problems. Summary of the Invention

[0004] This invention provides a method, system, computer device, and storage medium for identifying the number of wire cores in a single-terminal wire. By training a target detection neural network model with multiple typical samples of finely annotated cut end faces of the single-terminal wire, the model can accurately identify the specific type of wire core and then perform targeted identification of the number of wire cores, thereby improving the accuracy of wire core counting.

[0005] In a first aspect, the present invention proposes a method for identifying the number of wire cores in a single-terminal wire, comprising:

[0006] Multiple typical sample images of the cut end face of a single terminal wire are obtained, and the multiple typical sample images are annotated to obtain multiple typical annotated samples. The multiple typical sample images include front wire core images, tilted wire core images, adhered wire core images and typical negative sample images.

[0007] The target detection neural network model is trained based on the aforementioned typical labeled samples, and the corresponding category is output.

[0008] The unique detection box set of the single-terminal wire is obtained by using the non-maximum suppression algorithm based on the labeled samples of the front wire core image and the tilted wire core image, and the average area of ​​the effective wire core is calculated as the single core area.

[0009] According to the single-core area, the detection boxes of the adhered line cores output by the target detection neural network model are traversed, and the number of line cores of the adhered line cores is calculated based on the ratio of each detection box of the adhered line cores to the single-core area.

[0010] In one of the embodiments, the method further comprises,

[0011] The detection boxes corresponding to the front line cores, the inclined line cores and the line cores after the adhesion is removed, which are output by the target detection neural network model, are subjected to effective line core verification, and if they are effective line cores, they are retained, otherwise they are rejected.

[0012] In one of the embodiments, after the detection boxes corresponding to the front line cores, the inclined line cores and the line cores after the adhesion is removed, which are output by the target detection neural network model, are subjected to effective line core verification, and if they are effective line cores, they are retained, otherwise they are rejected, the method further comprises,

[0013] The sum of the number of rejected invalid line cores and the number of effective line cores after the adhesion is removed is calculated, and if it is less than the standard number of line cores, the number of missing line cores is calculated;

[0014] Based on the effective detected line cores, a spatial point set is constructed, the center coordinates of all the effective line cores are extracted, and the local typical distance between the center coordinates of the effective line cores is calculated;

[0015] Half of the local typical distance is taken as a search step, and in the line core area of the line core original image, the search step is used to detect the missed hollows of the line core original image according to a preset proportion of the local typical distance as a radius;

[0016] Based on the number of missed hollows, the number of line cores of the single-terminal line is completed.

[0017] In one of the embodiments, the effective line core verification of the detection boxes corresponding to the front line cores, the inclined line cores and the line cores after the adhesion is removed, which are output by the target detection neural network model, if they are effective line cores, they are retained, otherwise they are rejected, specifically comprises:

[0018] The areas of the detection boxes of the front line cores, the inclined line cores and the line cores after the adhesion is removed are calculated, and it is judged whether the area is within a preset area interval of effective line cores, and if not, it is determined as an invalid line core;

[0019] The edge pixel points of the line core original image corresponding to each detection box are extracted and subjected to ellipse fitting, and if the number of the Euclidean distances from the edge pixel points to the fitted ellipse to a preset value is less than a preset proportion, it is determined as an invalid line core;

[0020] The number of pixel points with brightness higher than the average brightness in the fitted elliptical region is calculated, and if the proportion of the number of pixel points to the total number of pixel points in the fitted elliptical region reaches a preset proportion, the line core is determined to be valid, otherwise, the line core is determined to be invalid, false detection is determined, and is rejected.

[0021] In one embodiment, the half of the local typical distance is taken as a search step, and a missed detection hole of the line core original image is detected in the line core region of the line core original image by taking the half of the local typical distance as a search step and taking a preset proportion of the local typical distance as a radius of a circular detection window.

[0022] The half of the local typical distance is taken as a search step, and a circular detection window is slid in the line core region of the line core original image by taking the half of the local typical distance as a search step and taking a preset proportion of the local typical distance as a radius of the circular detection window.

[0023] The line core region of the line core original image is traversed, and if no center coordinates of the valid line core fall into the circular detection window, the candidate hole is marked.

[0024] In one embodiment, after the line core region of the line core original image is traversed and if no center coordinates of the valid line core fall into the circular detection window, the candidate hole is marked, the method further comprises:

[0025] The center coordinates of each candidate hole are extracted, and a square detection frame is cropped on the line core original image based on the center coordinates and taking a preset multiple of the average width of the detection frames in the unique detection frame set as a side length.

[0026] If the edge pixel points of the line core original image in the square detection frame are fitted by an ellipse, the number of edge pixel points to the fitted ellipse with a Euclidean distance less than a preset value reaches a preset proportion;

[0027] And, the pixel brightness in the fitted elliptical region is higher than the brightness outside the fitted elliptical region by a preset brightness difference and falls into a preset brightness interval, the candidate hole is determined to be an effective missed detection hole, and a supplementary detection frame is generated in the effective missed detection hole region.

[0028] In one embodiment, the local typical distance between the center coordinates of the effective line cores is calculated based on the effective detected line cores, and the center coordinates of all the effective line cores are extracted.

[0029] For each center coordinate of the effective line core, the average distance of the center coordinates of the three effective line cores adjacent thereto is calculated, and the median of all the average distances corresponding to the effective line cores is taken as the local typical distance.

[0030] In a second aspect, the application provides a single-terminal line core quantity identification system, which comprises:

[0031] a sample acquisition unit configured to acquire multi-class typical sample images of a single-terminal wire cutting end surface, and label the multi-class typical sample images to obtain multi-class typical labeled samples, wherein the multi-class typical sample images include front core images, inclined core images, adherent core images, and typical negative sample images;

[0032] a model training unit configured to train a target detection neural network model based on the multi-class typical labeled samples, and output corresponding classes;

[0033] a single-core area calculation unit configured to obtain a unique detection frame set of the single-terminal wire by using a non-maximum suppression algorithm according to the labeled samples of the front core images and the inclined core images, and calculate an average area of effective cores as a single-core area;

[0034] a core number calculation unit configured to traverse detection frames of adherent cores output by the target detection neural network model according to the single-core area, and calculate a core number of the adherent cores based on a ratio of each detection frame of the adherent cores to the single-core area.

[0035] In a third aspect, the present application further provides a computer device, which comprises a processor and a memory, and the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the method of any one of the above aspects.

[0036] In a fourth aspect, the present application further provides a computer storage medium, which stores a computer program, and the computer program is executed to implement the method of any one of the above aspects.

[0037] The single-terminal wire core number recognition method, system, computer device, and storage medium provided by the present application comprise the following steps: acquiring multi-class typical labeled samples of a single-terminal wire cutting end surface, wherein the multi-class typical sample images include front core images, inclined core images, adherent core images, and typical negative sample images; training a target detection neural network model based on the multi-class typical labeled samples, and outputting corresponding classes; obtaining a unique detection frame set of the single-terminal wire by using a non-maximum suppression algorithm according to the labeled samples of the front core images and the inclined core images, and calculating an average area of effective cores as a single-core area; and calculating a core number of adherent cores based on a ratio of each detection frame of the adherent cores to the single-core area. The target detection neural network model is trained by using the multi-class typical samples labeled in detail, the specific type of the core can be accurately recognized, the core number recognition can be performed accordingly, and the accuracy of core counting is improved. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments will be briefly introduced as follows. The accompanying drawings in the following description are only corresponding to some embodiments of the present application, and for those skilled in the art, other drawings of embodiments can also be obtained without creative labor on the basis of these drawings.

[0039] Figure 1 For one of the embodiments of the present application, the method flow chart of the core number identification method of the single-terminal wire;

[0040] Figure 2 For another embodiment of the present application, the method flow chart of the core number identification method of the single-terminal wire;

[0041] Figure 3 For one of the embodiments of the present application, the system block diagram of the core number identification system of the single-terminal wire. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.

[0044] Referring to Figure 1 , the core number identification method of the single-terminal wire, in one of the embodiments, comprises:

[0045] S101, a plurality of typical sample images of a cut end surface of a single-terminal wire are obtained, and the plurality of typical sample images are labeled to obtain a plurality of typical labeled samples. The plurality of typical sample images include front core images, inclined core images, adhered core images and typical negative sample images.

[0046] Specifically, the front core image refers to a complete metal cross-section that is directly opposite the camera, has a clear outline, and has appropriate brightness, which is the effective object for counting. The inclined core image refers to a core that only presents an elliptical or arc-shaped outline due to cutting inclination or bending, which is not an ideal front but still an effective core and needs to be counted in the total number. The adhesion core image refers to an area where two or more cores are closely attached and the boundary is blurred, which is marked as a whole frame and used to trigger the subsequent splitting algorithm. The typical negative sample image refers to a mirror reflection bright spot produced by the insulating outer skin under light, which may be approximately circular in shape but has no metallic texture, as well as cutting burrs, metal debris, dust, or other high-brightness artifacts that are easily mistaken for cores, and are all explicitly marked as negative samples.

[0047] Labeling these four types of typical sample images can cover almost all imaging conditions of single-terminal wire cutting end faces. In specific implementation, image data collection covers mainstream wires, including different core numbers or different cutting processes. Each type of sample has no less than 1000 images, and a total of ≥8000 high-quality images are constructed. When labeling, the boundary box strictly fits the target edge, and data enhancement strategies include random brightness adjustment, simulated side light shadow, adding Gaussian noise and local blur to improve generalization.

[0048] S102, training a target detection neural network model based on the multi-class typical labeled sample, and outputting the corresponding class.

[0049] In specific implementation, the image dataset is divided into training set, validation set and test set according to 7:2:1. The target detection neural network model adopts YOLOv8 target detection neural network model to realize high-precision and high-robustness recognition of the number of cores under complex imaging conditions. Based on the above four types of data sets, the YOLOv8 model is customized and trained to make it have joint perception ability for core state and interference source.

[0050] The model configuration and training details select YOLOv8m (medium) as the basic architecture; input resolution: 640x640 pixels; output class number: 4 (corresponding to the above four types); the loss weight of negative samples is increased by 1.5 times to strengthen the model's rejection ability for interference items.

[0051] The trained target detection neural network model outputs all the detection boxes and their classes of the single-terminal wire cutting end face, and only retains the detection results of the front core and the inclined core as the candidate effective core, and the detection results of the negative sample type are discarded directly. This target detection neural network model not only can identify what is a core, but also can identify what is not a core, which fundamentally suppresses false positives.

[0052] S103, obtaining a unique detection frame set of the single-terminal wire by using a non-maximum suppression algorithm according to the labeled samples of the front-line core image and the oblique-line core image, and calculating the average area of the line core in the unique detection frame set as the single-core area.

[0053] The detection frames of all the front-line core images and oblique-line core images of the cutting section of each type of single-terminal wire are labeled respectively, and the non-maximum suppression of the intersection over union of two detection frames is performed , repeated detection is merged, and a unique detection frame set is output , and the number of line cores is . At this time, each frame in the set represents an independent suspected line core target.

[0054] S104, traversing the detection frames of the adherent line core output by the target detection neural network model according to the single-core area, and calculating the number of line cores of the adherent line core based on the ratio of each detection frame of the adherent line core to the single-core area.

[0055] The average value of the detection frame area is taken as the single-core area , all the detection frames of the adherent line core are traversed, and the area of each detection frame of the adherent line core is calculated, and the adherent number is estimated .

[0056] ;

[0057] The cumulative adherent number is .

[0058] The line core number recognition method of the single-terminal wire of the embodiment can accurately recognize the specific types of line cores, including front-line cores, oblique-line cores, adherent line cores and typical negative samples, by training the target detection neural network model with the multi-class typical samples labeled in detail, which covers almost all imaging conditions of the cutting end surface of the single-terminal wire. In the detection process, the detection results of the front-line cores and the oblique-line cores are retained as candidate effective line cores, and the detection results meeting the negative sample type are directly discarded. For the adherent line core, the single-core area is calculated by using the non-maximum suppression according to the labeled samples of the front-line core image and the oblique-line core image, and the number of adherent line cores is calculated according to the ratio of each detection frame of the adherent line core to the single-core area. Further, the number of line cores of each type of cutting end surface is accurately recognized, and the accuracy of the single-terminal wire line core number detection is improved.

[0059] Referring to Figure 2 , in one of the embodiments, the line core number recognition method of the single-terminal wire includes:

[0060] S201, acquire multiple typical sample images of the cut end face of a single terminal wire, and annotate the multiple typical sample images to obtain multiple typical annotated samples. The multiple typical sample images include front wire core images, tilted wire core images, adhered wire core images, and typical negative sample images.

[0061] S202, Train the target detection neural network model based on the aforementioned typical labeled samples and output the corresponding category.

[0062] S203, based on the labeled samples of the front wire core image and the tilted wire core image, a non-maximum suppression algorithm is used to obtain a unique detection box set for the single terminal wire, and the average area of ​​the wire cores in the unique detection box set is calculated as the single core area.

[0063] S204, based on the single core area, traverse the detection boxes of the bonded wire cores output by the target detection neural network model, and calculate the number of the bonded wire cores based on the ratio of each detection box of the bonded wire core to the single core area.

[0064] S205, perform valid core verification on the detection boxes of frontal and tilted cores output by the target detection neural network model. If a core is valid, retain it; otherwise, discard it.

[0065] Specifically, the area A of each detection frame for the front-facing wire core, the tilted wire core, and the wire core after unbinding is calculated, and it is determined whether this area is within the preset area range of the valid wire core. If not, it is considered an invalid wire core;

[0066] Extract the edge pixels of the original image of the wire core corresponding to each detection box and perform ellipse fitting. If the number of edge pixels and the fitted ellipse with a Euclidean distance less than the preset value does not reach the preset ratio of 70%, it is determined to be an invalid wire core.

[0067] Calculate the number of pixels with brightness higher than the average brightness within the fitted ellipse region. If the number of such pixels accounts for 20% of the total number of pixels in the fitted ellipse region, it is determined to be a valid line core; otherwise, it is an invalid line core, determined to be a false detection, and is discarded.

[0068] Only when all of the above conditions are met will the wire cores within the detection frame be determined as valid wire cores, counted, and the purified set of valid wire cores output. The quantity is .

[0069] S206 Calculate the number of invalid cores removed, the number of cores after unbinding, and the sum of the number of valid front cores and tilted cores. If the sum is less than the standard number of cores, calculate the number of missing cores.

[0070] Specifically, if the current total number of detected cores of the single-terminal wire to be detected is less than the standard number of cores N0: .

[0071] If the total number of detected cores of the single-terminal wire to be detected is less than the standard number of cores N0: (N0 is the standard number of cores): Calculate the number of missing cores .

[0072] Construct a spatial point set of effective detected cores , extract the center coordinates of all effective cores from the spatial point set: , wherein . .

[0073] S207, based on the spatial point set of effective detected cores, extract the center coordinates of all effective cores, and calculate the local typical distance between the center coordinates of the effective cores.

[0074] Calculate the local typical distance :

[0075] For each center coordinate of a core , find its nearest 3 points, and calculate the average distance:

[0076] ;

[0077] Take the median of all as the local typical distance:

[0078] .

[0079] S208, take half of the local typical distance as the search step, and in the core region of the core original image, detect the missed voids of the core original image according to the preset proportion of the local typical distance as the radius of the search step.

[0080] Specifically, take half of the local typical distance as the search step , in the core region of the core original image, slide a circular detection window with the search step , and according to the preset proportion of the local typical distance as the radius .

[0081] Traverse the core region of the core original image, and if there is no center coordinate of the effective core falling into the circular detection window, mark it as a candidate void. For each window center , perform void determination: if there is no above-mentioned center coordinate of the effective core falling into the window, that is , , , mark it as a candidate void.

[0082] In one of the embodiments, the candidate voids are further verified, specifically:

[0083] extract the center coordinates of each candidate void based on a preset multiple of the average width of the detection boxes in the unique detection box set cut out a square detection box on the wire core original image as the side length ;

[0084] If the edge pixel points of the wire core original image in the square detection box are fitted by an ellipse, the number of edge pixel points to the Euclidean distance of the fitted ellipse is less than a preset value by a preset proportion of 70%;

[0085] and, the pixel brightness in the fitted ellipse region is higher than the brightness outside the fitted ellipse region by a preset brightness difference of 30, and falls into a preset brightness interval , determine that the candidate void is an effective missed detection void, and generate a supplementary detection box in the effective missed detection void region.

[0086] S209, based on the number of missed detection voids, complete the number of wire cores of the single terminal wire.

[0087] The final number of wire cores of the single terminal wire to be tested is the total number of wire cores after the missed detection voids are completed.

[0088] The wire core number recognition method of the single terminal wire of the embodiment verifies the detection boxes corresponding to the front wire core, the inclined wire core, and the wire core after the adhesion is removed output by the target detection neural network model. When the size and visual features of the wire core meet the corresponding conditions at the same time, it is determined that the wire core is effective. On the basis of fine type recognition, the accuracy of wire core recognition is further guaranteed. If the effective wire core of the single terminal wire after filtering the invalid detection box is less than the standard wire core number, it is detected whether there is a missed detection void, and the visual features of the missed detection void are further verified to determine whether the visual features of the wire core are met. Finally, the actual number of wire cores is obtained. This method can effectively filter the false detection detection box and complete the missed detection detection box, covering almost all false detection cases, greatly improving the accuracy of wire core counting.

[0089] Referring to Figure 3 , the embodiment of the application also proposes a wire core number recognition system of a single terminal wire, in one of the embodiments, comprising:

[0090] A sample acquisition unit 10 is configured to acquire multiple types of typical sample images of a cut end surface of a single terminal wire, and label the multiple types of typical sample images to obtain multiple types of typical labeled samples. The multiple types of typical sample images include front wire core images, inclined wire core images, adhesion wire core images, and typical negative sample images.

[0091] The model training unit 20 is configured to train a target detection neural network model based on the plurality of typical labeled samples, and output a corresponding category.

[0092] The single-core area calculation unit 30 is configured to obtain a unique detection frame set of the single-core terminal wire by using a non-maximum suppression algorithm based on the labeled samples of the front core image and the oblique core image, and calculate an average area of the core in the unique detection frame set as a single-core area.

[0093] The core quantity calculation unit 40 is configured to traverse the detection frame of the adhered core output by the target detection neural network model based on the single-core area, and calculate the core quantity of the adhered core based on a ratio of each detection frame of the adhered core to the single-core area.

[0094] In one of the embodiments, the system further comprises,

[0095] The core verification unit is configured to perform effective core verification on the detection frame of the front core and the oblique core output by the target detection neural network model, and keep the detection frame if it is an effective core, or discard the detection frame if it is not an effective core.

[0096] In one of the embodiments, the system further comprises,

[0097] The missing quantity calculation unit is configured to calculate the sum of the core quantity of the adhered core and the quantity of the effective front core and the oblique core, and calculate the missing core quantity if the sum is less than a standard core quantity.

[0098] The typical distance calculation unit is configured to construct a spatial point set based on the effective detected core, extract the center coordinates of all the effective cores in the spatial point set, and calculate a local typical distance between the center coordinates of the effective cores.

[0099] The missed detection cavity detection unit is configured to take half of the local typical distance as a search step, detect a missed detection cavity of the core original image in a core region of the core original image by taking the search step and a preset proportion of the local typical distance as a radius.

[0100] The quantity complement unit is configured to complement the core quantity of the single-core terminal wire based on the quantity of the missed detection cavity.

[0101] In one of the embodiments, the core verification unit is specifically configured to:

[0102] Calculate the area of each detection frame of the front core, the oblique core and the core after the adhesion is removed, and determine whether the area is in a preset area interval of an effective core, and determine that the core is not an effective core if the area is not in the preset area interval of the effective core.

[0103] extracting edge pixel points of the original image of the line core corresponding to each detection frame and performing ellipse fitting, if the number of edge pixel points to the Euclidean distance of the fitted ellipse is less than a preset value and does not reach a preset proportion, it is determined that the line core is invalid;

[0104] calculating the number of pixel points with brightness higher than the average brightness in the fitted ellipse region, if the proportion of the pixel point number to the total pixel number of the fitted ellipse region reaches a preset proportion, it is determined that the line core is valid, otherwise it is determined that the line core is invalid, and the false detection is rejected.

[0105] In one of the embodiments, the missed detection cavity detection unit is specifically used for:

[0106] Taking half of the local typical interval as a search step, sliding a circular detection window with the search step and a preset proportion of the local typical interval as a radius in the line core region of the original image of the line core;

[0107] Traversing the line core region of the original image of the line core, if no center coordinates of the valid line core fall into the circular detection window, it is marked as a candidate cavity.

[0108] In one of the embodiments, the system further includes a missed detection cavity verification unit, which is used for:

[0109] extracting the center coordinates of each candidate cavity, and cutting out a square detection frame on the original image of the line core based on the center coordinates and a preset multiple of the average width of the detection frame in the unique detection frame set as the side length;

[0110] if the edge pixel points of the original image of the line core in the square detection frame are fitted by an ellipse, the number of edge pixel points to the Euclidean distance of the fitted ellipse is less than a preset value and reaches a preset proportion;

[0111] and, the pixel brightness in the fitted ellipse region is higher than the brightness outside the fitted ellipse region by a preset brightness difference and falls into a preset brightness interval, it is determined that the candidate cavity is a valid missed detection cavity, and a supplementary detection frame is generated in the valid missed detection cavity region.

[0112] In one of the embodiments, the typical interval calculation unit is specifically used for:

[0113] For the center coordinates of each valid line core, the average distance of the center coordinates of the three adjacent valid line cores is calculated, and the median of all the average distances corresponding to the valid line cores is taken as the local typical interval.

[0114] The specific process of each unit performing the above corresponding steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0115] The embodiment of the present application further provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the method steps in any of the method embodiments.

[0116] The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is executed to implement the method steps in any of the method embodiments.

[0117] In the above embodiments of the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic, and the division of the units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0118] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.

[0119] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or software function unit. When the integrated unit is implemented in the form of software function unit and sold or used as a separate product, it can be stored in a computer readable storage medium.

[0120] Based on such understanding, the technical scheme of the present application, essentially or in part, or all or part of the technical scheme can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for causing a computer device (which can be a mobile terminal, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various other media that can store program codes.

[0121] In summary, although the present application has been disclosed with preferred embodiments as above, the protection scope of the present application is not limited thereto, and any person skilled in the art, according to the technical concept of the technical scheme of the present application, can make equivalent replacements or changes within the technical scope disclosed by the present application, which shall be covered within the protection scope of the present application.

[0122] The technical features of the above-described embodiments can be combined arbitrarily, and in order to make the description concise, all possible combinations of the technical features in the above-described embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they shall be considered as the scope disclosed in the present application.

Claims

1. A method for identifying the number of wire cores in a single-terminal wire, characterized in that, include: Multiple typical sample images of the cut end face of a single terminal wire are obtained, and the multiple typical sample images are annotated to obtain multiple typical annotated samples. The multiple typical sample images include front wire core images, tilted wire core images, adhered wire core images and typical negative sample images. The target detection neural network model is trained based on the aforementioned typical labeled samples, and the corresponding category is output. The non-maximum suppression algorithm is used to obtain a unique detection box set for the single-terminal wire based on the labeled samples of the frontal wire core image and the tilted wire core image, and the average area of ​​the wire core in the unique detection box set is calculated as the single core area. The detection boxes of the bonded wire cores output by the target detection neural network model are traversed according to the single core area, and the number of bonded wire cores is calculated based on the ratio of each detection box of the bonded wire core to the single core area.

2. The method according to claim 1, characterized in that, It also includes, The detection boxes for frontal and tilted line cores output by the target detection neural network model are validated for valid line cores. If a line core is valid, it is retained; otherwise, it is discarded.

3. The method according to claim 2, characterized in that, The detection boxes for frontal and tilted line cores output by the target detection neural network model are then validated for valid line cores. Valid line cores are retained; otherwise, they are discarded. The process continues with... Calculate the number of the adhered wire cores and the sum of the number of valid front wire cores and tilted wire cores. If the sum is less than the standard number of wire cores, calculate the number of missing wire cores. Based on the valid inspected wire cores, a spatial point set is constructed, the center coordinates of all valid wire cores are extracted, the local typical spacing between the center coordinates of the valid wire cores is calculated, and for the center coordinates of each valid wire core, the average distance between the center coordinates of the three adjacent valid wire cores is calculated, and the median of the average distances corresponding to all valid wire cores is taken as the local typical spacing. Using half of the local typical spacing as the search step size, the missed holes in the original core image are detected in the core region of the original core image with the search step size and the radius of the local typical spacing as the preset ratio. The number of wire cores in a single terminal wire is determined based on the number of missed holes.

4. The method according to claim 2, characterized in that, The process of validly verifying the detection boxes of frontal and tilted line cores output by the target detection neural network model, retaining valid line cores and discarding them, specifically involves: Calculate the area of ​​each detection frame for the front wire core and the tilted wire core, and determine whether the area is within the preset area range of the valid wire core. If not, it is determined to be an invalid wire core. Extract the edge pixels of the original image of the wire core corresponding to each detection box and perform ellipse fitting. If the number of edge pixels and the fitted ellipse that are less than the preset value does not reach the preset proportion, the wire core is judged as invalid. Calculate the number of pixels with brightness higher than the average brightness within the fitted ellipse region. If the proportion of such pixels to the total number of pixels in the fitted ellipse region does not reach a preset proportion, it is determined to be an invalid line core, a false detection, and is removed. Only when all of the above conditions are met will the wire cores within the detection frame be considered valid wire cores and counted.

5. The method according to claim 3, characterized in that, The step of using half of the local typical spacing as the search step size, and detecting missed holes in the original core image of the core region with the search step size and a preset ratio of the local typical spacing as the radius, includes: Using half of the local typical spacing as the search step size, a circular detection window is slid in the core region of the original core image with the search step size and a radius based on a preset ratio of the local typical spacing. Traverse the core region of the original core image. If the center coordinates of no valid core fall within the circular detection window, mark it as a candidate hole.

6. The method according to claim 5, characterized in that, After traversing the wire core region of the original wire core image and marking it as a candidate hole if no valid wire core's center coordinate falls within the circular detection window, the process further includes: Extract the center coordinates of each candidate hole, and based on the center coordinates, use a preset multiple of the average width of the detection boxes in the unique detection box set as the side length to crop a square detection box from the original image of the wire core. If the number of edge pixels of the original image of the wire core in the square detection frame that are fitted with an ellipse and whose Euclidean distance to the fitted ellipse is less than a preset value reaches a preset proportion; Furthermore, if the pixel brightness within the fitted ellipse region is higher than the brightness outside the fitted ellipse region by a preset brightness difference and falls within a preset brightness range, the candidate hole is determined to be a valid missed hole, and a supplementary detection box is generated in the region of the valid missed hole.

7. A single-terminal wire core count identification system, characterized in that, include: The sample acquisition unit is used to acquire multiple typical sample images of the cut end face of a single terminal wire, and to annotate the multiple typical sample images to obtain multiple typical annotated samples. The multiple typical sample images include front wire core images, tilted wire core images, adhered wire core images and typical negative sample images. The model training unit is used to train the target detection neural network model based on the multi-class typical labeled samples and output the corresponding category; The single-core area calculation unit is used to obtain the unique detection box set of the single terminal wire by using a non-maximum suppression algorithm based on the labeled samples of the front wire core image and the tilted wire core image, and to calculate the average area of ​​the wire core in the unique detection box set as the single-core area. The core count calculation unit is used to traverse the detection boxes of the bonded cores output by the target detection neural network model according to the single core area, and calculate the core count of the bonded cores based on the ratio of each detection box of the bonded cores to the single core area.

8. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program that, when loaded and executed by the processor, implements the method as described in any one of claims 1 to 6.

9. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed, implements the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Visual detection method, device and equipment for number of wire harness core wires and storage medium

    CN117197067A

  • Bar count visual identification automatic calculation system and method

    CN120852303A