Cable number identification system based on machine vision

Through deep learning technology based on machine vision, dot-shaped text features on cables are extracted and identified, which solves the problem of low cable number recognition accuracy in the prior art, and achieves higher recognition accuracy and wiring quality.

CN119580279AActive Publication Date: 2025-03-07NANJING SIWEI VECTOR TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510098466.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-03-07
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify the dot number on the cable, especially the cable diameter is small, which leads to a significant decrease in the identification accuracy, affecting the wiring quality of the electrical control box and the stability of the equipment.

Method used

Using a cable number recognition system based on machine vision, the dot-shaped text features on the cable are automatically extracted and character segmentation and recognition are performed through the combination of deep learning feature extraction and significance scores. The system includes a line character acquisition module, a depth feature map extraction module, a feature vector module, a linear mapping module, a classification module and a cable number generation module.

Benefits of technology

It improves the ability to adapt to complex character forms and scenes, significantly improves the recognition accuracy of cable numbers, reduces background interference, enhances character consistency and geometric consistency, and ensures the wiring quality of the electrical control box and the stability of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580279A_ABST
    Figure CN119580279A_ABST
Patent Text Reader

Abstract

The invention discloses a cable number identification system based on machine vision, and the system comprises a line character obtaining module which is used for obtaining a line character image of a cable number; the depth feature map extraction module is used for extracting a depth feature map of the cable number from the line character image; the feature vector module and the linear mapping module are used for inputting the high-dimensional feature vector of the line character image into a full-connection layer, and the full-connection layer performs linear mapping on the high-dimensional feature vector to obtain one-dimensional vector representation of the line character image; the classification module is used for enabling the one-dimensional vector representation of the line character image to pass through a softmax function to generate a classification label of each line character image; and the cable number generation module is used for acquiring the classification labels of all the line character images, and generating cable numbers according to the sequential combination of the characters in the images. According to the method, the significant feature map with higher expressive power is generated through the significance score, and finally the cable number is generated, so that the identification of the cable number is complete.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a number recognition system, in particular to a cable number recognition system based on machine vision. Background Art

[0002] The electrical control box is an important part of the marine control system, and its wiring quality is directly related to the stability, safety and efficiency of the equipment. In the production process of the electrical control box, the production of the circuit module needs to go through multiple processes of sorting cables, socketing, crimping, plugging terminals, and pressing into the circuit. Among them, the sorting and number matching of cables are key links, and traditional automated production usually relies on manual cable sorting and socketing. However, due to the possibility of manual recognition errors, circuit module wiring errors often occur, which in turn leads to unstable operation of the electrical control box produced in the end, and may even cause damage to the equipment, bringing serious safety hazards and economic losses. The patent document with patent publication number CN118366174A discloses a low-computing-power character rapid recognition method based on machine vision, which performs character recognition based on the closed-loop contour of the connected domain obtained, and realizes accurate and rapid recognition of characters. However, in the above-mentioned patent technology and prior art, its character recognition requires accurate image recognition through high-quality images, and the numbers on the cables are usually presented in the form of dot-shaped inkjet coding.

[0003] Traditional methods for spot text recognition mainly use image processing steps such as grayscale processing, binarization, and median filter noise reduction to convert spot text into continuous lines, then retain the text area through image cutting, and use matrix rotation algorithm to perform tilt correction, and finally perform character segmentation and template matching. This method has high requirements on the quality of the original image and is more suitable for flat spot text or spot text on cables with larger diameters. When the cable diameter is small, the spot text is easily deformed due to insufficient shooting angle or resolution, resulting in a significant decrease in recognition accuracy. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention provides a cable number recognition system based on machine vision, which automatically extracts the dot text features on the cable through deep learning features and significance scores in the features, and can also efficiently complete character segmentation and recognition, thereby solving the technical problems raised in the background technology.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0006] The cable number identification system based on machine vision includes:

[0007] A line character acquisition module is used to acquire a line character image of a cable number;

[0008] A depth feature map extraction module, used to extract a depth feature map of a cable number from the line character image;

[0009] A feature vector module, used for flattening the depth feature map of the line character image into a high-dimensional feature vector of the line character image;

[0010] A linear mapping module is used to input the high-dimensional feature vector of the line character image into the fully connected layer, and the fully connected layer performs linear mapping on it to obtain a one-dimensional vector representation of the line character image;

[0011] The classification module is used to pass the one-dimensional vector representation of the line character image through the softmax function to generate a classification label for each line character image;

[0012] The cable number generation module is used to obtain the classification labels of all line character images and generate the cable numbers according to the order of the characters in the image.

[0013] In some embodiments, obtaining a line character image of a cable number includes:

[0014] S1-1, obtaining a cable image including a cable number; wherein the cable number is composed of dotted characters;

[0015] S1-2, performing target detection on the cable image, and extracting the bounding box coordinates of each dot character in the cable image;

[0016] S1-3, preprocessing the cable image after target detection, so that the dot characters in the cable image are converted into regular line characters;

[0017] S1-4. According to the bounding box coordinates extracted from the target detection, a region containing each regular line character is cropped from the preprocessed cable image to obtain a line character image.

[0018] In some embodiments, extracting the depth feature map of the cable number from the line character image includes:

[0019] S2-1, receiving the line character image as the input of the convolution model, extracting its local features by sliding the convolution kernel, and obtaining N local feature maps in the line character image; wherein each local feature map represents a type of visual feature of the line character image;

[0020] S2-2, nonlinearly activate N local feature maps to generate N activated feature maps;

[0021] S2-3, pooling the N activated feature maps, and selecting M significant feature maps from the several activated feature maps; wherein the significant feature map retains the high-level abstract features of the maximum local feature significance score through the maximum pooling operation;

[0022] S2-4. Define a set of M significant feature maps as a depth feature map of the line character image.

[0023] In some embodiments, performing target detection on the cable image and extracting the bounding box coordinates of each dot character in the cable image includes:

[0024] S1-2-1, inputting the cable image into a pre-trained target detection model;

[0025] The target detection model is based on a convolutional neural network and is iteratively generated through pre-training of supervised learning. Its iterative goal is to extract image features of the cable image and generate a candidate frame feature vector;

[0026] S1-2-2, dividing the cable image input to the target detection model into B×B grid areas;

[0027] S1-2-3, extracting features from each grid area to generate a candidate box feature vector corresponding to each grid area; wherein the candidate box feature vector includes: candidate box boundary coordinates, category probability that the candidate box belongs to a dot character, and category confidence;

[0028] S1-2-4, from the B×B candidate box feature vectors, select the candidate box feature vectors whose category confidence is higher than the preset threshold;

[0029] S1-2-5. Perform non-maximum suppression on the filtered candidate box feature vectors, remove overlapping candidate boxes, retain the boundary coordinates of the candidate boxes where the dot-like characters are located, and generate the boundary box coordinates of the dot-like characters.

[0030] In some of the embodiments, the cable image after target detection is preprocessed so that the dot characters in the cable image are converted into regular line characters, including:

[0031] S1-3-1, performing grayscale processing on the cable image after target detection, and converting the cable image into a grayscale image;

[0032] S1-3-2, performing binarization of the grayscale image, dividing pixels in the grayscale image into foreground characters and background based on a binarization threshold;

[0033] S1-3-3, performing mean filtering and noise reduction on the grayscale image after binarization to remove the regional noise of the foreground characters and obtain a noise-reduced image;

[0034] S1-3-4, performing edge detection on the denoised image, extracting character outlines, and obtaining an image with clear character outlines;

[0035] S1-3-5. Dilate the image with clear character outlines to fill the holes in the outlines caused by noise, so as to convert the dot-like characters into regular line characters.

[0036] In some of the embodiments, a region including each conventional line character is cropped from the preprocessed cable image according to the bounding box coordinates extracted from the target detection to obtain a line character image, including:

[0037] S1-4-1, read the bounding box coordinates of each dot character one by one;

[0038] S1-4-2, determining a cropping range of the dotted characters according to the boundary box coordinates; wherein, if the boundary box coordinates exceed the cable image boundary, adjusting the cropping range to the image boundary;

[0039] S1-4-3. According to the cropping range, a regular line character area is cut out from the preprocessed cable image to obtain the line character image.

[0040] In some of the embodiments, the salient feature map retains high-level abstract features with the maximum local feature saliency score through a maximum pooling operation, including:

[0041] S2-3-1. Extract the pixel activation value of each activated feature from each activated feature map, calculate and define it as a significance score;

[0042] S2-3-2, based on the pixel resolution of the activated feature map, predefine the size and step size of the coverage window;

[0043] S2-3-3, sliding the cover window to the first cover area according to the step size of the cover window;

[0044] S2-3-4, calculating the significance score of each activated feature map in the first coverage area of ​​the coverage window;

[0045] S2-3-5. Compare the significance scores in the first coverage area, and select the activated feature corresponding to the maximum significance score;

[0046] S2-3-6, defining the activated feature corresponding to the maximum significance score as a significant feature, and combining them to generate a significant feature map;

[0047] S2-3-7, repeating steps S2-3-1 to S2-3-6 to sequentially generate a plurality of significant feature maps of the line character image.

[0048] In some of the embodiments, extracting the pixel activation value of the activated feature from each activated feature map, calculating and defining it as a significance score, includes:

[0049] S2-3-1-1, extracting all pixel activation values ​​after the convolution kernel and nonlinear activation processing in the activated feature map, and combining them to generate a pixel activation value set;

[0050] The pixel activation value expression is:

[0051] ;

[0052] in, Represents the pixel activation value, representing the position Feature strength after processing by convolution kernel and nonlinear activation function; Represents the cumulative summation of the convolution kernel in sliding, which is used to traverse each position of the convolution kernel; represents the weight value of the convolution kernel, Represents the two-dimensional index of the convolution kernel; represents the pixel value of the line character image; b represents the bias value, which is used to adjust the overall offset of the pixel activation value; f represents the nonlinear activation function;

[0053] S2-3-1-2. Calculate the significance score of the activated feature map according to the pixel activation value set;

[0054] The expression for calculating the significance score of the activated feature map is:

[0055] ;

[0056] Among them, S represents the significance score, represents the pixel average of the set of pixel activation values, Represents the standard deviation of the pixel activation value set, which is used to measure the distribution dispersion of the pixel activation value. represents the weight coefficient of the pixel average, is the weight coefficient of standard deviation; represents the i-th pixel activation value, and n represents the total number of pixel activation values.

[0057] In some of the embodiments, the one-dimensional vector representation of the line character image is passed through a softmax function to generate a classification label for each line character image, including:

[0058] S5-1. Input the one-dimensional vector of the line character image into the softmax function to convert it into a probability distribution; wherein the probability distribution represents the probability that the one-dimensional vector of the line character image belongs to category j.

[0059] S5-2. Select the category j with the largest probability from the probability distribution as the classification label of the line character image.

[0060] In some embodiments, obtaining classification labels of all line character images and combining the characters in the order in the images to generate the cable number includes:

[0061] S6-1. Read the classification label of each line character image one by one , and stored as tag reading sequence L1 according to the reading order;

[0062] The expression of the tag reading sequence is:

[0063] ;

[0064] Where L1 represents the tag reading sequence, k represents the total number of line character images;

[0065] S6-2, according to the spatial order of the line character images in the original cable image, convert the reading order into a spatial order to reorder the label reading sequence and generate a label spatial sequence;

[0066] The expression of the label space sequence is:

[0067] ;

[0068] in, represents the label space sequence, represents the kth sorted classification label, s represents the index mapping function of the sorted line character image, and represents the mapping from the label reading sequence to the label space sequence;

[0069] S6-3, sequentially concatenate the classification labels in the label space sequence into the cable number N.

[0070] The expression of the cable number N is:

[0071] ;

[0072] Among them, Concat represents a concatenation operation.

[0073] The present invention provides a cable number identification system based on machine vision, which has the following beneficial effects:

[0074] By preprocessing the dot characters, they are converted into line character images with clear contours and coherent shapes, providing optimized data for subsequent deep feature extraction. At the same time, the present invention uses a target detection model to locate the bounding box of the cable image, effectively segment the character area, reduce background interference, and use image preprocessing steps such as grayscale, binarization, noise reduction, edge detection and expansion processing to enhance the character morphological characteristics, thereby improving character coherence and geometric consistency. Compared with traditional rule-based matching methods, the present invention significantly improves the ability to adapt to complex character morphology and scenes.

[0075] Furthermore, the significance score of the present invention combines weighted average and standard deviation to quantitatively evaluate the set of pixel activation values ​​of the activated feature map, thereby achieving accurate screening of feature importance. Compared with the traditional global pooling method, this method can retain the high-level abstract features with the largest significance score in the local features, thereby generating a significant feature map with higher expressiveness. Finally, combined with convolution kernel extraction and nonlinear activation operations, the cable number is generated by combining the classification labels, thereby completing the recognition of the cable number. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is a structural block diagram of the cable number identification system based on machine vision of the present invention;

[0077] Figure 2 A schematic diagram of the identification steps of the cable number identification system based on machine vision of the present invention;

[0078] Figure 3 Schematic diagram of the steps for calculating the significance score of the present invention. DETAILED DESCRIPTION

[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0080] Example 1: Please refer to Figures 1 to 3 The present invention provides a cable number identification system based on machine vision, which is characterized by comprising:

[0081] The line character acquisition module is used to obtain the line character image of the cable number; wherein the line character image represents the line character image formed after the dot characters in the cable number undergo a preprocessing step, which retains the geometric features and spatial layout of the dot characters and enhances the continuity of the characters. Compared with dot characters, the line character image has a more coherent form and clearer edges, which is suitable for deep feature extraction and classification processing.

[0082] A deep feature map extraction module is used to extract a deep feature map of the cable number from the line character image; wherein the deep feature map represents high-level abstract features extracted from the line character image through a convolutional neural network.

[0083] A feature vector module is used to flatten the depth feature map of the line character image into a high-dimensional feature vector of the line character image; wherein the flattening process maps the two-dimensional features in the depth feature map to the one-dimensional space one by one, realizes the linear arrangement of all feature values, and constructs a flat high-dimensional feature vector that can characterize the overall characteristics of the line character image.

[0084] The linear mapping module is used to input the high-dimensional feature vector of the line character image into the fully connected layer, and the fully connected layer performs linear mapping on it to obtain a one-dimensional vector representation of the line character image; wherein, the linear mapping of the fully connected layer is to multiply the high-dimensional feature vector by the weight of the fully connected layer, and then sum it with the bias of the fully connected layer, so as to map it into a one-dimensional vector representation.

[0085] The classification module is used to pass the one-dimensional vector representation of the line character image through the softmax function to generate the classification label of each line character image; the softmax function is a normalization function, which is mainly used in multi-classification tasks. It converts any real value into a probability value ranging from 0 to 1 by calculating the proportion of the exponential value of each component of the input vector to the total exponential value, and ensures that the sum of all probability values ​​is 1. Then, the classification label is determined by selecting the probability.

[0086] The cable number generation module is used to obtain the classification labels of all line character images and generate the cable numbers according to the order of the characters in the image.

[0087] In summary, this embodiment provides a cable number recognition system based on machine vision based on the application scenario of cable number recognition. The system generates line character images by preprocessing dot characters to make the character shape clearer and more coherent, and then combines deep learning to extract its high-level depth features, and then converts the depth features into corresponding classification labels until a cable number based on machine recognition is generated.

[0088] Among them, the acquisition steps of the line character acquisition module include:

[0089] S1-1, obtaining a cable image including a cable number; wherein the cable number is composed of dotted characters;

[0090] S1-2, performing target detection on the cable image, and extracting the bounding box coordinates of each dot character in the cable image;

[0091] S1-3, preprocessing the cable image after target detection, so that the dot characters in the cable image are converted into regular line characters;

[0092] S1-4. According to the bounding box coordinates extracted from the target detection, a region containing each regular line character is cropped from the preprocessed cable image to obtain a line character image.

[0093] In summary, this embodiment obtains a cable image containing a cable number, performs target detection on it, and extracts the bounding box coordinates of each dot character; then, the cable image after target detection is preprocessed to convert the dot characters into regular line characters; finally, according to the extracted bounding box coordinates, the area containing each regular line character is cropped from the preprocessed cable image to obtain a line character image. This embodiment effectively converts dot characters into line character images that are more suitable for recognition, laying a data foundation for deep feature extraction.

[0094] Furthermore, the extraction step of the deep feature map extraction module includes:

[0095] S2-1, receiving the line character image as the input of the convolution model, extracting its local features by sliding the convolution kernel, and obtaining N local feature maps in the line character image; wherein each local feature map represents a type of visual feature of the line character image;

[0096] S2-2, nonlinearly activate N local feature maps to generate N activated feature maps;

[0097] S2-3, pooling the N activated feature maps, and obtaining M significant feature maps from the several activated feature maps; wherein the significant feature map retains the high-level abstract features of the maximum local feature significance score through the maximum pooling operation;

[0098] S2-4. Define a set of M significant feature maps as a depth feature map of the line character image.

[0099] In summary, this embodiment uses a convolution model to perform deep feature extraction on line character images. First, the convolution kernel is used to slide and extract local features to generate multiple local feature maps. Then, the local feature maps are nonlinearly activated to generate more expressive activated feature maps. Subsequently, the feature with the largest significance score is selected from the activated feature map through the maximum pooling operation to extract a significant feature map with a high-level abstract meaning. Finally, all significant feature maps are combined to form a deep feature map. This embodiment effectively retains the key visual features in the line character image through deep feature extraction, and can more accurately describe the high-level semantic information of the cable number characters.

[0100] Furthermore, step S1-2 of extracting the bounding box coordinates specifically includes:

[0101] S1-2-1, inputting the cable image into a pre-trained target detection model;

[0102] The target detection model is based on a convolutional neural network and is iteratively generated through pre-training of supervised learning. Its iterative goal is to extract image features of the cable image and generate a candidate frame feature vector;

[0103] S1-2-2, dividing the cable image input to the target detection model into B×B grid areas;

[0104] S1-2-3, extracting features from each grid area to generate a candidate box feature vector corresponding to each grid area; wherein the candidate box feature vector includes: candidate box boundary coordinates, category probability that the candidate box belongs to a dot character, and category confidence;

[0105] S1-2-4, from the B×B candidate box feature vectors, select the candidate box feature vectors whose category confidence is higher than the preset threshold;

[0106] S1-2-5. Perform non-maximum suppression on the filtered candidate box feature vectors, remove overlapping candidate boxes, retain the boundary coordinates of the candidate boxes where the dot-like characters are located, and generate the boundary box coordinates of the dot-like characters.

[0107] Specifically, in the output of the target detection model, the same target (such as dotted characters) may have multiple overlapping candidate boxes, and these candidate boxes may correspond to different confidence levels. Non-maximum suppression is a commonly used post-processing algorithm that is used to retain the best candidate boxes from overlapping candidate boxes and eliminate redundant boxes. It sorts all candidate boxes by confidence, and the boxes with high confidence are retained first. The overlap between each candidate box and the current highest confidence box is calculated. If the overlap exceeds the preset threshold, the candidate box is removed; the above steps are repeated for the remaining candidate boxes until all candidate boxes are processed. Through non-maximum suppression, candidate boxes with high overlap are removed, and only candidate boxes with the highest confidence and the smallest overlap with other boxes are retained. After removing redundant boxes, each target area (dotted characters) will only correspond to one final candidate box, that is, the boundary coordinates of the candidate box where the dotted characters are retained.

[0108] Furthermore, the step S1-3 of converting the conventional line characters specifically includes:

[0109] S1-3-1. Grayscale processing is performed on the cable image after target detection, and the cable image is converted into a grayscale image, thereby reducing the computational complexity and weakening the influence of illumination.

[0110] Specifically, the original cable image is an RGB color image, in which each pixel has three channels (red, green, and blue), and the pixel value of each channel needs to be processed separately. The grayscale image is converted into a single-channel image (that is, each pixel only retains one grayscale value) by weighted averaging the values ​​of the three RGB channels. After reducing from three channels to a single channel, the amount of data processed for each pixel is reduced to one-third of the original, thereby reducing the computational complexity.

[0111] In addition, RGB color images are sensitive to lighting conditions. For example, the same cable may show different colors and brightness under different lighting conditions, which leads to unstable image processing results. Grayscale compression compresses color information into brightness information, removing the influence of color channels. Only brightness is retained as the processing basis, making the processing results less sensitive to different lighting conditions.

[0112] S1-3-2. Binarize the grayscale image and divide the pixels in the grayscale image into foreground characters and background based on the binarization threshold; thereby enhancing the contrast between the dot-like characters and the background through binarization.

[0113] S1-3-3. Perform mean filtering and noise reduction on the binarized grayscale image to remove regional noise of the foreground characters and obtain a denoised image, thereby enhancing the overall coherence of the character area.

[0114] S1-3-4, performing edge detection on the denoised image, extracting character outlines, and obtaining an image with clear character outlines;

[0115] S1-3-5. Dilate the image with clear character outlines to fill the holes in the outlines caused by noise, so as to convert the dot-like characters into regular line characters.

[0116] In summary, this embodiment discloses a specific method of preprocessing, which sequentially performs grayscale processing, binarization processing, mean filter noise reduction, edge detection, and dilation processing on the image, effectively converting dot characters into regular conventional line characters. Grayscale processing reduces computational complexity and weakens the impact of lighting; binarization enhances the contrast between characters and background; mean filter noise reduction improves the overall coherence of the character area; edge detection makes the character outline clearer; and dilation operations fill in the holes in the character outline, generating a coherent and regular line character morphology. This embodiment significantly enhances the geometric morphology and coherence of characters, and provides optimized data for subsequent deep feature extraction and recognition.

[0117] Furthermore, step S1-4 specifically includes:

[0118] S1-4-1, read the bounding box coordinates of each dot character one by one;

[0119] Specifically, a bounding box is a rectangular box used to represent the target area detected in an image. Each bounding box is described by a set of coordinates to describe its position and size. In the target detection task, the model generates a corresponding bounding box for each target (such as a dot character) to describe the position of the character in the image. In this embodiment, the target detection model outputs the rectangular box coordinates of the bounding box, i.e., the upper left corner coordinates and the lower right corner coordinates; it is the result generated by a pre-trained target detection model; the target detection model (such as the YOLO algorithm, FasterR-CNN, etc.) can automatically identify targets in the image through training and generate a corresponding bounding box for each target. Of course, the YOLO algorithm is generally expressed as a center point coordinate method, including the center point coordinates. , width w and height h; then use the center point coordinate conversion formula to convert it to the upper left corner coordinates

[0120] and the lower right corner coordinates ;

[0121] The center point coordinate conversion formula is:

[0122] ;

[0123] S1-4-2, determining a cropping range of the dotted characters according to the boundary box coordinates; wherein, if the boundary box coordinates exceed the cable image boundary, adjusting the cropping range to the image boundary;

[0124] S1-4-3. According to the cropping range, a regular line character area is cut out from the preprocessed cable image to obtain the line character image.

[0125] In summary, this embodiment uses the extracted bounding box coordinates to crop the area containing each regular line character from the pre-processed cable image, thereby effectively achieving the segmentation and extraction of the character area.

[0126] In this embodiment, the step of acquiring the salient feature map specifically includes:

[0127] S2-3-1. Extract the pixel activation value of each activated feature from each activated feature map, calculate and define it as a significance score;

[0128] S2-3-2, based on the pixel resolution of the activated feature map, predefine the size and step size of the coverage window;

[0129] S2-3-3, sliding the cover window to the first cover area according to the step size of the cover window;

[0130] S2-3-4, calculating the significance score of each activated feature map in the first coverage area of ​​the coverage window;

[0131] S2-3-5. Compare the significance scores in the first coverage area, and select the activated feature corresponding to the maximum significance score;

[0132] S2-3-6, defining the activated feature corresponding to the maximum significance score as a significant feature, and combining them to generate a significant feature map;

[0133] S2-3-7, repeating steps S2-3-1 to S2-3-6 to sequentially generate a plurality of significant feature maps of the line character image.

[0134] In summary, this embodiment calculates the significance score of each activated feature map by pixel activation value, and uses the coverage window to gradually slide and calculate the significance score in the coverage area; the feature corresponding to the maximum significance score in the coverage area is selected as the significant feature, and finally combined to generate a significant feature map. By extracting the significant feature map, the abstract expression ability of the deep feature is improved.

[0135] Furthermore, the calculation step of the significance score in this embodiment includes:

[0136] S2-3-1-1, extracting all pixel activation values ​​after the convolution kernel and nonlinear activation processing in the activated feature map, and combining them to generate a pixel activation value set;

[0137] The pixel activation value expression is:

[0138] ;

[0139] in, Represents the pixel activation value, representing the position Feature strength after processing by convolution kernel and nonlinear activation function; Represents the cumulative summation of the convolution kernel in sliding, which is used to traverse each position of the convolution kernel; represents the weight value of the convolution kernel, Represents the two-dimensional index of the convolution kernel; represents the pixel value of the line character image; b represents the bias value, which is used to adjust the overall offset of the pixel activation value; f represents the nonlinear activation function;

[0140] S2-3-1-2. Calculate the significance score of the activated feature map according to the pixel activation value set;

[0141] The expression for calculating the significance score of the activated feature map is:

[0142] ;

[0143] Among them, S represents the significance score, represents the pixel average of the set of pixel activation values, Represents the standard deviation of the pixel activation value set, which is used to measure the distribution dispersion of the pixel activation value. represents the weight coefficient of the pixel average, is the weight coefficient of standard deviation; represents the i-th pixel activation value, and n represents the total number of pixel activation values.

[0144] In summary, this embodiment forms a set of pixel activation values ​​by combining the pixel activation values ​​extracted by the convolution kernel with a nonlinear activation function, and efficiently quantifies the significance score of the activated feature map by using a significance score formula that comprehensively considers the average value and the degree of discreteness.

[0145] Embodiment 2: Embodiment 2 is different from Embodiment 1 in that the technical solution is disclosed in Embodiment 2, which discloses specific steps for generating a cable number based on a one-dimensional vector based on a line character image in Embodiment 1, including:

[0146] S5-1. Input the one-dimensional vector of the line character image into the softmax function to convert it into a probability distribution; wherein the probability distribution represents the probability that the one-dimensional vector of the line character image belongs to category j.

[0147] S5-2. Select the category j with the largest probability from the probability distribution as the classification label of the line character image.

[0148] In summary, this embodiment converts the one-dimensional vector representation of the line character image into a probability distribution, generates a classification probability distribution by normalizing it using the softmax function, and accurately generates a classification label by selecting the category corresponding to the maximum probability value.

[0149] The step of obtaining the cable number according to the classification label includes:

[0150] S6-1. Read the classification label of each line character image one by one , and stored as tag reading sequence L1 according to the reading order;

[0151] The expression of the tag reading sequence is:

[0152] ;

[0153] Where L1 represents the tag reading sequence, k represents the total number of line character images;

[0154] S6-2, according to the spatial order of the line character images in the original cable image, convert the reading order into a spatial order to reorder the label reading sequence and generate a label spatial sequence;

[0155] The expression of the label space sequence is:

[0156] ;

[0157] in, represents the label space sequence, represents the kth sorted classification label, s represents the index mapping function of the sorted line character image, and represents the mapping from the label reading sequence to the label space sequence.

[0158] S6-3, sequentially concatenate the classification labels in the label space sequence into the cable number N.

[0159] The expression of the cable number N is:

[0160] ;

[0161] Among them, Concat represents a concatenation operation.

[0162] In summary, this embodiment realizes automatic recognition of cable numbers based on machine vision by sequentially combining the classification labels of line character images and finally generating cable numbers. The system is based on the dot characters in the cable image, and after target detection and image preprocessing, the dot characters are converted into line characters with coherent shapes and clear edges; then, based on the deep learning model, local features are extracted by sliding the convolution kernel, nonlinear activation is used to enhance the feature expression, and the activated features are screened using the significance score formula, and the significance feature map is extracted to construct a deep feature map. In the significance score formula, the weighted average is combined with the standard deviation, and the distribution characteristics of the pixel activation value set are quantitatively evaluated to achieve effective extraction of high-level features and enhance the reliability and accuracy of the recognition process.

[0163] After that, the classification labels are generated through linear mapping and softmax function; finally, the cable numbers are generated according to the order of the classification labels. By introducing the significance score formula and feature screening of the deep learning model, this embodiment improves the automation accuracy of cable number recognition, which is particularly suitable for intelligent management in complex cable scenarios.

[0164] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means.

[0165] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.

[0166] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and systems can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a waterway underwater terrain change analysis system and a system logic function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0167] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. The cable number identification system based on machine vision is characterized by: include: A line character acquisition module is used to acquire a line character image of a cable number; A depth feature map extraction module, used to extract a depth feature map of a cable number from the line character image; A feature vector module, used for flattening the depth feature map of the line character image into a high-dimensional feature vector of the line character image; A linear mapping module is used to input the high-dimensional feature vector of the line character image into the fully connected layer, and the fully connected layer performs linear mapping on it to obtain a one-dimensional vector representation of the line character image; The classification module is used to pass the one-dimensional vector representation of the line character image through the softmax function to generate a classification label for each line character image; The cable number generation module is used to obtain the classification labels of all line character images and generate the cable numbers according to the order of the characters in the image.

2. The machine vision-based cable number identification system according to claim 1, characterized in that: Get the line character image of the cable number, including: S1-1, obtaining a cable image including a cable number; wherein the cable number is composed of dotted characters; S1-2, performing target detection on the cable image, and extracting the bounding box coordinates of each dot character in the cable image; S1-3, preprocessing the cable image after target detection, so that the dot characters in the cable image are converted into regular line characters; S1-4. According to the bounding box coordinates extracted from the target detection, a region containing each regular line character is cropped from the preprocessed cable image to obtain a line character image.

3. The machine vision-based cable number identification system according to claim 1, characterized in that: Extracting a depth feature map of the cable number from the line character image includes: S2-1, receiving the line character image as the input of the convolution model, extracting its local features by sliding the convolution kernel, and obtaining N local feature maps in the line character image; wherein each local feature map represents a type of visual feature of the line character image; S2-2, nonlinearly activate N local feature maps to generate N activated feature maps; S2-3, pooling the N activated feature maps, and selecting M significant feature maps from the several activated feature maps; wherein the significant feature map retains the high-level abstract features of the maximum local feature significance score through the maximum pooling operation; S2-4. Define a set of M significant feature maps as a depth feature map of the line character image.

4. The machine vision-based cable number identification system according to claim 2, characterized in that: Performing target detection on the cable image and extracting the bounding box coordinates of each dot character in the cable image includes: S1-2-1, inputting the cable image into a pre-trained target detection model; The target detection model is based on a convolutional neural network and is iteratively generated through pre-training of supervised learning. Its iterative goal is to extract image features of the cable image and generate a candidate frame feature vector; S1-2-2, dividing the cable image input to the target detection model into B×B grid areas; S1-2-3, extracting features from each grid area to generate a candidate box feature vector corresponding to each grid area; wherein the candidate box feature vector includes: candidate box boundary coordinates, category probability that the candidate box belongs to a dot character, and category confidence; S1-2-4, from the B×B candidate box feature vectors, select the candidate box feature vectors whose category confidence is higher than the preset threshold; S1-2-5. Perform non-maximum suppression on the filtered candidate box feature vectors, remove overlapping candidate boxes, retain the boundary coordinates of the candidate boxes where the dot-like characters are located, and generate the boundary box coordinates of the dot-like characters.

5. The machine vision-based cable number identification system according to claim 2, characterized in that: Preprocess the cable image after target detection to convert the dot characters in the cable image into regular line characters, including: S1-3-1, performing grayscale processing on the cable image after target detection, and converting the cable image into a grayscale image; S1-3-2, performing binarization of the grayscale image, dividing pixels in the grayscale image into foreground characters and background based on a binarization threshold; S1-3-3, performing mean filtering and noise reduction on the grayscale image after binarization to remove the regional noise of the foreground characters and obtain a noise-reduced image; S1-3-4, performing edge detection on the denoised image, extracting character outlines, and obtaining an image with clear character outlines; S1-3-5. Dilate the image with clear character outlines to fill the holes in the outlines caused by noise, so as to convert the dot-like characters into regular line characters.

6. The machine vision-based cable number identification system according to claim 1, characterized in that: According to the bounding box coordinates extracted from the target detection, the area containing each regular line character is cropped from the preprocessed cable image to obtain a line character image, including: S1-4-1, read the bounding box coordinates of each dot character one by one; S1-4-2, determining a cropping range of the dotted characters according to the boundary box coordinates; wherein, if the boundary box coordinates exceed the cable image boundary, adjusting the cropping range to the image boundary; S1-4-3. According to the cropping range, a regular line character area is cut out from the preprocessed cable image to obtain the line character image.

7. The machine vision-based cable number identification system according to claim 1, characterized in that: The salient feature map retains the high-level abstract features of the maximum local feature saliency score through the maximum pooling operation, including: S2-3-1. Extract the pixel activation value of each activated feature from each activated feature map, calculate and define it as a significance score; S2-3-2, based on the pixel resolution of the activated feature map, predefine the size and step size of the coverage window; S2-3-3, sliding the cover window to the first cover area according to the step size of the cover window; S2-3-4, calculating the significance score of each activated feature map in the first coverage area of ​​the coverage window; S2-3-5. Compare the significance scores in the first coverage area, and select the activated feature corresponding to the maximum significance score; S2-3-6, defining the activated feature corresponding to the maximum significance score as a significant feature, and combining them to generate a significant feature map; S2-3-7, repeating steps S2-3-1 to S2-3-6 to sequentially generate a plurality of significant feature maps of the line character image.

8. The machine vision-based cable number identification system according to claim 7, characterized in that: Extract the pixel activation value of the activated feature from each activated feature map, calculate and define it as a significance score, including: S2-3-1-1, extracting all pixel activation values ​​after the convolution kernel and nonlinear activation processing in the activated feature map, and combining them to generate a pixel activation value set; The pixel activation value expression is: ; in, Represents the pixel activation value, representing the position Feature strength after processing by convolution kernel and nonlinear activation function; Represents the cumulative summation of the convolution kernel in sliding, which is used to traverse each position of the convolution kernel; represents the weight value of the convolution kernel, Represents the two-dimensional index of the convolution kernel; represents the pixel value of the line character image; b represents the bias value, which is used to adjust the overall offset of the pixel activation value; f represents the nonlinear activation function; S2-3-1-2. Calculate the significance score of the activated feature map according to the pixel activation value set; The expression for calculating the significance score of the activated feature map is: ; Among them, S represents the significance score, represents the pixel average of the set of pixel activation values, Represents the standard deviation of the pixel activation value set, which is used to measure the distribution dispersion of the pixel activation value. represents the weight coefficient of the pixel average, is the weight coefficient of standard deviation; represents the i-th pixel activation value, and n represents the total number of pixel activation values.

9. The machine vision-based cable number identification system according to claim 1, characterized in that: The one-dimensional vector representation of the line character image is passed through the softmax function to generate the classification label of each line character image, including: S5-1, inputting the one-dimensional vector of the line character image into the softmax function to convert it into a probability distribution; wherein the probability distribution represents the probability that the one-dimensional vector of the line character image belongs to category j; S5-2. Select the category j with the largest probability from the probability distribution as the classification label of the line character image.

10. The machine vision-based cable number identification system according to claim 9, characterized in that: Obtaining classification labels of all line character images, and combining the characters in the order in the image to generate the cable number, including: S6-1. Read the classification label of each line character image one by one , and stored as tag reading sequence L1 according to the reading order; The expression of the tag reading sequence is: ; Where L1 represents the tag reading sequence, k represents the total number of line character images; S6-2, according to the spatial order of the line character images in the original cable image, convert the reading order into a spatial order to reorder the label reading sequence and generate a label spatial sequence; The expression of the label space sequence is: ; in, represents the label space sequence, represents the kth sorted classification label, s represents the index mapping function of the sorted line character image, and represents the mapping from the label reading sequence to the label space sequence; S6-3, sequentially concatenating the classification labels in the label space sequence into the cable number N; The expression of the cable number N is: ; Among them, Concat represents a concatenation operation.

Citation Information

Patent Citations

  • Low-computing-power character rapid recognition method based on machine vision

    CN118366174A

  • Logistics code identification and sorting method based on multi-task deep learning

    CN107617573A

  • Aluminum mold ID automatic identification system based on deep neural network

    CN110135430A

  • Railway freight open wagon carriage number and loading state identification method based on airborne vision

    CN110619329A

  • Deep network saliency detection method based on global model and local optimization

    CN110633708A