A method for detecting object edge position based on convolutional neural network
Through the object edge position detection method based on convolutional neural network, combined with the data of laser sensors and angle sensors, multiple training optimizations are carried out, which solves the problems of difficulty in feature extraction and low detection accuracy in the prior art, and achieves more efficient object edge position detection.
Patent Information
- Application Number
- CN202410579042.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-05-10
AI Technical Summary
In the existing edge detection technology, feature extraction is difficult and expression information is limited, resulting in low accuracy and speed of detection of edge position of objects.
The object edge position detection method based on the convolutional neural network is adopted, and the object image is acquired by pre-deployed by pre-deployed laser sensors, and the training set is constructed to train the convolutional neural network once to determine the edge position of the object. Then pre-deploy the angle sensor, obtain the angle between the training data and the angle sensor, conduct secondary training of the convolutional neural network, and optimize edge position detection.
It improves the accuracy and speed of object edge position detection, and solves the problems of difficulty in feature extraction and limited expression information.
Smart Images

Figure CN118570235B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge detection technology, and in particular to a method for detecting the edge position of an object based on a convolutional neural network. Background Art
[0002] Object edge position detection technology is often used in application fields such as object detection and image segmentation. Convolutional neural network is a deep learning model that is often used in image analysis. At present, edge position detection technology often achieves target detection by designing models and extracting image feature vectors. However, the existing technology requires the design of corresponding feature extraction models for the detection targets, and feature extraction is difficult and time-consuming. In addition, actual object detection scenarios are generally more complex, and the description information of the extracted features is limited.
[0003] Therefore, the present invention provides a method for detecting the edge position of an object based on a convolutional neural network. Summary of the invention
[0004] The present invention provides an object edge position detection method based on a convolutional neural network, which is used for obtaining an object image according to a pre-deployed laser sensor and performing image preprocessing; constructing a training set, training the convolutional neural network once, and extracting features from the pre-processed object image to determine the edge position of the object; pre-deploying an angle sensor, obtaining the training angle between each training data in the training set and the deployed angle sensor, and performing secondary training on the convolutional neural network; inputting the edge position of the object and the angle into the convolutional neural network after the secondary training to obtain the edge position of the object; the detection accuracy of the edge position of the object is improved, and the detection speed of the edge position of the object is accelerated.
[0005] The present invention provides a method for detecting the edge position of an object based on a convolutional neural network, comprising:
[0006] Step 1: Obtain an object image using a pre-deployed laser sensor and perform image preprocessing;
[0007] Step 2: Construct a training set, train the convolutional neural network once, and extract features from the preprocessed object image to determine the edge position of the object;
[0008] Step 3: Pre-deploy the angle sensor, obtain the training angle between each training data in the training set and the deployed angle sensor, perform secondary training on the convolutional neural network, and when the performance of the convolutional neural network is monitored to be no less than the preset object edge position detection performance, determine that the secondary training of the convolutional neural network is completed;
[0009] Step 4: Obtain the angle between the object and the pre-deployed angle sensor according to the pre-deployed angle sensor, input the edge position of the object and the angle into the convolutional neural network that has completed the secondary training, and obtain the edge position of the object.
[0010] According to a method for detecting edge position of an object based on a convolutional neural network provided by the present invention, an object image is acquired according to a pre-deployed laser sensor, and image preprocessing is performed, including:
[0011] The laser beam is converged and adjusted according to the optical element, and when the laser beam is detected to be a collimated laser, an image of the object is acquired according to the pre-deployed laser;
[0012] According to the preset object image detection size and the standard size of the object, the object image is compressed and cropped to make the object image size consistent;
[0013] According to the preset image filtering algorithm, the noise data in the object image is removed;
[0014] Perform pixel normalization on the object image to complete the image preprocessing.
[0015] According to a method for detecting edge positions of objects based on a convolutional neural network provided by the present invention, a training set is constructed and the convolutional neural network is trained once, including:
[0016] According to the historical object detection database, the image complexity of the specified historical object image is obtained, and historical object detection images are randomly selected from the historical object detection image set corresponding to each image complexity, and image standard processing and image quantity expansion processing are performed to construct a training set;
[0017] Determine the architecture of the convolutional neural network according to the object detection accuracy requirements and the image complexity, and train the convolutional neural network with the determined architecture according to the training set;
[0018] When it is monitored that the performance of the convolutional neural network after one training reaches the preset one training requirement, it is determined that one training is completed;
[0019] Otherwise, the architecture of the convolutional neural network is adjusted.
[0020] According to a method for detecting edge positions of objects based on a convolutional neural network provided by the present invention, the image complexity of a specified historical image is obtained according to a historical object detection database, including:
[0021] According to the historical object detection database, the object type of each specified historical image and the spatial position relationship of the historical object are obtained;
[0022] Analyze the pixel values of each designated historical image to obtain the changes in image brightness and color;
[0023] According to the preset image complexity analysis strategy, a comprehensive analysis is performed on the object type, spatial position relationship and change result of each designated historical image to determine the image complexity of each designated historical image.
[0024] According to a method for detecting the edge position of an object based on a convolutional neural network provided by the present invention, a feature extraction is performed on a preprocessed object image to determine the edge position of the object, including:
[0025] Obtaining a sliding window size of a convolutional neural network that has been trained once, and dynamically adjusting the sliding window according to the convolutional neural network detection performance, wherein the convolutional neural network detection performance includes: convolutional neural network detection accuracy and convolutional neural network detection speed;
[0026] The preprocessed object image is input into a trained convolutional neural network to extract corresponding features and obtain a fused feature map;
[0027] Perform sliding window detection on the fused feature map according to the dynamically adjusted sliding window to determine the probability of the object edge pixel at the center pixel of each sliding window;
[0028] Performing image segmentation on the preprocessed object image according to the fusion feature map, and obtaining the category of each pixel point in combination with the probability of the edge pixel of the object, so as to preliminarily obtain the edge position of the object;
[0029] The initially acquired edge position of the object is subjected to non-maximum suppression and threshold processing to determine the edge position of the object.
[0030] According to a method for detecting edge position of an object based on a convolutional neural network provided by the present invention, a training angle between each training data in a training set and a deployment angle sensor is obtained, and a convolutional neural network is trained twice, including:
[0031] Determine the training angle between each training data and the pre-deployed angle sensor;
[0032] Analyze and process the training angle and the image complexity of the corresponding training data, and perform layered detection on each training data;
[0033] If the training angle under the corresponding training data exists and the image complexity is not greater than the preset complexity, the corresponding training data is recorded as a type of training data and input into the shallow convolution layer of the convolutional neural network that has been trained once to detect the edge position of the object;
[0034] If the training angle under the corresponding training data exists and the image complexity is greater than the preset complexity, the corresponding training data is recorded as the second-class training data and input into the deep convolution layer of the convolutional neural network that has been trained once to detect the edge position of the object;
[0035] Comprehensively process the shallow detection results of the shallow convolution layer and the deep detection results of the deep convolution layer, and dynamically adjust the sliding window twice in combination with the image complexity involved in each convolution layer to determine the final edge detection area of the training data;
[0036] Detecting and screening the object edge position of each object image in the training data according to the final edge detection area, and removing the object images that do not match the final edge detection area;
[0037] Extracting image features in the edge position detection area of the remaining images in the training data, and determining the edge position detection result;
[0038] When the edge position detection result is consistent with the corresponding actual edge position, the convolutional neural network after the secondary dynamic adjustment is determined to be qualified;
[0039] Otherwise, a new convolutional layer set is set, and the training data without training angles is recorded as three types of training data;
[0040] When three types of training data input are detected, the training data of the convolutional layer before the newly added convolutional layer set in the convolutional neural network after the secondary dynamic adjustment is used as the input data of the newly added convolutional layer set, and the data features of the input data are extracted to be fused with the extracted features of the newly added convolutional layer set to determine the object edge position detection results of the three types of training data;
[0041] According to the object edge position detection results of various training data, the detection accuracy and speed of the convolutional neural network are obtained, and the detection performance of the convolutional neural network after secondary training is determined;
[0042] ;
[0043] Where F represents the detection performance of the convolutional neural network trained twice; 1 represents the impact weight on the detection accuracy of the convolutional neural network; 2 represents the influence weight on the detection speed of the convolutional neural network; yi1 represents the object edge position detection result of the i1th training data xi1; Yi1 represents the actual object edge position of the i1th training data xi1; x1 represents the amount of data for correctly detecting the object edge position in the convolutional neural network; x2 represents the amount of data for incorrectly detecting the object edge position in the convolutional neural network; x3 represents the amount of data for missing the detection of the object edge position in the convolutional neural network; t1i1 represents the detection time of the convolutional neural network for detecting the i1th training data xi1; t2i1 represents the detection time of the newly added convolutional layer set in the convolutional neural network for detecting the i1th training data xi1; G(xi1,c) represents that when the training data xi1 belongs to the three types of training data, 1 is output, otherwise, 0 is output; n1 represents the amount of training data; tci1 represents the average detection time of the remaining training data except the i1th training data xi1 in the newly added convolutional layer set; b1 represents the detection accuracy conversion coefficient; b2 represents the detection speed conversion coefficient;
[0044] When the detection performance is not lower than the preset object edge position detection performance, it is determined that the secondary training of the convolutional neural network is completed.
[0045] According to a method for detecting edge position of an object based on a convolutional neural network provided by the present invention, after inputting the edge position of the object and the angle into the convolutional neural network after secondary training, the method further includes:
[0046] The difference between the object edge position detection result and the actual result of the object edge position per unit time is obtained, and the parameters of the convolutional neural network completed by the secondary training are optimized and updated.
[0047] According to a method for detecting edge positions of objects based on a convolutional neural network provided by the present invention, the image complexity of each specified historical image is determined, including:
[0048] Obtaining the preset image complexity analysis strategy for the first complexity factor of the object type, the second complexity factor of the spatial position relationship, and the third complexity factor of the variation result of the corresponding designated historical image;
[0049] Based on the first complexity factor , the second complex factor And the third complex factor , determine the image complexity G1 corresponding to the specified historical image;
[0050] ;
[0051] Among them, max represents the maximum value symbol; It represents the ratio of object type w1 to standard type b1; It represents the ratio of the spatial position relationship kw to the standard position relationship bw; It represents the ratio of the change result hk to the standard change result bk; Indicates based on The variance of Indicates based on The variance of .
[0052] The present invention provides a method for detecting the edge position of an object based on a convolutional neural network. The method obtains an image of an object according to a pre-deployed laser sensor and performs image preprocessing. A training set is constructed to train the convolutional neural network once, and feature extraction is performed on the pre-processed object image to determine the edge position of the object. An angle sensor is pre-deployed to obtain the training angle between each training data in the training set and the deployed angle sensor, and the convolutional neural network is trained twice. The edge position of the object and the angle are input into the convolutional neural network after the secondary training to obtain the edge position of the object. The problem of difficult feature extraction and limited feature expression in edge detection is solved, and the beneficial effect of improving the detection accuracy and detection speed of the edge position of the object is achieved.
[0053] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0054] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic diagram of a flow chart of a method for detecting an edge position of an object based on a convolutional neural network provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting the edge position of an object based on a convolutional neural network, and the method mainly includes the following steps:
[0059] Step 1: Obtain an object image using a pre-deployed laser sensor and perform image preprocessing;
[0060] Step 2: Construct a training set, train the convolutional neural network once, and extract features from the preprocessed object image to determine the edge position of the object;
[0061] Step 3: Pre-deploy the angle sensor, obtain the training angle between each training data in the training set and the deployed angle sensor, perform secondary training on the convolutional neural network, and when the performance of the convolutional neural network is monitored to be no less than the preset object edge position detection performance, determine that the secondary training of the convolutional neural network is completed;
[0062] Step 4: Obtain the angle between the object and the pre-deployed angle sensor according to the pre-deployed angle sensor, input the edge position of the object and the angle into the convolutional neural network that has completed the secondary training, and obtain the edge position of the object.
[0063] In this embodiment, the convolutional neural network is a deep learning model composed of a data input layer, a convolution calculation layer, an excitation layer, a pooling layer and a fully connected layer.
[0064] In this embodiment, one training refers to performing convolutional neural network training based on the object image.
[0065] In this embodiment, the edge position of the object refers to the result output by the convolutional neural network after one training.
[0066] In this embodiment, the secondary training refers to training the convolutional neural network according to the edge position of the object and the angle between the object and the pre-deployed angle sensor.
[0067] In this embodiment, the convolutional neural network is trained a second time by introducing the angle between the object and the pre-deployed angle sensor, which effectively compensates for the detection problem caused by insufficient feature description information in the first training, effectively enhances the data, and improves the detection accuracy of the convolutional neural network.
[0068] In this embodiment, the training angle refers to the angle of the pre-deployed angle sensors of each object in the training set determined by analyzing the deployment positions of the pre-deployed angle sensors.
[0069] In this embodiment, the preset object edge position detection performance refers to the detection accuracy and detection speed of the convolutional neural network for the object edge position, which can be dynamically adjusted according to the actual object detection requirements.
[0070] The beneficial effects of the above technical solution are: obtaining an object image based on a pre-deployed laser sensor and performing image preprocessing; constructing a training set, training the convolutional neural network once, and extracting features from the pre-processed object image to determine the edge position of the object; pre-deploying an angle sensor, obtaining the training angle between each training data in the training set and the deployed angle sensor, and performing secondary training on the convolutional neural network; inputting the edge position of the object and the angle into the convolutional neural network after secondary training to obtain the edge position of the object; both improving the detection accuracy of the edge position of the object and accelerating the detection speed of the edge position of the object.
[0071] The embodiment of the present invention provides a method for detecting the edge position of an object based on a convolutional neural network, which acquires an object image according to a pre-deployed laser sensor and performs image preprocessing, including:
[0072] The laser beam is converged and adjusted according to the optical element, and when the laser beam is detected to be a collimated laser, an image of the object is acquired according to the pre-deployed laser;
[0073] According to the preset object image detection size and the standard size of the object, the object image is compressed and cropped to make the object image size consistent;
[0074] According to the preset image filtering algorithm, the noise data in the object image is removed;
[0075] Perform pixel normalization on the object image to complete the image preprocessing.
[0076] In this embodiment, the laser beam is converged and adjusted according to an optical element, for example, the laser beam is converged and adjusted by a convex lens and a reflector.
[0077] In this embodiment, collimated laser means that the laser beam maintains a stable straight-line propagation characteristic during propagation, which is conducive to obtaining an accurate image of the object.
[0078] In this embodiment, the preset object image detection size refers to the preset image size for data input to the convolutional neural network. A unified size is beneficial to data processing by the convolutional neural network.
[0079] In this embodiment, the standard size of the object refers to the object size obtained by analyzing the object image. If the object size is larger than the preset object image detection size, the object image needs to be compressed; otherwise, the object image needs to be cropped.
[0080] In this embodiment, an image filtering algorithm is preset, such as mean filtering and median filtering.
[0081] In this embodiment, pixel normalization is performed on the object image to ensure that the image pixel values are within a certain range to facilitate subsequent data processing.
[0082] The beneficial effects of the above technical solution are: acquiring object images based on pre-deployed laser sensors so that the object images retain a large number of beneficial features and are suitable for various complex situations of object detection in actual environments; pre-processing the images to effectively improve the training speed of subsequent convolutional neural networks.
[0083] The embodiment of the present invention provides an object edge position detection method based on a convolutional neural network, constructs a training set, and trains the convolutional neural network once, including:
[0084] According to the historical object detection database, the image complexity of the specified historical object image is obtained, and historical object detection images are randomly selected from the historical object detection image set corresponding to each image complexity, and image standard processing and image quantity expansion processing are performed to construct a training set;
[0085] Determine the architecture of the convolutional neural network according to the object detection accuracy requirements and the image complexity, and train the convolutional neural network with the determined architecture according to the training set;
[0086] When it is monitored that the performance of the convolutional neural network after one training reaches the preset one training requirement, it is determined that one training is completed;
[0087] Otherwise, the architecture of the convolutional neural network is adjusted.
[0088] In this embodiment, the historical object detection database refers to a database used to store object detections performed within a historical time period. Acquiring data through the historical object detection database is beneficial to improving data processing efficiency.
[0089] In this embodiment, the image complexity of a specified historical object image is obtained, for example, a historical object image having similarities with a currently detected object is obtained.
[0090] In this embodiment, image complexity refers to the amount of information contained in the image and the difficulty of processing the information. The higher the image complexity, the more image information there is and the more difficult it is to process the image information.
[0091] In this embodiment, the image standard processing and the image quantity expansion processing, for example, compress and crop the image into images of the same size, and rotate, translate and crop the image.
[0092] In this embodiment, the architecture of the convolutional neural network, for example, the number, size, and step size of convolutional layers, pooling layers, and fully connected layers.
[0093] The beneficial effect of the above technical solution is: by constructing a training set and training the convolutional neural network once, it is helpful to preliminarily determine the architecture of the convolutional neural network, facilitate subsequent data enhancement training, improve the performance of the convolutional neural network, and achieve accurate detection of the edge position of the object.
[0094] The embodiment of the present invention provides a method for detecting the edge position of an object based on a convolutional neural network, and obtains the image complexity of a specified historical image according to a historical object detection database, including:
[0095] According to the historical object detection database, the object type of each specified historical image and the spatial position relationship of the historical object are obtained;
[0096] Analyze the pixel values of each designated historical image to obtain the changes in image brightness and color;
[0097] According to the preset image complexity analysis strategy, a comprehensive analysis is performed on the object type, spatial position relationship and change result of each designated historical image to determine the image complexity of each designated historical image.
[0098] In this embodiment, the object type of each designated historical image is obtained, for example, historical images of objects of type a1 and historical images of objects of type a2.
[0099] In this embodiment, the spatial position relationship of the historical objects, for example, whether there is a spatial position relationship in which the historical objects in the historical image obstruct each other.
[0100] In this embodiment, the variation of the image brightness and the image color refers to the gradient difference and gradient variation degree of the image pixels. The image complexity is high when the image brightness variation is large and the image colors are many.
[0101] The beneficial effects of the above technical solution are: according to the historical object detection database, the image complexity of the specified historical image is obtained, which is convenient for determining the architecture of the convolutional neural network, giving full play to the performance of the convolutional neural network, improving the image processing efficiency and image processing accuracy, and providing basic data for the follow-up.
[0102] The embodiment of the present invention provides a method for detecting the edge position of an object based on a convolutional neural network, which extracts features from a preprocessed object image to determine the edge position of the object, including:
[0103] Obtaining a sliding window size of a convolutional neural network that has been trained once, and dynamically adjusting the sliding window according to the convolutional neural network detection performance, wherein the convolutional neural network detection performance includes: convolutional neural network detection accuracy and convolutional neural network detection speed;
[0104] The preprocessed object image is input into a trained convolutional neural network to extract corresponding features and obtain a fused feature map;
[0105] Perform sliding window detection on the fused feature map according to the dynamically adjusted sliding window to determine the probability of the object edge pixel at the center pixel of each sliding window;
[0106] Performing image segmentation on the preprocessed object image according to the fusion feature map, and obtaining the category of each pixel point in combination with the probability of the edge pixel of the object, so as to preliminarily obtain the edge position of the object;
[0107] The initially acquired edge position of the object is subjected to non-maximum suppression and threshold processing to determine the edge position of the object.
[0108] In this embodiment, the sliding window of the convolutional neural network refers to an operation method of performing a convolution operation on input data in a convolutional layer of the convolutional neural network.
[0109] In this embodiment, when the sliding window is small, the output of image features can be increased to improve the image recognition accuracy; when the sliding window is large, the output of image features can be reduced to improve the image recognition speed.
[0110] In this embodiment, performing sliding window detection on the fused feature map according to the dynamically adjusted sliding window means aligning the edge of the sliding window with the edge of the fused feature map, and then performing a convolution operation on the pixels at the corresponding positions.
[0111] In this embodiment, the probability of the central pixel of each sliding window being an object edge pixel is determined. For example, when the probability of the object edge pixel being p1>p0, the central pixel is considered to be an object edge pixel.
[0112] In this embodiment, the categories of pixel points include: background pixels, object edge pixels, and object pixels.
[0113] In this embodiment, non-maximum suppression and threshold processing are performed on the initially acquired edge position of the object to improve the acquisition accuracy of the edge position of the object.
[0114] The beneficial effects of the above technical solution are: feature extraction is performed on the preprocessed object image through a sliding window to determine the edge position of the object, which is convenient for adapting to complex situations of object detection, improves the detection accuracy and efficiency of the object edge position, and lays a data foundation for the subsequent object edge position.
[0115] The embodiment of the present invention provides an object edge position detection method based on a convolutional neural network, which obtains the training angle between each training data in a training set and a deployment angle sensor, and performs secondary training on the convolutional neural network, including:
[0116] Determine the training angle between each training data and the pre-deployed angle sensor;
[0117] Analyze and process the training angle and the image complexity of the corresponding training data, and perform layered detection on each training data;
[0118] If the training angle under the corresponding training data exists and the image complexity is not greater than the preset complexity, the corresponding training data is recorded as a type of training data and input into the shallow convolution layer of the convolutional neural network that has been trained once to detect the edge position of the object;
[0119] If the training angle under the corresponding training data exists and the image complexity is greater than the preset complexity, the corresponding training data is recorded as the second-class training data and input into the deep convolution layer of the convolutional neural network that has been trained once to detect the edge position of the object;
[0120] Comprehensively process the shallow detection results of the shallow convolution layer and the deep detection results of the deep convolution layer, and dynamically adjust the sliding window twice in combination with the image complexity involved in each convolution layer to determine the final edge detection area of the training data;
[0121] Detecting and screening the object edge position of each object image in the training data according to the final edge detection area, and removing the object images that do not match the final edge detection area;
[0122] Extracting image features in the edge position detection area of the remaining images in the training data, and determining the edge position detection result;
[0123] When the edge position detection result is consistent with the corresponding actual edge position, the convolutional neural network after the secondary dynamic adjustment is determined to be qualified;
[0124] Otherwise, a new convolutional layer set is set, and the training data without training angles is recorded as three types of training data;
[0125] When three types of training data input are detected, the training data of the convolutional layer before the newly added convolutional layer set in the convolutional neural network after the secondary dynamic adjustment is used as the input data of the newly added convolutional layer set, and the data features of the input data are extracted to be fused with the extracted features of the newly added convolutional layer set to determine the object edge position detection results of the three types of training data;
[0126] According to the object edge position detection results of various training data, the detection accuracy and speed of the convolutional neural network are obtained, and the detection performance of the convolutional neural network after secondary training is determined;
[0127] ;
[0128] Where F represents the detection performance of the convolutional neural network trained twice; 1 represents the impact weight on the detection accuracy of the convolutional neural network; 2 represents the influence weight on the detection speed of the convolutional neural network; yi1 represents the object edge position detection result of the i1th training data xi1; Yi1 represents the actual object edge position of the i1th training data xi1; x1 represents the amount of data for correctly detecting the object edge position in the convolutional neural network; x2 represents the amount of data for incorrectly detecting the object edge position in the convolutional neural network; x3 represents the amount of data for missing the detection of the object edge position in the convolutional neural network; t1i1 represents the detection time of the convolutional neural network for detecting the i1th training data xi1; t2i1 represents the detection time of the newly added convolutional layer set in the convolutional neural network for detecting the i1th training data xi1; G(xi1,c) represents that when the training data xi1 belongs to the three types of training data, 1 is output, otherwise, 0 is output; n1 represents the amount of training data; tci1 represents the average detection time of the remaining training data except the i1th training data xi1 in the newly added convolutional layer set; b1 represents the detection accuracy conversion coefficient; b2 represents the detection speed conversion coefficient;
[0129] When the detection performance is not lower than the preset object edge position detection performance, it is determined that the secondary training of the convolutional neural network is completed.
[0130] In this embodiment, the training angle refers to the angle obtained by performing position analysis processing based on the deployment positions of the pre-deployed sensors and the training data.
[0131] In this embodiment, the preset complexity refers to a value used to distinguish whether an object image is complex. For example, the preset complexity is a1. When the image complexity a2>a1, the object detection corresponding to the image complexity a2 is determined to be complex, which is prone to problems such as insufficient detection accuracy and slow detection efficiency, and deep detection is required.
[0132] In this embodiment, one type of training data refers to training data in which a training angle exists and the image is simple.
[0133] In this embodiment, the shallow convolutional layer of the convolutional neural network that has been trained once is used to extract simple features of the input data.
[0134] In this embodiment, a type of data is input into a shallow convolutional layer of a convolutional neural network that has been trained once to detect the edge position of an object, and there is no need to perform subsequent deep convolutional layer detection.
[0135] In this embodiment, the second type of training data refers to training data with a training angle and complex images, which is input into a deep convolutional layer of a convolutional neural network that has been trained once to extract complex features.
[0136] In this embodiment, the shallow detection results of the shallow convolution layer are comprehensively processed with the deep detection results of the deep convolution layer, for example, feature fusion, the shallow detection results are fused with the deep detection results, and then classification regression is performed through the fully connected layer.
[0137] In this embodiment, the secondary dynamic adjustment of the sliding window refers to adjustment based on the comprehensive processing result and the image complexity, for example, the sliding window of the deep convolution layer is reduced, and the sliding window of the shallow convolution layer is increased.
[0138] In this embodiment, the final edge detection region of the training data refers to a region obtained by performing sliding window detection on the sliding window after the second dynamic adjustment.
[0139] In this embodiment, the object images that do not match the final edge detection area are eliminated, for example, the background area and the internal area of the object are eliminated.
[0140] In this embodiment, the third type of training data refers to training data where the training angle does not exist, for example, training data where the training angle cannot be determined based on the deployment position of the pre-deployed sensor; training data where the object size is too large and only the object image exists in the historical image, making it impossible to perform position analysis.
[0141] In this embodiment, the training data of the convolutional layer before the newly added convolutional layer set in the convolutional neural network after the secondary dynamic adjustment is used as the input data of the newly added convolutional layer set, which facilitates the training of the convolutional neural network and the convergence of the convolutional neural network.
[0142] The beneficial effect of the above technical solution is: the convolutional neural network is trained twice by training data and the training angle of the deployed angle sensor, the architecture of the convolutional neural network is optimized, and the detection accuracy and speed of the edge position of the object are effectively improved.
[0143] The embodiment of the present invention provides a method for detecting the edge position of an object based on a convolutional neural network. After the edge position of the object and the angle are input into the convolutional neural network after secondary training, the method further includes:
[0144] The difference between the object edge position detection result and the actual result of the object edge position per unit time is obtained, and the parameters of the convolutional neural network completed by the secondary training are optimized and updated.
[0145] In this embodiment, the difference between the object edge position detection result and the object edge position actual result within unit time is obtained, wherein the unit time is determined according to the object edge position detection requirement. For example, when the object edge position detection requirement is high, the unit time is set to t1, and when the object edge position detection requirement is low, the unit time is set to t2>t1.
[0146] In this embodiment, the parameters of the convolutional neural network that has completed secondary training are optimized and updated, for example, the number of network layers of the convolutional neural network is increased or decreased, and the iterative learning rate is adjusted.
[0147] The beneficial effect of the above technical solution is: by optimizing and updating the parameters of the convolutional neural network that has completed the secondary training, it is helpful to ensure that the convolutional neural network is suitable for edge position detection of various objects and achieve the optimal object edge position detection effect.
[0148] The embodiment of the present invention provides a method for detecting the edge position of an object based on a convolutional neural network, which determines the image complexity of each specified historical image, including:
[0149] Obtaining the preset image complexity analysis strategy for the first complexity factor of the object type, the second complexity factor of the spatial position relationship, and the third complexity factor of the variation result of the corresponding designated historical image;
[0150] Based on the first complexity factor , the second complex factor And the third complex factor , determine the image complexity G1 corresponding to the specified historical image;
[0151] ;
[0152] Among them, max represents the maximum value symbol; It represents the ratio of object type w1 to standard type b1; It represents the ratio of the spatial position relationship kw to the standard position relationship bw; It represents the ratio of the change result hk to the standard change result bk; Indicates based on The variance of Indicates based on The variance of .
[0153] In this embodiment, the preset image complexity analysis strategy refers to a strategy for quantitatively analyzing image complexity, which is used to comprehensively and accurately evaluate image complexity and fully consider the actual application scenarios of object detection.
[0154] In this embodiment, the preset image complexity analysis strategy is adjusted according to the object edge position detection performance. For example, when the object edge position detection performance is high, the image needs to contain more information and details, so the preset image complexity analysis strategy is adjusted to effectively process the details and information in the image.
[0155] The beneficial effect of the above technical solution is: by determining the image complexity of each specified historical image, it is convenient to perform corresponding convolutional neural network training for images of different image complexities, effectively meet specific object detection application scenarios and object detection requirements, and ensure the accuracy and speed of object edge position detection.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting the edge position of an object based on a convolutional neural network, characterized in that: include: Step 1: Obtain an object image using a pre-deployed laser sensor and perform image preprocessing; Step 2: Construct a training set, train the convolutional neural network once, and extract features from the preprocessed object image to determine the edge position of the object; Step 3: Pre-deploy the angle sensor, obtain the training angle between each training data in the training set and the deployed angle sensor, perform secondary training on the convolutional neural network, and when the performance of the convolutional neural network is monitored to be no less than the preset object edge position detection performance, determine that the secondary training of the convolutional neural network is completed; Step 4: obtaining the angle between the object and the pre-deployed angle sensor according to the pre-deployed angle sensor, inputting the edge position of the object and the angle into the convolutional neural network that has completed the secondary training, and obtaining the edge position of the object; Among them, constructing a training set and training the convolutional neural network once includes: According to the historical object detection database, the image complexity of the specified historical object image is obtained, and historical object detection images are randomly selected from the historical object detection image set corresponding to each image complexity, and image standard processing and image quantity expansion processing are performed to construct a training set; Determine the architecture of the convolutional neural network according to the object detection accuracy requirements and the image complexity, and train the convolutional neural network with the determined architecture according to the training set; When it is monitored that the performance of the convolutional neural network after one training reaches the preset one training requirement, it is determined that one training is completed; Otherwise, adjust the architecture of the convolutional neural network; Among them, according to the historical object detection database, the image complexity of the specified historical image is obtained, including: According to the historical object detection database, the object type of each specified historical image and the spatial position relationship of the historical object are obtained; Analyze the pixel values of each designated historical image to obtain the changes in image brightness and color; According to the preset image complexity analysis strategy, the object type, spatial position relationship and change amount results of each designated historical image are comprehensively analyzed to determine the image complexity of each designated historical image; The image complexity of each designated historical image is determined, including: Obtaining the preset image complexity analysis strategy for the first complexity factor of the object type, the second complexity factor of the spatial position relationship, and the third complexity factor of the variation result of the corresponding designated historical image; Based on the first complexity factor , the second complex factor And the third complex factor , determine the image complexity G1 corresponding to the specified historical image; ; Among them, max represents the maximum value symbol; It represents the ratio of object type w1 to standard type b1; It represents the ratio of the spatial position relationship kw to the standard position relationship bw; It represents the ratio of the change result hk to the standard change result bk; Indicates based on The variance of Indicates based on The variance of .
2. The object edge position detection method based on convolutional neural network according to claim 1, characterized in that: Acquire the object image based on the pre-deployed laser sensor and perform image preprocessing, including: The laser beam is converged and adjusted according to the optical element, and when the laser beam is detected to be a collimated laser, an image of the object is acquired according to the pre-deployed laser; According to the preset object image detection size and the standard size of the object, the object image is compressed and cropped to make the object image size consistent; According to the preset image filtering algorithm, the noise data in the object image is removed; Perform pixel normalization on the object image to complete the image preprocessing.
3. The object edge position detection method based on convolutional neural network according to claim 1, characterized in that: The preprocessed object image is subjected to feature extraction to determine the edge position of the object, including: Obtaining a sliding window size of a convolutional neural network that has been trained once, and dynamically adjusting the sliding window according to the convolutional neural network detection performance, wherein the convolutional neural network detection performance includes: convolutional neural network detection accuracy and convolutional neural network detection speed; The preprocessed object image is input into a trained convolutional neural network to extract corresponding features and obtain a fused feature map; Perform sliding window detection on the fused feature map according to the dynamically adjusted sliding window to determine the probability of the object edge pixel at the center pixel of each sliding window; Performing image segmentation on the preprocessed object image according to the fusion feature map, and obtaining the category of each pixel point in combination with the probability of the edge pixel of the object, so as to preliminarily obtain the edge position of the object; The initially acquired edge position of the object is subjected to non-maximum suppression and threshold processing to determine the edge position of the object.
4. The object edge position detection method based on convolutional neural network according to claim 1, characterized in that: Obtain the training angle between each training data in the training set and the deployed angle sensor, and perform secondary training on the convolutional neural network, including: Determine the training angle between each training data and the pre-deployed angle sensor; Analyze and process the training angle and the image complexity of the corresponding training data, and perform layered detection on each training data; If the training angle under the corresponding training data exists and the image complexity is not greater than the preset complexity, the corresponding training data is recorded as a type of training data and input into the shallow convolution layer of the convolutional neural network that has been trained once to detect the edge position of the object; If the training angle under the corresponding training data exists and the image complexity is greater than the preset complexity, the corresponding training data is recorded as the second-class training data and input into the deep convolution layer of the convolutional neural network that has been trained once to detect the edge position of the object; Comprehensively process the shallow detection results of the shallow convolution layer and the deep detection results of the deep convolution layer, and dynamically adjust the sliding window twice in combination with the image complexity involved in each convolution layer to determine the final edge detection area of the training data; Detecting and screening the object edge position of each object image in the training data according to the final edge detection area, and removing the object images that do not match the final edge detection area; Extracting image features in the edge position detection area of the remaining images in the training data, and determining the edge position detection result; When the edge position detection result is consistent with the corresponding actual edge position, the convolutional neural network after the secondary dynamic adjustment is determined to be qualified; Otherwise, a new convolutional layer set is set, and the training data without training angles is recorded as three types of training data; When three types of training data input are detected, the training data of the convolutional layer before the newly added convolutional layer set in the convolutional neural network after the secondary dynamic adjustment is used as the input data of the newly added convolutional layer set, and the data features of the input data are extracted to be fused with the extracted features of the newly added convolutional layer set to determine the object edge position detection results of the three types of training data; According to the object edge position detection results of various training data, the detection accuracy and speed of the convolutional neural network are obtained, and the detection performance of the convolutional neural network after secondary training is determined; ; Where F represents the detection performance of the convolutional neural network trained twice; 1 represents the impact weight on the detection accuracy of the convolutional neural network; 2 represents the influence weight on the detection speed of the convolutional neural network; yi1 represents the object edge position detection result of the i1th training data xi1; Yi1 represents the actual object edge position of the i1th training data xi1; x1 represents the amount of data for correctly detecting the object edge position in the convolutional neural network; x2 represents the amount of data for incorrectly detecting the object edge position in the convolutional neural network; x3 represents the amount of data for missing the detection of the object edge position in the convolutional neural network; t1i1 represents the detection time of the convolutional neural network for detecting the i1th training data xi1; t2i1 represents the detection time of the newly added convolutional layer set in the convolutional neural network for detecting the i1th training data xi1; G(xi1,c) represents that when the training data xi1 belongs to the three types of training data, 1 is output, otherwise, 0 is output; n1 represents the amount of training data; tci1 represents the average detection time of the remaining training data except the i1th training data xi1 in the newly added convolutional layer set; b1 represents the detection accuracy conversion coefficient; b2 represents the detection speed conversion coefficient; When the detection performance is not lower than the preset object edge position detection performance, it is determined that the secondary training of the convolutional neural network is completed.
5. The object edge position detection method based on convolutional neural network according to claim 1, characterized in that: After inputting the edge position of the object and the angle into the convolutional neural network after the secondary training, the method further includes: The difference between the object edge position detection result and the actual result of the object edge position per unit time is obtained, and the parameters of the convolutional neural network completed by the secondary training are optimized and updated.
Citation Information
Patent Citations
Method for robot to detect straight side and method for cleaning robot to screen reference wall side
CN109085834A
Edge detection method, device and equipment based on predicted clear boundary
CN112465847A