Tower crane detection method and system based on deep learning
By employing deep learning methods, based on three-channel statistical features and an environment-adaptive penalty design, the problems of image blurring and feature dispersion in tower crane detection are solved, improving detection accuracy and environmental adaptability, and ensuring the integrity and detail clarity of tower crane features.
Patent Information
- Application Number
- CN202511463342.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing tower crane detection methods suffer from several drawbacks. Overall image processing leads to blurring of the entire structure, resulting in the loss of key local features of the tower crane. Overexposure due to reflections on the metal surface or fading of safety colors in shadow areas causes color distortion, ultimately leading to poor detection reliability. Furthermore, tower cranes exhibit feature differences due to varying shooting conditions, resulting in dispersed features of similar tower cranes, making them prone to missed detections. These methods also exhibit weak environmental adaptability and anti-interference capabilities, resulting in poor detection performance.
A deep learning-based tower crane detection method is adopted, which calculates dynamic weight coefficients through three-channel statistical features to improve the color authenticity of images. A global regional extension and local distribution enhancement strategy is introduced, combined with aggregation correction, to reduce false positives and false negatives. Based on the maximum pairwise distance quantification of the feature dispersion within the group, an environment adaptive penalty design is introduced to optimize the loss function and dynamically adjust the environmental interference penalty to reduce false positives and false negatives.
It improves the accuracy and effectiveness of tower crane inspection, reduces the false detection rate, enhances the inspection capability in complex environments, and ensures the integrity and detail clarity of tower crane features.
Smart Images

Figure CN120931658B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tower crane inspection technology, specifically to a tower crane inspection method and system based on deep learning. Background Technology
[0002] The tower crane detection method first acquires images of tower cranes under different lighting and viewing angle conditions, then performs preprocessing such as color optimization and detail enhancement to extract key features. Next, a specially designed model analyzes the images to achieve accurate identification of the tower crane, while also handling complex situations such as lighting and occlusion. However, general tower crane detection methods suffer from several problems: overall image processing leads to blurring of the entire structure, resulting in the loss of key local features; overexposure due to metal surface reflections or fading of safety colors in shadow areas causes color distortion, leading to poor reliability in the final detection; and the characteristic differences in tower cranes due to varying shooting conditions result in dispersed features for similar tower cranes, making them prone to missed detections, and exhibiting weak environmental adaptability and anti-interference capabilities, ultimately leading to poor detection results. Summary of the Invention
[0003] To address the aforementioned issues and overcome the shortcomings of existing technologies, this invention provides a deep learning-based tower crane detection method and system. Addressing the problems of general tower crane detection methods, such as overall image processing leading to global structural blurring, loss of key local features, and color distortion due to overexposure from metal surface reflections or fading of safety colors in shadow areas, resulting in poor detection reliability, this solution calculates dynamic weight coefficients based on three-channel statistical features and specifically adjusts the attenuation channel to improve image color accuracy. It employs a global-area regional extension and local distribution enhancement strategy to balance the integrity of the tower structure with detail clarity. Based on aggregation correction, it reduces false positives and false negatives caused by missing information, thereby improving the accuracy of subsequent monitoring. To address the issues of poor detection results in conventional tower crane inspection methods, where tower crane features vary due to different shooting conditions, leading to feature dispersion among similar tower cranes, easy missed detections, weak environmental adaptability and anti-interference capabilities, this solution quantifies the intra-group feature dispersion based on the maximum pairwise distance of tower crane sample features. It introduces an environment-adaptive penalty design to optimize the loss function and dynamically adjust the environmental interference penalty. In complex backgrounds, it enhances the feature distance between the tower crane and interfering targets, reducing false detections; in clean backgrounds, it avoids missed detections caused by excessive distance. Furthermore, it introduces a divergence matrix and occlusion penalty coefficient to quantify the global distribution dispersion of tower crane features, handling feature variations caused by tower crane occlusion and missing components, avoiding false occlusion and reducing the missed detection rate; thus, improving the detection effect.
[0004] The technical solution adopted by this invention is as follows: The tower crane detection method based on deep learning provided by this invention includes the following steps:
[0005] Step S1: Image acquisition;
[0006] Step S2: Initial image optimization;
[0007] Step S3: Enhance details;
[0008] Step S4: Aggregation correction;
[0009] Step S5: Establish a tower crane inspection model;
[0010] Step S6: Tower crane inspection.
[0011] Furthermore, in step S1, the image acquisition involves acquiring tower crane images; acquiring tower crane images under different conditions.
[0012] Further, in step S2, the initial image optimization is to assume the tower crane image is I. t (x,y), decomposed into: red channel I R Green Channel I G and Blue Channel I B Define highlight-dominant and shadow-dominant scenes; calculate dynamic weighting coefficients, including: statistical values for each channel, statistical values for highlight-dominant scenes, and statistical values for shadow-dominant scenes.
[0013] Further, in step S3, the detail enhancement is a regional extension, which involves extracting the highlight threshold and shadow threshold of the tower crane image histogram after the initial image optimization, dividing the histogram into highlight areas, shadow areas, and normal areas; controlling the extension amplitude based on a dynamic extension coefficient; dividing the extended image into 16×16 pixel areas, calculating the average gray level of each area, performing self-adjusting clipping constraints, and enhancing the output.
[0014] Further, in step S4, the aggregation correction involves normalizing the tower crane image after the initial image optimization and representing it as I. c The tower crane image after detail enhancement is normalized and represented as I. e Expand the image into a matrix by pixels; calculate the covariance matrix; perform eigenvalue decomposition on the covariance matrix; take the eigenvector corresponding to the largest eigenvalue to obtain the aggregated image; collect non-tower crane samples; combine them with the aggregated and corrected tower crane images; label them as whether they are tower cranes to obtain the tower crane detection image set.
[0015] Furthermore, in step S5, establishing the tower crane detection model specifically includes the following:
[0016] Step S51: Model architecture design; MobileNetV3 is used as the basic backbone; a feature aggregation neck is added between the backbone network and the fully connected layer, and a lightweight feature pyramid is used to aggregate multi-scale feature maps through upsampling and pointwise convolution to output an aggregated feature map; the aggregated feature map is output as a feature vector through a linear mapping layer; the feature vector is then connected to a classification head to complete the binary classification mapping;
[0017] Step S52: Separation within the tower chiller unit; specifically including:
[0018] Step S521: Calculate the dynamic minimum envelope sphere range parameter of the tower crane features, and approximate the minimum envelope sphere range parameter with the maximum pairwise distance of the tower crane sample features to quantify the dispersion of the tower crane features;
[0019] Step S522: Optimize the distance ratio within the tower crane unit; define the optimization loss function based on the finally determined classification hyperplane normal vector;
[0020] Step S53: Tower crane feature distribution optimization; quantify the dispersion of tower crane features through the tower crane divergence matrix; define the classification distance, introduce the occlusion penalty coefficient, and obtain the tower crane distance loss function;
[0021] Step S54: Model training; Divide the tower crane detection image set into a test set and a training set; Use the Adam optimizer to update the model parameters.
[0022] Further, in step S6, the tower crane detection involves acquiring the image to be detected, processing it according to the process of steps S2-S4, inputting it into the tower crane detection model, and outputting whether the image to be detected is a tower crane to obtain the tower crane detection result.
[0023] The tower crane detection system based on deep learning provided by this invention includes an image acquisition module, an initial image optimization module, a detail enhancement module, an aggregation correction module, a tower crane detection model establishment module, and a tower crane detection module;
[0024] The image acquisition module acquires images of the tower crane;
[0025] The initial image optimization module calculates dynamic weight coefficients based on the statistical characteristics of color channels and adjusts the attenuation channel to perform initial image optimization on the tower crane image.
[0026] The detail enhancement module employs a strategy of first extending the entire domain by region and then enhancing the local distribution to enhance the details of the tower crane image after the initial image optimization.
[0027] The aggregation correction module projects the tower crane images after initial optimization and detail enhancement onto the principal component space with maximum dispersion, performs aggregation correction, and obtains a set of tower crane detection images.
[0028] The tower crane detection model establishment module is based on the obtained tower crane detection image set. It trains the tower crane detection model by calculating the dynamic minimum envelope sphere range parameter, optimizing the intra-group distance ratio and feature distribution.
[0029] The tower crane detection module performs tower crane detection on the image to be detected based on the tower crane detection model.
[0030] The beneficial effects achieved by the present invention using the above solution are as follows:
[0031] (1) To address the problems of general tower crane detection methods, such as overall image processing leading to blurring of the entire structure, loss of key local features of the tower crane, and color distortion due to overexposure of metal surface reflections or fading of safety colors in shadow areas, resulting in poor reliability of the final detection, this solution calculates dynamic weight coefficients based on three-channel statistical features, adjusts the attenuation channel accordingly to improve the color authenticity of the image; adopts a strategy of global regional extension and local distribution enhancement to balance the integrity of the tower structure and the clarity of details; and reduces false detections and missed detections due to missing information based on aggregation correction; thereby improving the accuracy of subsequent monitoring.
[0032] (2) To address the problems of poor detection results caused by the difference in features of tower cranes due to different shooting conditions, resulting in the dispersion of features of similar tower cranes, easy to miss detection, weak environmental adaptability and anti-interference, and thus poor detection effect, this solution is based on the maximum pairwise distance of tower crane sample features to quantify the feature dispersion within the group, introduces environmental adaptive penalty design to optimize the loss function, dynamically adjusts the environmental interference penalty, strengthens the feature distance between tower crane and interference target in complex backgrounds to reduce false detection, avoids missed detection caused by excessive distance in clean backgrounds, introduces divergence matrix and occlusion penalty coefficient to quantify the global distribution dispersion of tower crane features, handles feature variation caused by tower crane occlusion and missing parts, avoids false occlusion, reduces the missed detection rate, and thus improves the detection effect. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating the deep learning-based tower crane detection method provided by the present invention.
[0034] Figure 2 A schematic diagram of the tower crane detection system based on deep learning provided by the present invention.
[0035] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0036] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0037] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the system or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0038] Example 1, see Figure 1 The present invention provides a deep learning-based tower crane detection method, which includes the following steps:
[0039] Step S1: Image acquisition; acquire tower crane images;
[0040] Step S2: Initial image optimization; Calculate dynamic weight coefficients based on color channel statistical features, and adjust the attenuation channel to perform initial image optimization on the tower crane image;
[0041] Step S3: Detail Enhancement; A strategy of first extending the entire area by region and then enhancing the local area is adopted to enhance the details of the tower crane image after the initial image optimization.
[0042] Step S4: Aggregation Correction; Project the tower crane images after initial optimization and detail enhancement onto the principal component space that maximizes the dispersion, and perform aggregation correction to obtain the tower crane detection image set;
[0043] Step S5: Establish a tower crane detection model; based on the obtained tower crane detection image set, train the tower crane detection model by calculating the dynamic minimum envelope sphere range parameter, optimizing the intra-group distance ratio and feature distribution;
[0044] Step S6: Tower crane detection; Tower crane detection is performed on the image to be detected based on the tower crane detection model.
[0045] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, image acquisition is to acquire tower crane images; tower crane images under different conditions are acquired, and different conditions correspond to different lighting conditions, different shooting angles, different working conditions, and different model appearances.
[0046] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, the initial image optimization is that the color distortion of the tower crane image mainly comes from the high light reflection: the strong light reflection of the metal surface causes the blue-green channel to be too strong, and the shadow fading: the red and yellow safety colors are attenuated under low light. By distinguishing the high light-dominated scene dominated by metal reflection and the shadow-dominated scene dominated by safety color area, the dynamic weight coefficient is calculated based on the statistical characteristics of the key color channel, the attenuation channel is adjusted, and the authenticity of the safety color and the texture of the metal color are preserved.
[0047] The specific operation is as follows: Let the tower crane image be I. t (x,y), decomposed into: red channel I R Corresponding to rust / warning red and green channels I G Corresponding warning yellow / metallic gray and blue channel I B This corresponds to metallic reflections; the dominant scene for highlights is defined as... , , and It is the average pixel value of each channel; It is the scene threshold; I in the metallic reflective area G and I B Its strength is significantly higher than I R Define the shadow-dominant scene as In the low-light area, I G and I B The attenuation is more pronounced; the dynamic weighting coefficient is calculated, including: statistical values for each channel. ; ; M and N are the height and width of the image, respectively; C∈{R,G,B}; where, , and These are the minimum, maximum, and average pixel values for channel C, respectively; {R,G,B} is the set of three-channel representations. These are C-channel pixels; x and y are the pixel coordinates; specular highlights dominate scene statistics, requiring adjustment of the red channel to suppress excessive blue / green reflections. ; ; ;in, , and These are the red channel adjustment coefficients obtained based on the channel mean, minimum, and maximum values, respectively. , , and These are the maximum and minimum pixel values for the blue and green channels; It's a smoothing term; the red channel is adjusted. ; These are the original red channel pixels; shadow-dominant scene statistics, adjusted yellow / red safe colors, and blue channel noise suppressed. ; ; and These are the green adjustment coefficient and the blue adjustment coefficient; after adjustment, the green channel and blue channel are respectively represented as... ; ;
[0048] The system retains the distinctiveness of safety colors to facilitate the detection of warning areas, while suppressing overexposure of metallic reflections to avoid loss of tower structure details; the dynamic coefficient is based on image statistical features to adapt to changes in tower crane color under different lighting conditions.
[0049] Example 4, see Figure 1 This embodiment is based on the above embodiment. In step S3, detail enhancement is required for tower crane inspection to highlight two types of details: the overall structure of the connection between the boom and the tower body and local components including bolts and welds. Overall enhancement solves the problem of low overall contrast, including the overall grayness of the image on cloudy days. Local enhancement focuses on the details of small areas, including the bright and dark edges of bolts. A strategy of first extending the overall area by region and then enhancing the local area with Rayleigh distribution is adopted to balance the integrity of the overall structure and the clarity of local details.
[0050] The specific operation is as follows: Extend the image by region and extract the highlight threshold from the histogram of the tower crane image after the initial image optimization. and shadow threshold , Corresponding to the upper limit of the metallic reflective area, The lower limit of the corresponding structural shadow area; the histogram is divided into highlight area, shadow area and normal area; the extension amplitude is controlled based on the dynamic extension coefficient LF, expressed as: ; ; Where Fo is the stretched grayscale value; It is the grayscale value of the image before stretching, corresponding to the tower crane image after the initial image optimization; and These are the maximum and minimum gray values after stretching, respectively; the stretched image is divided into 16×16 pixel regions, and the average gray value G of each region is calculated. A Adjusting the editing limits is represented as follows: Enhanced output, represented as: ; Where CL is the grayscale value after self-adjusting clipping constraints; It's the editing factor; It is the cumulative distribution function; 0 represents the grayscale value of a local area; 0 represents an enhanced output grayscale value. It is the distribution dispersion, which describes the degree of dispersion of reflected light intensity;
[0051] Global extension addresses overall uneven lighting, including darker tower crane images on cloudy days, while local enhancement highlights details of small components, such as the edges of bolt nuts. Rayleigh distribution adjusts the reflectivity of metal surfaces, preserving the texture and layering of weld seams.
[0052] Example 5, see Figure 1 This embodiment is based on the above embodiment. In step S4, the aggregation correction projects the tower crane image after initial image optimization and the tower crane image after detail enhancement onto the principal component space that maximizes the dispersion, prioritizing the retention of the most significant information in color and detail features, and avoiding the loss of information from a single image. Specifically, the tower crane image after initial image optimization is normalized and represented as I. c The tower crane image after detail enhancement is normalized and represented as I. e Expanded by pixels, it becomes a matrix X=[I c ,I e ] T Calculate the covariance matrix Perform eigenvalue decomposition on the covariance matrix and extract the eigenvector v1 corresponding to the largest eigenvalue; aggregate the image as follows: Where T is the transpose operation; is the mean vector of X; n is the number of rows in matrix X; It is the aggregated and corrected tower crane image; non-tower crane samples are collected, combined with the aggregated and corrected tower crane images, and labeled as whether they are tower cranes, to obtain the tower crane detection image set.
[0053] By performing the above operations, this solution addresses the problems of general tower crane detection methods, such as overall image processing leading to blurring of the entire structure, loss of key local features of the tower crane, and color distortion due to overexposure of metal surface reflections or fading of safety colors in shadow areas, resulting in poor final detection reliability. This solution calculates dynamic weighting coefficients based on three-channel statistical features, specifically adjusting the attenuation channel to improve image color accuracy. It employs a strategy of global regional extension and localized enhancement to balance the integrity of the tower structure with detail clarity. Based on aggregation correction, it reduces false positives and false negatives caused by missing information, thereby improving the accuracy of subsequent monitoring.
[0054] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, establishing the tower crane detection model specifically includes the following:
[0055] Step S51: Model Architecture Design; MobileNetV3 is used as the basic backbone, and the last 3 redundant convolutional layers are removed; multi-scale feature maps are added after the 3rd, 5th, and 7th convolutional blocks to output 16×16, 32×32, and 64×64 feature maps, corresponding to small-scale bolts, medium-scale safety color regions, and large-scale tower outlines, respectively; a feature aggregation neck is added between the backbone network and the fully connected layer, using a lightweight feature pyramid to aggregate the multi-scale feature maps through upsampling and pointwise convolution, outputting an aggregated feature map that retains details of small components, including bolts, while enhancing the overall structure of the tower; the aggregated feature map is compressed into a 128-dimensional vector by global average pooling to replace the traditional fully connected layer; and the feature vector is output through a linear mapping layer. The feature vectors are then fed into the classification head to complete the binary classification mapping. It is the i-th tower crane detection image sample; These are network weight parameters;
[0056] Step S52: Separation within the tower chiller unit; specifically including:
[0057] Step S521: Calculate the dynamic minimum envelope sphere range parameter of the tower crane features. The minimum envelope sphere range parameter R is approximated by the maximum pairwise distance of the tower crane sample features. This quantifies the dispersion of the tower crane features; the lower the dispersion, the smaller R, and the more stable the features. The maximum pairwise distance D of the tower crane samples is expressed as: ; It is the penalty coefficient; These are the features of the j-th tower crane detection image sample; i and j are the sample indices; and This is the sample label; a value of 1 indicates a tower crane sample, and a value of 0 indicates a non-tower crane sample.
[0058] Step S522: Optimize the intra-group distance ratio of tower cranes; maximize the intra-group distance between tower cranes and non-tower cranes, increase the feature distance between tower cranes and interfering targets, and reduce false detections; minimize the tower crane feature range parameter to make the features of tower cranes in different states more clustered, reducing false detections; introduce an environment adaptive penalty to enhance the model's adaptability to complex environments, reduce false detections in scenarios with many interfering targets, and avoid false detections caused by excessive distance in clean scenarios; define an optimization loss function. , is represented as: ; ; It is the environmental interference coefficient; The percentage of edge pixels in the sample background is calculated by dividing the image into the tower crane region and the background region using a semantic segmentation model to obtain the background mask. Then, edge detection is performed on the background region using the Canny edge detection algorithm to extract edge pixels in the background region. Finally, the ratio of the number of edge pixels to the total number of pixels in the background region is calculated, which is the percentage of edge pixels in the sample background. It is the final determined classification hyperplane normal vector, used to distinguish between tower crane and non-tower crane samples; b is the bias term, a constraint that ensures all samples are correctly classified by the hyperplane. It is the normal vector of the candidate classification hyperplane;
[0059] Step S53: Tower crane feature distribution optimization; To address the feature variations of tower cranes caused by occlusion and missing parts, a divergence matrix is introduced to capture the global distribution of tower crane features, and Mahalanobis distance is used to optimize the classification distance, thereby enhancing the robustness of the model to variations.
[0060] The specific operation is as follows: using the tower crane divergence matrix The lower the dispersion of the distribution of tower crane characteristics, the better. The smaller the trace, the more compact the feature; tower crane divergence matrix Represented as: C is the feature set of positive samples in the tower crane inspection image set; This is the mean vector of tower crane features; a classification distance is defined to make the distance metric take into account the distribution characteristics of tower crane features, making it more robust to severely occluded abnormal samples; for severely occluded tower crane samples, their features are prone to variation and differ significantly from those of normal tower crane samples. Without special handling, the model may misclassify them as non-tower crane samples, leading to missed detections. Therefore, an occlusion penalty coefficient is introduced, with a larger penalty for more severe occlusion. The tower crane distance loss function... Represented as: The total loss function L is expressed as: ; It is the balance coefficient; These are the loss weights; U is the total number of samples.
[0061] Step S54: Model training; Divide the tower crane detection image set into a test set and a training set; Use the Adam optimizer to update the model parameters; Use a cosine annealing strategy to schedule the learning rate; Evaluate the performance of the tower crane detection model based on recall, precision, and F1 score.
[0062] By performing the above operations, this solution addresses the problems of poor detection results in general tower crane detection methods. These problems include differences in tower crane features due to varying shooting conditions, resulting in dispersed features of similar tower cranes, easy missed detections, weak environmental adaptability and anti-interference, and consequently, poor detection performance. This solution quantifies the intra-group feature dispersion based on the maximum pairwise distance of tower crane sample features, introduces an environment-adaptive penalty design to optimize the loss function, and dynamically adjusts the environmental interference penalty. In complex backgrounds, it enhances the feature distance between the tower crane and interfering targets, reducing false detections; in clean backgrounds, it avoids missed detections caused by excessive distance. Furthermore, it introduces a divergence matrix and an occlusion penalty coefficient to quantify the global distribution dispersion of tower crane features, handling feature variations caused by tower crane occlusion and missing components, avoiding misjudgment of occlusion, and reducing the missed detection rate; thus, improving detection performance.
[0063] Example 7, see Figure 1 This embodiment is based on the above embodiment. In step S6, the tower crane detection involves acquiring the image to be detected, processing it according to the process of steps S2-S4, inputting it into the tower crane detection model, and outputting whether the image to be detected is a tower crane to obtain the tower crane detection result.
[0064] Example 8, see Figure 2 Based on the above embodiments, the deep learning-based tower crane detection system provided by the present invention includes an image acquisition module, an initial image optimization module, a detail enhancement module, an aggregation correction module, a tower crane detection model establishment module, and a tower crane detection module.
[0065] The image acquisition module acquires images of the tower crane;
[0066] The initial image optimization module calculates dynamic weight coefficients based on the statistical characteristics of color channels and adjusts the attenuation channel to perform initial image optimization on the tower crane image.
[0067] The detail enhancement module employs a strategy of first extending the entire domain by region and then enhancing the local distribution to enhance the details of the tower crane image after the initial image optimization.
[0068] The aggregation correction module projects the tower crane images after initial optimization and detail enhancement onto the principal component space with maximum dispersion, performs aggregation correction, and obtains a set of tower crane detection images.
[0069] The tower crane detection model establishment module is based on the obtained tower crane detection image set. It trains the tower crane detection model by calculating the dynamic minimum envelope sphere range parameter, optimizing the intra-group distance ratio and feature distribution.
[0070] The tower crane detection module performs tower crane detection on the image to be detected based on the tower crane detection model.
[0071] It should be noted that the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0072] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.
[0073] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A deep learning-based tower crane detection method, characterized by: The method comprises the following steps: Step S1: image acquisition; obtain tower crane image; Step S2: initial image optimization; based on color channel statistical feature calculation dynamic weight coefficient, adjust attenuation channel to carry out initial image optimization to tower crane image; Step S3: detail enhancement; using the strategy of first global region extension, then local distribution enhancement, the detail of the initial image optimization of tower crane image is enhanced; Step S4: aggregation correction; the tower crane image after initial optimization and detail enhancement is projected to the principal component space of maximum dispersion for aggregation correction to obtain a set of tower crane detection images; Step S5: establish tower crane detection model; based on the obtained tower crane detection image set, calculate the dynamic minimum envelope sphere range parameter, optimize the intra-group distance ratio and feature distribution to train the tower crane detection model; Step S6: tower crane detection; based on the tower crane detection model, the tower crane detection is carried out on the image to be detected; In step S2, the initial image I is optimized by setting the tower image as I t (x, y), decomposed into: red channel I R , green channel I G and blue channel I B ; define the highlight dominant scene as , , and are the average values of each channel pixel; is the scene threshold; define the shadow dominant scene as ; calculate the dynamic weight coefficient, including: each channel statistical value, ; ; ; M and N are the height and width of the image respectively; C ∈ {R, G, B}; wherein, , and are the minimum, maximum and average values of channel C pixel respectively; {R, G, B} is the set of three-channel representation; is the C channel pixel; x and y are the coordinate positions of the pixel; the highlight dominant scene statistical value, ; ; ; wherein, , and are the red channel adjustment coefficients based on the channel mean, minimum and maximum values respectively; , , and are the maximum and minimum values of the blue-green channel pixel; is the smoothing term; the adjusted red channel ; is the original red channel pixel; the shadow dominant scene statistical value, adjust the yellow / red safety color, suppress the blue channel noise, ; ; and are the green and blue adjustment coefficients respectively; the adjusted green and blue channels are represented as ; ; In step S5, the establishment of the tower crane detection model comprises the following contents: Step S51: model architecture design; MobileNetV3 is used as the basic backbone, the last 3 layers of convolution are removed, multi-scale feature mapping is added after the 3rd, 5th and 7th convolution blocks, and 16x16, 32x32 and 64x64 feature maps are output; a feature aggregation neck is added between the backbone network and the fully connected layer, a lightweight feature pyramid is used, the multi-scale feature maps are aggregated through upsampling and pointwise convolution, and an aggregated feature map is output; the aggregated feature map is compressed into a 128-dimensional vector through global average pooling, replacing the traditional fully connected layer; and a feature vector is output through a linear mapping layer ; a classification head is connected after the feature vector to complete binary classification mapping; is the i-th tower crane detection image sample; is the network weight parameter; Step S52: tower crane group separation; specifically comprising: Step S521: Calculate the tower crane feature dynamic minimum envelope sphere range parameter, and approximate the minimum envelope sphere range parameter R with the maximum pair distance of the tower crane sample features; the maximum pair distance D of the tower crane sample is expressed as: ; is a penalty coefficient; is the feature of the jth tower crane detection image sample; i and j are sample indexes; and is a sample label, equal to 1 indicating a tower crane sample, and equal to 0 indicating a non-tower crane sample; Step S522: tower group inner distance ratio optimization; maximize the tower and non-tower group inner distance; minimize the tower feature range parameter; introduce environmental self-adaptive penalty; define the optimization loss function , is expressed as: ; ; is the environmental interference coefficient; is the sample background edge pixel ratio; is the final determined classification hyperplane normal vector; ; b is the bias term; is the candidate classification hyperplane normal vector; Step S53: Crane feature distribution optimization; through the crane divergence matrix Quantify the distribution dispersion degree of the crane feature, the crane divergence matrix is expressed as: ; C is the feature set of the positive samples in the crane detection image set; is the mean vector of the crane feature; define the classification distance, introduce the occlusion penalty coefficient, and the crane distance loss function is expressed as: ; The total loss function L is expressed as: ; is the balance coefficient; is the loss weight; U is the total number of samples; Step S54: model training; the tower crane detection image set is divided into a test set and a training set; the Adam optimizer is selected to update the model parameters; the cosine annealing strategy is used for learning rate scheduling; the recall rate, precision and F1 score are used to evaluate the performance of the tower crane detection model.
2. The deep learning-based tower crane detection method of claim 1, wherein: In step S3, the detail enhancement is regional extension, the highlight threshold and shadow threshold of the histogram of the tower crane image after initial image optimization are extracted, and the histogram is divided into highlight area, shadow area and normal area; Based on the dynamic extension coefficient, the extension range is controlled; the extended image is divided into 16x16 pixel regions, the average gray of each region is calculated, self-adjusting clipping limit is performed, and the output is enhanced.
3. The deep learning-based tower crane detection method of claim 2, wherein: In step S4, the aggregate correction is to normalize the tower image after the primary image is optimized and represented as I c , the tower image after the detail enhancement is normalized and represented as I e , and unfolded as a matrix by pixel; The covariance degree matrix is calculated, the eigenvalue decomposition of the covariance matrix is performed, the eigenvector corresponding to the maximum eigenvalue is obtained, and the aggregated image is obtained; the non-tower crane sample is collected, combined with the tower crane image after aggregation correction, and the label is whether it is a tower crane, to obtain the tower crane detection image set.
4. The deep learning-based tower crane detection method of claim 3, wherein: In step S6, the tower crane detection is to obtain the image to be detected, process according to the procedures of steps S2-S4, then input into the tower crane detection model, output whether the image to be detected is a tower crane, and obtain the tower crane detection result.
5. A deep learning based tower crane detection system for implementing the deep learning based tower crane detection method according to any one of claims 1-4, characterized by: It comprises an image acquisition module, an initial image optimization module, a detail enhancement module, an aggregation correction module, a tower crane detection model establishment module and a tower crane detection module; The image acquisition module obtains the tower crane image; The initial image optimization module calculates the dynamic weight coefficient based on the color channel statistical feature, adjusts the attenuation channel to carry out initial image optimization to the tower crane image; The detail enhancement module uses the strategy of first global region extension, then local distribution enhancement, to enhance the detail of the initial image optimization of tower crane image; The aggregation correction module projects the tower crane image after initial optimization and detail enhancement to the principal component space of maximum dispersion for aggregation correction to obtain a set of tower crane detection images; The tower crane detection model establishment module is based on the obtained tower crane detection image set, trains the tower crane detection model by calculating a dynamic minimum envelope sphere range parameter, optimizing an intra-group distance ratio and feature distribution; The tower crane detection module performs tower crane detection on a to-be-detected image based on the tower crane detection model.
Citation Information
Patent Citations
Multi-scale tower crane component identification method based on YOLO model
CN119850918A
Self-adaptive underwater image enhancement system and method suitable for medium-deep water turbid scene
CN120451027A