An improved YOLOv13-based obstacle detection method for unmanned vehicles in a breeding base

CN123033205APending Publication Date: 2026-11-03HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611474029.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing YOLO target detection methods struggle to reliably identify small targets at long distances in complex environments during unmanned inspections of breeding bases, and lack adaptive feature processing mechanisms for different areas, resulting in high false detection and false negative rates.

Method used

A continuous perception dynamic feature reconstruction network (TDFR) and a region weight-guided multi-scale feature fusion network (RWMF) are constructed to dynamically reconstruct and fuse multi-scale features through the region feature weight map, thereby enhancing the target feature representation ability and reducing the impact of background interference.

Benefits of technology

It improves the detection accuracy and stability of small target obstacles at long distances in complex backgrounds, reduces the false detection and false detection rates, and meets the real-time detection needs of unmanned inspection vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033205A_ABST
    Figure CN123033205A_ABST
Patent Text Reader

Abstract

The application provides a kind of based on improved YOLOv13 aquaculture base unmanned vehicle obstacle detection method, comprising: collecting aquaculture base obstacle image, constructs and labels data set, completes image preprocessing;The pretreated image is input into YOLOv13 backbone network to extract multi-scale features, generates region state chart according to the response difference of target and background area, and accordingly dynamically reconstructs multi-scale features;Determine the fusion weight of each scale feature according to the region state chart, suppress the background interference by weighted fusion to improve the proportion of target area feature, obtain the optimized multi-scale fusion feature;The optimized feature is input into YOLOv13 detection head, and the obstacle positioning and class identification are completed.The application improves the detection accuracy and stability of the road obstacle of the aquaculture base unmanned inspection vehicle on the basis of maintaining the real-time of YOLOv13, reduces the false detection and missed detection under complex background.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer and intelligent traffic unmanned vehicle inspection, and particularly relates to a breeding base unmanned vehicle obstacle detection method based on an improved YOLOv13. BACKGROUND

[0002] With the large-scale expansion and intelligent development of breeding bases, using unmanned inspection vehicles for daily work and safety monitoring in breeding bases has become an important means to improve management efficiency. In practical applications, unmanned vehicles need to drive autonomously in the site and identify and avoid obstacles such as pedestrians, transport carts, road potholes, and scattered debris that affect traffic in real time, thereby ensuring the continuity and safety of work tasks.

[0003] However, the road environment of the breeding base is complex, and the ground is usually accompanied by equipment and material stacking, pedestrian walking, and vehicle transportation operations, which can easily form multiple types of obstacles. At the same time, there are changes in illumination, local occlusion, and background texture interference in the site, and these factors all pose higher requirements on the stability of the target detection algorithm.

[0004] At present, the target detection method based on deep learning, especially the YOLO series algorithm, has achieved good results in the target detection task, and has high detection speed and certain precision advantage. However, in the low-angle inspection scene of unmanned vehicles, the existing methods still have the following shortcomings:

[0005] First, the stability in complex environments is insufficient. In actual sites, affected by factors such as changes in illumination, local shadows, and equipment and material occlusion, these factors can easily form interference information similar to the target in the image, affecting the model's recognition of the edges and contours of obstacles, leading to false positives or missed detections. The existing methods mainly use uniform feature extraction, lack modeling of the difficulty level of the road passable area, and the difficult areas in the complex background are difficult to obtain targeted feature enhancement.

[0006] Second, the detection ability of small targets at a distance is limited. In the process of unmanned vehicle inspection, the size of the obstacle at a distance is small, and in the process of multi-scale feature extraction and fusion, its effective features are easily weakened layer by layer and gradually submerged by complex background textures, making it difficult for the target features in difficult areas to be sustained, thereby reducing the detection accuracy and affecting the early warning ability.

[0007] Third, the lack of adaptive feature processing mechanism for difficult areas in complex background. In the road environment of the breeding base, the road, obstacles and complex background have different texture characteristics and spatial distribution characteristics. However, the existing target detection network usually adopts a unified feature updating and fusion mode, which cannot dynamically adjust the feature expression process according to the detection difficulty of different areas, so that the background texture easily continuously interferes with the obstacle feature, causing the false detection rate and the missed detection rate to increase in complex scenes, affecting the stability of the operation of the unmanned vehicle inspection.

[0008] Further analysis found that the existing YOLO series target detection method mainly improves around the attention mechanism, multi-scale detection layer, feature fusion structure and loss function, but the above improvements are mostly limited to local links in the network, lacking a unified feature processing mechanism for road difficult area features, and failing to realize the cooperative use of difficult area information in the feature extraction, feature reconstruction and feature updating process. Therefore, how to establish a unified feature processing mechanism for road difficult areas has become an important technical problem to improve the performance of obstacle detection in complex scenes.

[0009] In summary, the existing target detection method in the application of unmanned inspection in the breeding base is difficult to simultaneously consider the environmental adaptability, small target detection ability and detection accuracy in complex scenes. Therefore, a target detection method capable of obtaining difficult area information for the road scene of the breeding base and realizing dynamic feature reconstruction and progressive feature evolution based on the difficult area information is developed, so as to improve the detection stability and recognition accuracy of long-distance small target obstacles in complex background, which has significant engineering application value and practical significance. SUMMARY

[0010] The purpose of the present application is to overcome the problems of low detection accuracy of long-distance small obstacles, false detection of target features easily disturbed in complex background and insufficient feature expression in difficult areas of the unmanned inspection vehicle in the breeding base in the prior art, and to provide an improved YOLOv13-based obstacle detection method for unmanned vehicles in the breeding base, comprising the following steps:

[0011] Step 1, collect the obstacle pictures of the breeding base, construct the data set, label the data set, and then preprocess the images;

[0012] Step 2, input the preprocessed images into the YOLOv13 backbone network to extract multi-scale features, generate a region state map according to the response difference between the target region and the background region in each scale feature, and dynamically reconstruct the multi-scale features according to the region feature weight map;

[0013] Step 3. According to the regional state diagram, determine the corresponding fusion weight for different scale features, and complete the weighted fusion of each scale feature according to the fusion weight, improve the proportion of target region features in the fusion result, reduce the influence of background region features on the fusion result, and obtain the optimized multi-scale fusion features.

[0014] Step 4. Input the optimized multi-scale fusion features into the YOLOv13 detection head to complete the obstacle target positioning and category recognition, output the obstacle bounding box, category information and detection confidence, and use the detection result for unmanned vehicle front road obstacle recognition.

[0015] Step 1 includes the following steps:

[0016] Step 1.1, the front view camera carried by the unmanned inspection vehicle collects image data of the internal road environment of the breeding base;

[0017] Step 1.2, according to the type of obstacles that may be encountered during the inspection process of the unmanned vehicle, the target in the image is defined and labeled, the target is labeled with a bounding box, and the corresponding category label and position information are obtained;

[0018] Step 1.3, using the image labeling software LabelImg to label the image under the perspective of the unmanned vehicle;

[0019] Step 1.4, divide the labeled data set into training set, validation set and test set according to the preset proportion, wherein the training set is used for model parameter learning, the validation set is used for model tuning and performance evaluation, and the test set is used for final detection performance verification;

[0020] Step 1.5, in the data preprocessing stage, unify the size and normalize the input image, and perform data enhancement combined with the scene characteristics of the breeding base, including brightness adjustment, contrast change and color disturbance.

[0021] In step 2, a traffic domain continuity perception dynamic feature reconstruction network TDFR is constructed between the backbone network and the feature fusion network based on the original YOLOv13 network structure, which is used for reconstruction processing of the multi-scale features output by the backbone network; the traffic domain continuity perception dynamic feature reconstruction network TDFR is based on the small size of the long-distance obstacle in the breeding base road scene, the complex background texture and the continuous change of the traffic area, and comprehensively analyzes the road continuous change, local edge change, texture change and cross-scale response in different scale features, identifies the areas that need to be processed, and uses different feature reconstruction methods for different areas.

[0022] Step 2 includes the following steps:

[0023] Step 2.1, perform access area feature analysis: input the multi-scale features output by the YOLOv13 backbone network into the access area continuous perception dynamic feature reconstruction network TDFR;

[0024] For the Layer output features First, regional response is extracted, and then edge response is obtained.

[0025] Let the first Layer output features Represented as:

[0026] ,

[0027] in Indicates the number of channels. and Let represent the height and width of the feature map, respectively, and R represent the real number space;

[0028] For input features Perform lightweight convolution mapping to generate region response maps. :

[0029] ,

[0030] in, For the region response mapping function, This is the Sigmoid activation function.

[0031] Subsequently, the edge response map is extracted. :

[0032] ,

[0033] in, For edge response extraction function;

[0034] In obtaining the regional response map and edge response map Then, the degree of road continuity, edge variation, texture variation, and cross-scale response variation are calculated for each spatial location;

[0035] To determine the continuity of the road, a local neighborhood is established along the direction of travel of the unmanned inspection vehicle. Calculate the difference between the current location and the average road response in the neighborhood:

[0036] ,

[0037] in, This is the current spatial location; Indicates the first The degree of road continuity at spatial location p in the layer feature map;

[0038] To determine the degree of edge change, a local neighborhood centered on the current location is established. Calculate the difference between the current location and the average edge response of the neighborhood:

[0039] ,

[0040] in Indicates the first The degree of edge variation of the layer feature map at spatial location p;

[0041] The degree of texture variation is calculated using the feature variance within the local neighborhood:

[0042] ,

[0043] in, This represents the operation of local variance. Indicates the first The degree of texture variation in the layer feature map at spatial location p; Indicates the first The backbone network output feature map corresponding to each detection scale is in the local neighborhood. Internal space location The eigenvector at that location;

[0044] For cross-scale response variations, the features at adjacent scales are first aligned using a scale mapping function:

[0045] ,

[0046] in, For channel mapping functions, This is an upsampling operation; Indicates the first The degree of cross-scale response variation of the layer feature map at spatial location p;

[0047] No. Each spatial location of the layer feature map is obtained with corresponding , , as well as The four types of area information are then input into step 2.2 to determine the area status;

[0048] Step 2.2, using the road continuity obtained in Step 2.1 Degree of edge change Degree of texture variation and cross-scale response changes , for the The mean and standard deviation of the four types of regions in the layer were calculated respectively:

[0049] ,

[0050] ,

[0051] in, , Indicates the first Class region information, where k ranges from 1 to 4; This represents the mean of the k-th type of information in the i-th layer. represents the standard deviation of the k-th class region information in the i-th layer; Mean represents the function for calculating the mean, and Std represents the function for calculating the standard deviation.

[0052] Determine the corresponding judgment threshold based on the statistical results at the current scale:

[0053] ,

[0054] in, This is the scaling adjustment coefficient; The threshold for determining the k-th type of region information in the i-th layer;

[0055] The regional state response corresponding to the current location is calculated based on four types of regional information: structural change region, response attenuation region, background interference region, and normal region, respectively. , , and ;

[0056] State response of structural change region for:

[0057] ,

[0058] in, , , As weight; , , and They represent the first The thresholds for determining the degree of road continuity, edge variation, texture variation, and cross-scale response variation at each detection scale;

[0059] State response in the response decay region for:

[0060] ,

[0061] State response of background interference area for:

[0062] ,

[0063] For the positions that do not meet the three types of state conditions of structural change region, response attenuation region and background interference region, determine as normal region, the state response is:

[0064] ,

[0065] Wherein, Norm represents the normalization operation;

[0066] Take the state corresponding to the maximum response as the final region state of the current position:

[0067] ,

[0068] Finally, the region state graph corresponding to the layer feature map is obtained :

[0069] ;

[0070] Wherein, represents the region state graph corresponding to the i-th detection scale; represents the spatial position in the i-th detection scale feature map; represents the whole spatial position set of the i-th detection scale feature map; represents the region state of the i-th detection scale at the spatial position ; Step 2.3, according to the region state of each spatial position, select the corresponding feature reconstruction mode; let the i-th layer input feature map be:

[0071] Step 2.3, according to the region state of each spatial position, select the corresponding feature reconstruction mode; let the i-th layer input feature map be:

[0072] ,

[0073] The region state graph is:

[0074] ,

[0075] Wherein, respectively represent the structural change region, the response attenuation region, the background interference region and the normal region; represents the region state corresponding to the i-th detection scale position p;

[0076] When ​​​​​At that time, local neighborhood features are reconstructed for the current position, using the current position as the basis for the reconstruction. Establish local neighborhood Calculate the neighborhood reconstruction weights based on the current location features and neighborhood features. :

[0077] ,

[0078] Where G is the neighborhood correlation function and exp is the natural exponential function; Represents local neighborhood The neighborhood position in Indicates the first Each detection scale feature map in the neighborhood location The eigenvector at that location; Represents local neighborhood The spatial location used for weight normalization summation Indicates the first Each detection scale feature map at location The eigenvector at that location;

[0079] Reconstructing local features based on neighborhood weights:

[0080] ,

[0081] in Indicates spatial location Local neighborhood reconstruction features at the location;

[0082] when At that time, cross-scale feature compensation is performed on the current position, assuming the current scale feature is... Adjacent scale features are First, spatial dimensions and channel dimensions are aligned using a scale alignment function:

[0083] ,

[0084] in, Represents the scale alignment function; Indicates the first The feature map is obtained by scale alignment of the detection scale features.

[0085] Subsequently, the cross-scale fusion coefficient at the current location is calculated. :

[0086] ,

[0087] in, Indicates the first Each detection scale is at its current location. Cross-scale fusion coefficient at the location; , and These are learnable parameters; Indicates the learnable bias parameter;

[0088] Based on cross-scale fusion coefficient Complete cross-scale feature reconstruction:

[0089] ,

[0090] in Indicates spatial location Cross-scale reconstruction features at the location;

[0091] when At that time, let the input feature at the current position be... Based on the degree of texture change at the current location Calculate background region weights :

[0092] ;

[0093] in, This is a bias term used to adjust... Input offset of the function mapping;

[0094] Background features are reconstructed based on background region weights:

[0095] ,

[0096] in Indicates spatial location Background reconstruction features at the location;

[0097] when At the same time, the original features of the current position remain unchanged: ,in, This represents the output features after reconstruction of the normal region;

[0098] Select the corresponding reconstruction result for each spatial location to obtain the final output features at the current scale:

[0099] ,

[0100] in, Indicates the first Each detection scale in spatial location The final reconstructed features at the location;

[0101] No. The reconstructed output feature map corresponding to each detection scale for: ;

[0102] The above dynamic feature reconstruction is performed on three detection scales to obtain multi-scale output features: wherein, , and represent the reconstructed output feature maps corresponding to the 3rd, 4th and 5th detection scales, respectively, corresponding to the and feature layers in the YOLOv3 network.

[0103] In step 3, after completing the dynamic feature reconstruction of the passing domain continuity perception in step 2, the reconstructed features of three detection scales and and the corresponding region state maps , and are obtained; the reconstructed features and region state information are input into the region weight guided multi-scale feature fusion network RWMF to dynamically fuse the features of different detection scales.

[0104] Step 3 includes the following steps:

[0105] Step 3.1, multi-scale feature input; first, the reconstructed features of three detection scales output in step 2 are obtained: , and and the corresponding region state maps: , and ;

[0106] Before multi-scale fusion, the high-level features are first upsampled to make the adjacent scale features have consistent spatial resolution;

[0107] Let and represent two adjacent detection scales, then: ;

[0108] wherein, represents the upsample operation, represents the feature map obtained by upsampling the reconstructed feature map ;

[0109] After the scale alignment is completed, the reconstructed features of each scale and the corresponding region feature weight maps are input into the region weight guided multi-scale feature fusion network RWMF;

[0110] Step 3.2, according to the region state map obtained in step 2, the region state to which the current position belongs is determined, and the fusion weight of the current position is calculated accordingly;

[0111] According to the region feature weight map, a fusion weight is calculated :

[0112] ;

[0113] wherein, [0,1] represents a weight of the current position and current scale feature in the fusion result; represents a weight mapping parameter corresponding to the region state; represents a bias parameter in the fusion weight calculation;

[0114] Step 3.3, dynamic weighted fusion; after the fusion weight calculation is completed, the feature fusion is performed in a step-by-step manner from a high layer to a low layer according to the detection scale;

[0115] First, the reconstructed feature of the highest layer is reserved , and the following is obtained: ; wherein, represents a fusion feature map corresponding to the 1 / 32 detection scale;

[0116] The reconstructed feature map is up-sampled to obtain: ; wherein, represents an up-sampled feature which is consistent with the spatial size and channel dimension of the feature map;

[0117] The up-sampled feature map is weighted and fused with the reconstructed feature map to obtain:

[0118] ,

[0119] wherein, represents a fusion feature of the 1 / 16 detection scale at the spatial position ; represents a fusion weight of the 1 / 16 detection scale at the spatial position ; represents a feature of the reconstructed feature map at the spatial position ; (p) represents a feature of the up-sampled feature map at the spatial position ;

[0120] The fusion feature map is up-sampled to obtain: , wherein, represents a feature map obtained by up-sampling the fusion feature map ;

[0121] The up-sampled feature map reconstruct the feature map to obtain:

[0122] ,

[0123] wherein, denotes the fusion feature of the 1 / 8 detection scale at the spatial position ; denotes the fusion weight of the 1 / 8 detection scale at the spatial position ; denotes the feature of the reconstructed feature map at the spatial position ; denotes the feature of the up-sampled feature map at the spatial position ;

[0124] The features of different detection scales are dynamically combined through the above step-by-step fusion manner.

[0125] Step 3.4, fusion output.

[0126] Step 3.4 includes: after completing the step-by-step feature fusion, the fusion features corresponding to the three detection scales are obtained:

[0127] ,

[0128] wherein, denotes a set of multi-scale fusion features corresponding to the three detection scales; , and denote the fusion feature maps corresponding to the 1 / 8, 1 / 16 and 1 / 32 detection scales, respectively.

[0129] The fused multi-scale features are input into the YOLOv3 detection head to respectively perform target class prediction and bounding box regression at different detection scales, so as to obtain the detection result of the road obstacle.

[0130] Step 4 includes the following steps:

[0131] Step 4.1, model training is performed on the training set, the model performance is evaluated by using the validation set during the training process, and the model training process is adjusted according to the evaluation result, so as to obtain the trained obstacle detection model;

[0132] Step 4.2, the test set image or the aquaculture base environment video stream collected in real time by the camera of the unmanned inspection vehicle is input into the trained obstacle detection model to complete inference and real-time detection;

[0133] Step 4.3, result post-processing and web visualization on the web side: integrate the detection results with the web management interface on the web side.

[0134] The application also provides an electronic device comprising a processor and a memory, the memory storing program codes, when the program codes are executed by the processor, the processor executes the steps of the method.

[0135] The application also provides a storage medium storing computer programs or instructions, when the computer programs or instructions are run on a computer, the steps of the method are executed.

[0136] The application is based on a YOLOv13 target detection network, and aims at the problems of small size of long-distance obstacles, serious background interference and obvious feature difference in different regions in the road scene of the breeding base, and constructs a unified feature optimization method for the road scene. First, a traffic domain continuity perception dynamic feature reconstruction network is constructed between the YOLOv13 backbone network and the neck network, a region feature weight map is generated according to the response difference of the target region and the background region in the multi-scale feature, and the multi-scale feature is dynamically reconstructed according to the region feature weight map, so as to improve the feature expression ability of the key target in the complex scene; then, the region feature weight map and the reconstructed multi-scale feature are input into the road perception progressive feature evolution network, the multi-scale feature is optimized layer by layer according to the fusion weight and the update rule corresponding to different regions, the retention ability of the target region feature in the multi-scale fusion process is improved, the influence of the background region feature on the detection result is reduced, and the detection precision and stability of the long-distance small target obstacle in the road scene of the breeding base are improved.

[0137] The application effectively improves the detection precision, detection stability and environmental adaptability of long-distance small obstacles in a complex background on the basis of maintaining the real-time detection performance of YOLOv13, and can meet the application requirements of real-time detection of road obstacles in the autonomous driving process of the unmanned inspection vehicle of the breeding base.

[0138] Beneficial effects: compared with the prior art, the application aims at the problems of easy missed detection of long-distance small targets, complex background interference and weakening of target information in the multi-scale fusion process in the road scene of the breeding base, constructs a traffic domain continuity perception dynamic feature reconstruction network (TDFR) between the YOLOv13 backbone network and the neck feature fusion network, and constructs a region weight guided multi-scale feature fusion network (RWMF) in the neck network, realizes dynamic reconstruction of different region features and region weight guided fusion of multi-scale features, and improves the accuracy and stability of obstacle detection in a complex scene.

[0139] Wherein, the TDFR processes different scale features according to the region state of different scale features, and differentiates the feature processing of structure change, response attenuation, background interference and normal region, enhances the local structure feature of the target, compensates the small target feature at a long distance and suppresses the background interference, so as to improve the expression ability of the target feature in a complex road environment.

[0140] The RWMF dynamically adjusts the fusion proportion of different scale features according to the region feature weight, so that more effective feature information is reserved in the target region, the influence of the background region on the fusion result is reduced, and the feature retention ability of the small target at a long distance in the multi-scale fusion process is improved.

[0141] Through the above improvement, on the basis of maintaining the overall detection process and real-time of YOLOv13, the detection accuracy and stability of the road obstacle of the unmanned inspection vehicle in the breeding base are improved, and the false detection and missed detection in the complex background are reduced. BRIEF DESCRIPTION OF DRAWINGS

[0142] The above and / or other aspects of the present application will become apparent by referring to the following description taking in conjunction with the accompanying drawings, wherein:

[0143] Figure 1 is the overall flowchart of the method of the present application.

[0144] Figure 2 is the improved YOLOv13 algorithm network structure provided by the method of the present application.

[0145] Figure 3 is the structure diagram of the passing domain continuity perception dynamic feature reconstruction network (TDFR) in the present application.

[0146] Figure 4 is the structure diagram of the region weight guided multi-scale feature fusion network (RWMF) in the present application.

[0147] Figure 5 is the region state determination mechanism diagram of the TDFR in the present application.

[0148] Figure 6 is the detection image detection result diagram of the YOLOv13 network model in the embodiment of the present application.

[0149] Figure 7 is the detection image detection result diagram of the YOLOv13 network model in the embodiment of the present application.

[0150] Figure 8 is the performance evaluation result diagram of the improved YOLOv13 obstacle detection model after training in the embodiment of the present application.

[0151] Figure 9is a breeding base obstacle detection result schematic diagram in the embodiment of the application. DETAILED DESCRIPTION

[0152] As Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 indicated, the embodiment of the application provides a breeding base unmanned vehicle obstacle detection method based on improved YOLOv13, comprising the following steps:

[0153] Step 1, collect breeding base obstacle pictures, construct a data set, use software to label the data set, and then preprocess the images;

[0154] The specific process is as follows:

[0155] Step 1.1, collect image data of the internal road environment of the breeding base, and the image is obtained by a front-view camera carried by an unmanned inspection vehicle. The collected scenes include breeding base roads, work areas, and equipment passing areas, etc. During the collection process, different light conditions (such as strong light, shadow), different weather conditions (such as sunny, cloudy) and different work states (such as personnel activity, equipment operation) are covered to improve the diversity of the data set.

[0156] Step 1.2, according to the types of obstacles that may be encountered during the unmanned vehicle inspection process, the targets in the image are classified and labeled, and the obstacles include but are not limited to: vehicles, pedestrians, animals, road potholes, soil piles, scattered branches and other objects that affect the passage. The target is labeled with a bounding box using a labeling tool to obtain the corresponding class label and position information.

[0157] Step 1.3, use LabelImg to label the image under the perspective of the unmanned vehicle.

[0158] Step 1.4, divide the labeled data set into a training set, a validation set and a test set according to a predetermined proportion, wherein the training set is used for model parameter learning, the validation set is used for model tuning and performance evaluation, and the test set is used for final detection performance verification.

[0159] Step 1.5, in the data preprocessing stage, the input image is uniformly sized and normalized, and data augmentation is performed in combination with the characteristics of the breeding base scene, including brightness adjustment, contrast change and color disturbance, to improve the adaptability of the model to different environmental conditions.

[0160] Step 2, based on as Figure 2The improved YOLOv3 network structure constructs a real-time detection model for road obstacles in a breeding base. In step 2, a traffic area continuity perception dynamic feature reconstruction network (TDFR) is constructed between the backbone network and the feature fusion network (Neck) based on the original YOLOv3 network structure, which is used to reconstruct and process the multi-scale features output by the backbone network. The TDFR is based on the characteristics of small remote obstacle size, complex background texture and continuous change of traffic area in the road scene of the breeding base. It comprehensively analyzes the road continuous change, local edge change, texture change and cross-scale response in different scale features, identifies the areas that need to be processed, and uses different feature reconstruction methods for different areas to improve the feature expression ability of remote small target obstacles in complex background and provide more stable input features for subsequent multi-scale feature fusion. In the neck network, a region weight guided multi-scale feature fusion network (RWMF) is constructed, which dynamically fuses the reconstructed multi-scale features according to the region weight, obtains the optimized multi-scale features and inputs them into the detection head.

[0161] The specific process is as follows:

[0162] Step 2.1, perform traffic area feature analysis: input the multi-scale features output by the YOLOv3 backbone network into the traffic area continuity perception dynamic feature reconstruction network TDFR;

[0163] For the first layer output feature , first perform region response extraction, and further obtain edge response;

[0164] Let the layer output feature be represented as: ,

[0165] Where represents the number of channels, and represent the height and width of the feature map respectively, and R represents the real space;

[0166] Perform lightweight convolution mapping on the input feature to generate a region response map : ,

[0167] Where, is a region response mapping function, is a Sigmoid activation function;

[0168] Subsequently, extract the edge response map : ,

[0169] where, is the edge response extraction function;

[0170] After obtaining the region response map and the edge response map , the road continuity, edge variation, texture variation and cross-scale response variation are computed for each spatial location.

[0171] For road continuity, a local neighborhood is established along the driving direction of the unmanned vehicle, and the difference between the current location and the average road response of the neighborhood is computed: ,

[0172] For edge variation, a local neighborhood is established centered at the current location, and the difference between the current location and the average edge response of the neighborhood is computed: ,

[0173] For texture variation, the feature variance within the local neighborhood is used for computation:

[0174] ,

[0175] For cross-scale response variation, first the neighboring scale features are aligned using a scale mapping function:

[0176] ,

[0177] where, is the current location, is the location within the local neighborhood, and represent the number of spatial locations within the respective neighborhood; is the feature vector at location ; denotes the local variance operation, is the channel mapping function, is the up-sampling operation, denotes the two-norm.

[0178] The above , , and represent the road continuity, edge variation, texture variation and cross-scale response variation of the layer feature map at location . After the computation for all spatial locations, the corresponding four types of region information maps , , and are formed.and input step 2.2 to determine the region state.

[0179] Step 2.2, using the four types of region information obtained in step 2.1, respectively calculate the first The mean and standard deviation of each type of region information in the layer: , ,

[0180] Wherein, corresponding to the road continuity, edge change degree, texture change degree and cross-scale response change, namely: ,

[0181] Without The indicates the complete region information map of the current layer, indicates the value at position . Mean and Std respectively calculate the mean and standard deviation of the value of all spatial positions of the map, and the obtained results are and .

[0182] According to the statistical results of the current scale, determine the corresponding determination threshold:

[0183] ,

[0184] Wherein, is the scale adjustment coefficient; indicates the determination threshold of the kth type of region information of the ith layer.

[0185] According to the four types of region information, calculate the region state response corresponding to the current position, and the structural change region, the response attenuation region, the background interference region and the normal region correspond to , , and ;

[0186] The state response of the structural change region is:

[0187] ,

[0188] The state response of the response attenuation region is:

[0189] ,

[0190] The state response of the background interference region is:

[0191] ,

[0192] For the position that does not meet the three types of state conditions of structural change area, response attenuation area and background interference area, it is determined as a normal area, and the state response is:

[0193] ,

[0194] wherein, ~ is a weight, and Norm represents a normalization operation; , , and represent the state responses of the current position corresponding to the structural change area, the response attenuation area, the background interference area and the normal area respectively.

[0195] The state corresponding to the maximum response is taken as the final area state of the current position:

[0196] ,

[0197] Finally, the region state graph corresponding to the first layer feature map is obtained :

[0198] ;

[0199] wherein, represents the entire spatial position set of the first layer feature map, records the area state of each position and serves as the basis for subsequent dynamic feature reconstruction.

[0200] Step 2.3, according to the region state graph obtained in step 2.2 , each spatial position in the first layer input feature is reconstructed by using the corresponding feature reconstruction method. Among them, respectively represent that the current position belongs to the structural change area, the response attenuation area, the background interference area and the normal area.

[0201] When , the local neighborhood feature reconstruction is performed on the current position, and the local neighborhood is established according to the current position feature and the neighborhood feature, and the neighborhood reconstruction weight is calculated according to the current position feature and the neighborhood feature:

[0202] ,

[0203] wherein, G is a neighborhood correlation function, and exp is a natural exponential function; represents the neighborhood position in the local neighborhood , Indicates the first Each detection scale feature map in the neighborhood location The eigenvector at that location; Represents local neighborhood The spatial location used for weight normalization summation Indicates the first Each detection scale feature map at location The feature vector at, where Current position .

[0204] Reconstructing local features based on neighborhood weights:

[0205] ,

[0206] in Indicates spatial location The local neighborhood reconstruction features at the location.

[0207] when At that time, cross-scale feature compensation is performed on the current position, assuming the current scale feature is... Adjacent scale features are First, spatial dimensions and channel dimensions are aligned using a scale alignment function:

[0208] ,

[0209] in, Represents the scale alignment function; Indicates the first The feature map is obtained by scale alignment of the detection scale features.

[0210] Subsequently, the cross-scale fusion coefficient at the current location is calculated. :

[0211] ,

[0212] in, Indicates the first Each detection scale is at its current location. Cross-scale fusion coefficient at the location; , and These are learnable parameters; This represents the learnable bias parameter.

[0213] Based on cross-scale fusion coefficient Complete cross-scale feature reconstruction:

[0214] ,

[0215] wherein represents a cross-scale reconstruction feature at a spatial position .

[0216] When , let the current position input feature be , the background region weight is calculated according to the texture variation degree of the current position: ,

[0217] wherein, is a bias term, used to adjust the input offset of the function mapping.

[0218] According to the background region weight, the background feature reconstruction is completed:

[0219] ,

[0220] wherein represents a background reconstruction feature at a spatial position p.

[0221] When , the current position original feature is kept unchanged: wherein, represents the output feature after normal region reconstruction, represents the current position input feature.

[0222] The corresponding reconstruction results are selected for each spatial position, to obtain the final output feature of the current scale:

[0223] ,

[0224] wherein, represents the final reconstruction feature of the i-th detection scale at a spatial position .

[0225] The reconstruction output feature map corresponding to the i-th detection scale is: ;

[0226] wherein, represents the reconstruction output feature map corresponding to the i-th detection scale.

[0227] The above dynamic feature reconstruction is performed on the three detection scales respectively, to obtain multi-scale output features: , wherein, , and respectively represent the reconstruction output feature maps corresponding to the 3rd, 4th and 5th detection scales, which respectively correspond to and​​​​ feature layer.

[0228] Step 3, the embodiment will be obtained by step 2 three detection scale reconstruction features 、 、 and the corresponding region state map 、 、 Input region weight guided multi-scale feature fusion network RWMF, according to the region state of each spatial position to calculate the fusion weight, and by high to low level to complete dynamic fusion.

[0229] Step 3.1, multi-scale feature input; first get the three detection scale reconstruction features output by step 2: 、 and and the corresponding region state map: 、 and ; represents the region state corresponding to the i-th detection scale position p;

[0230] Before multi-scale fusion, first up-sample the high layer feature, so that the adjacent scale features have consistent spatial resolution;

[0231] Let and represent two adjacent detection scales, then: .

[0232] wherein, represents the up-sampling operation, represents the feature map obtained by up-sampling the reconstruction feature map ;

[0233] After scale alignment, the reconstruction features of each scale and the corresponding region feature weight map are taken as the input of the region weight guided multi-scale feature fusion network RWMF.

[0234] Step 3.2, according to the region state map obtained by step 2, determine the region state to which the current position belongs, and calculate the fusion weight of the current position according to it;

[0235] According to the region feature weight map, the fusion weight is calculated:

[0236] ;

[0237] wherein, [0,1] represents the weight of the current scale feature of the current position in the fusion result; a weight mapping parameter corresponding to a region state; a bias parameter in the fusion weight calculation.

[0238] Step 3.3, dynamic weighted fusion; after the fusion weight calculation is completed, the feature fusion is performed from high to low layer by layer according to the detection scale.

[0239] First, the reconstructed feature of the highest layer is reserved , obtaining: ;

[0240] The reconstructed feature map is up-sampled to obtain: ;

[0241] The up-sampled feature map is weighted fused with the reconstructed feature map to obtain:

[0242] ;

[0243] The fused feature map is up-sampled to obtain: ;

[0244] wherein, indicates the feature map obtained by up-sampling the fused feature map .

[0245] The up-sampled feature map is weighted fused with the reconstructed feature map to obtain:

[0246] ,

[0247] Through the above step-by-step fusion manner, the features of different detection scales are dynamically combined.

[0248] Step 3.4, fusion output;

[0249] After the step-by-step feature fusion is completed, the fused features corresponding to three detection scales are obtained: ,

[0250] wherein, indicates a multi-scale fused feature set corresponding to three detection scales; , and respectively indicate the fused feature maps corresponding to 1 / 8, 1 / 16 and 1 / 32 detection scales.

[0251] The fused multi-scale features Input YOLOv13 detection head, respectively, on different detection scales, target class prediction and bounding box regression are carried out, and the detection result of the road obstacle is obtained.

[0252] Step 4, the obstacle detection model is trained by using the preprocessed image, and the trained model is applied to the actual scene to realize real-time detection of the obstacles in the breeding base, and the position and category information of the target are output.

[0253] The specific process is as follows:

[0254] Step 4.1, model training is performed on the training set, the model performance is evaluated by using the validation set during the training process, and the model training process is adjusted according to the evaluation result, and the trained obstacle detection model is obtained;

[0255] Step 4.2, the test set image or the breeding base environment video stream collected by the unmanned inspection vehicle camera in real time is input into the trained optimal detection model, so as to complete the inference and real-time detection.

[0256] Step 4.3, result post-processing and Web visualization, in order to realize the perceptual identification and systematic management of the obstacles in the breeding base, the algorithm inference result is deeply integrated with the Web interface management interface, as shown in the figure, the Web management platform provides "picture detection", "video detection" and "camera detection" precise interactive mode. Users can upload ground inspection photos, historical inspection videos or directly call the front view camera of the inspection vehicle in real time according to the inspection requirements. The system supports the "historical result review" function, and synchronously uploads the obstacle type, confidence and processing time detected each time to the database, and generates a formatted inspection log. This realizes the visualization display, historical data management and inspection information recording of the obstacle detection result, forms a complete application process from detection inference to business management, and provides data support for the unmanned inspection system of the breeding base.

[0257] Taking the road pit detection of the breeding base as an application scene, combining Figure 2 , Figure 3 Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 and Figure 9 , the implementation process of the method of the application is described. The following area response, feature component and parameter are example values set for the running process of the method.

[0258] (1) input and feature extraction

[0259] A road image containing a pothole and surrounding road surface background is selected, the image is adjusted to 640x640 pixels according to the project configuration, and the normalization processing is completed according to step 1. After passing through the YOLOv13 backbone network, the third scale feature map P3, the fourth scale feature map P4 and the fifth scale feature map P5 are obtained, and the spatial sizes are 80x80, 40x40 and 20x20 respectively, corresponding to 1 / 8, 1 / 16 and 1 / 32 detection scales.

[0260] (2) Regional state analysis

[0261] As shown in Figure 3 , Figure 4 and Figure 5 , the above features are input into the passing domain continuity perception dynamic feature reconstruction network TDFR. Taking a certain position corresponding to the pothole in the third scale as an example, the example values of the road continuity degree, the edge change degree, the texture change degree and the cross-scale response change are 0.1, 0.1, 0.026667 and 0.8 respectively. According to step 2.2, the state response calculation and normalization processing are completed according to the preset weight. In this example, the state scores of structure change, response attenuation, background interference and normal region are 0, 1, 0 and 0.375 respectively. The response attenuation state score is the highest, so the position is determined as a response attenuation region, corresponding to state 2.

[0262] (3) Dynamic feature reconstruction

[0263] For the position of state 2, cross-scale feature compensation is performed according to step 2.3. Assuming that the current position input feature component is 0.2, the corresponding component of the adjacent scale feature after spatial and channel alignment is 1.0, and the cross-scale fusion coefficient is 0.5, then the reconstruction component is 0.5x0.2+0.5x1.0=0.6. This result introduces adjacent scale information into the current scale to supplement the feature expression of the position. The surrounding regions determined as background interference are suppressed according to the foregoing background weight formula. After the corresponding processing of each scale is completed, the third, fourth and fifth scale reconstruction feature maps P3', P4', P5' and the corresponding region state maps M3, M4, M5 are output. Among them, the reconstruction component of the selected position of the third scale is 0.6, and the state is 2, which is used for subsequent fusion.

[0264] (4) Region weight guided fusion

[0265] As shown in Figure 4 , the reconstruction features and region state maps are input into the region weight guided multi-scale feature fusion network RWMF, and the fusion weight is calculated according to the region state according to step 3. In this example, the selected pothole position is state 2, and the corresponding fusion weight is 0.75. The corresponding fourth scale reconstruction component is set to 1.0, the state is set to 2, the fifth scale reconstruction component is set to 1.4, which is used as an example input of the upper layer output; the listed components are reserved in each alignment. First, the fifth scale fusion component F5f = 1.4, and the fourth scale fusion component F4 is obtained by step-by-step weighted fusion f = 1.10 and the third scale fusion component F3 f = 0.725. Thus, the third scale reconstruction component 0.6 is further fused with the upper layer information to form a multi-scale input of the detection head.

[0266] (5) Detection result presentation

[0267] The fused features are input into the YOLOv13 detection head, and the class prediction, bounding box regression and Web end display are completed according to step 4. Figure 6 is the detection image detection result graph of the YOLOv13 network model in the embodiment of the present application. Figure 7 is the detection image detection result graph of the YOLOv13 network model in the embodiment of the present application. Figure 8 is the performance evaluation result graph of the improved YOLOv13 obstacle detection model after training in the embodiment of the present application. Figure 9 The pit detection frame and result list are displayed, wherein the pit confidence includes 0.77 and 0.71. The result storage and historical review follow step 4.3.

[0268] The present application provides a kind of based on improved YOLOv13's aquaculture base unmanned vehicle obstacle detection method, the method and approach for specifically realizing this technical solution are many, above-mentioned only is preferred embodiment of the present application, it should be pointed out, for the ordinary skilled person in the art, on the premise of not departing from the principle of the present application, can also make several improvements and refinements, these improvements and refinements also should be regarded as the protection scope of the present application. The components not explicitly described in the embodiment can be realized by existing technology.

Claims

1. A method for obstacle detection in unmanned vehicles at a livestock farm based on an improved YOLOv13, characterized in that, Includes the following steps: Step 1: Collect images of obstacles in the breeding base, construct a dataset, label the dataset, and then preprocess the images; Step 2: Input the preprocessed image into the YOLOv13 backbone network to extract multi-scale features. Based on the response differences between the target region and the background region in each scale feature, generate a region state map and dynamically reconstruct the multi-scale features according to the region feature weight map. Step 3: Based on the regional state map, determine the corresponding fusion weights for features at different scales, and perform weighted fusion of features at each scale according to the fusion weights to increase the proportion of target region features in the fusion result, reduce the influence of background region features on the fusion result, and obtain optimized multi-scale fusion features. Step 4: Input the optimized multi-scale fusion features into the YOLOv13 detection head to complete obstacle target localization and category recognition, output obstacle bounding boxes, category information and detection confidence, and use the detection results for obstacle recognition on the road in front of the autonomous vehicle.

2. The method according to claim 1, characterized in that, Step 1 includes the following steps: Step 1.1: Collect image data of the internal road environment of the breeding base using the forward-facing camera mounted on the unmanned inspection vehicle; Step 1.2: Based on the types of obstacles that the unmanned vehicle may encounter during the inspection process, define and label the targets in the image, label the bounding boxes of the targets, and obtain the corresponding category labels and location information; Step 1.3: Use the image annotation software LabelImg to annotate the image from the perspective of the autonomous vehicle; Step 1.4: Divide the labeled dataset into training set, validation set and test set according to a preset ratio. The training set is used for model parameter learning, the validation set is used for model tuning and performance evaluation, and the test set is used for final detection performance verification. Step 1.5: In the data preprocessing stage, the input images are sized and normalized, and data enhancement is performed in combination with the characteristics of the breeding base scene, including brightness adjustment, contrast change and color perturbation.

3. The method according to claim 2, characterized in that, In step 2, based on the original YOLOv13 network structure, a Continuous Perception Dynamic Feature Reconstruction Network (TDFR) is constructed between the backbone network and the feature fusion network to reconstruct the multi-scale features output by the backbone network. The TDFR is based on the small size of distant obstacles, complex background texture, and continuous changes in the passage area in the road scene of the breeding base. It comprehensively analyzes the continuous changes of the road, local edge changes, texture changes, and cross-scale responses in features at different scales, identifies the areas that need to be focused on, and adopts different feature reconstruction methods for different areas.

4. The method according to claim 3, characterized in that, Step 2 includes the following steps: Step 2.1, perform access area feature analysis: input the multi-scale features output by the YOLOv13 backbone network into the access area continuous perception dynamic feature reconstruction network TDFR; For the Layer output features First, regional response is extracted, and then edge response is obtained. Let the first Layer output features Represented as: , in Indicates the number of channels. and Let represent the height and width of the feature map, respectively, and R represent the real number space; For input features Perform lightweight convolution mapping to generate region response maps. : , in, For the region response mapping function, Use the Sigmoid activation function; Subsequently, the edge response map is extracted. : , in, For edge response extraction function; In obtaining the regional response map and edge response map Then, the degree of road continuity, edge variation, texture variation, and cross-scale response variation are calculated for each spatial location; To determine the continuity of the road, a local neighborhood is established along the direction of travel of the unmanned inspection vehicle. Calculate the difference between the current location and the average road response in the neighborhood: , in, This is the current spatial location; Indicates the first The degree of road continuity at spatial location p in the layer feature map; To determine the degree of edge change, a local neighborhood centered on the current location is established. Calculate the difference between the current location and the average edge response of the neighborhood: , in Indicates the first The degree of edge variation of the layer feature map at spatial location p; The degree of texture variation is calculated using the feature variance within the local neighborhood: , in, This represents the operation of local variance. Indicates the first The degree of texture variation in the layer feature map at spatial location p; Indicates the first The backbone network output feature map corresponding to each detection scale is in the local neighborhood. Internal space location The eigenvector at that location; For cross-scale response variations, the features at adjacent scales are first aligned using a scale mapping function: , in, For channel mapping functions, This is an upsampling operation; Indicates the first The degree of cross-scale response variation of the layer feature map at spatial location p; No. Each spatial location of the layer feature map is obtained with corresponding , , as well as The four types of area information are then input into step 2.2 to determine the area status; Step 2.2, using the road continuity obtained in Step 2.1 Degree of edge change Degree of texture variation and cross-scale response changes , for the The mean and standard deviation of the four types of regions in the layer were calculated respectively: , , in, , Indicates the first Class region information, where k ranges from 1 to 4; This represents the mean of the k-th type of information in the i-th layer. represents the standard deviation of the k-th class region information in the i-th layer; Mean represents the function for calculating the mean, and Std represents the function for calculating the standard deviation. Determine the corresponding judgment threshold based on the statistical results at the current scale: , in, This is the scaling adjustment coefficient; The threshold for determining the k-th type of region information in the i-th layer; The regional state response corresponding to the current location is calculated based on four types of regional information: structural change region, response attenuation region, background interference region, and normal region, respectively. , , and ; State response of structural change region for: , in, , , As weight; , , and They represent the first The thresholds for determining the degree of road continuity, edge variation, texture variation, and cross-scale response variation at each detection scale; State response in the response decay region for: , State response of background interference area for: , Locations that do not meet the three types of state conditions—structural change region, response attenuation region, and background interference region—are defined as normal regions, and their state responses are... for: , Where Norm represents the normalization operation; Take the state corresponding to the maximum response as the final region state at the current location: , Finally, the number was obtained Region state map corresponding to layer feature map : ; in, Indicates the first A state map of the region corresponding to each detection scale; Indicates the first Spatial location in the feature map of each detection scale; Indicates the first The set of all spatial locations of feature maps at each detection scale; Indicates the first Each detection scale in spatial location The state of the area; Step 2.3, using the region state map obtained in Step 2.2 The corresponding feature reconstruction method is selected based on the regional state of each spatial location; let the first... The layer input feature map is: , The regional status diagram is as follows: , in, These represent the structural change region, the response attenuation region, the background interference region, and the normal region, respectively. This represents the state of the region corresponding to the i-th detection scale position p; when At that time, local neighborhood features are reconstructed for the current position, using the current position as the basis for the reconstruction. Establish local neighborhood Calculate the neighborhood reconstruction weights based on the current location features and neighborhood features. : , Where G is the neighborhood correlation function and exp is the natural exponential function; Represents local neighborhood The neighborhood location in Indicates the first Each detection scale feature map in the neighborhood location The eigenvector at that location; Represents local neighborhood The spatial location used for weight normalization summation Indicates the first Each detection scale feature map at location The eigenvector at that location; Reconstructing local features based on neighborhood weights: , in Indicates spatial location Local neighborhood reconstruction features at the location; when At that time, cross-scale feature compensation is performed on the current position, assuming the current scale feature is... Adjacent scale features are First, spatial dimensions and channel dimensions are aligned using a scale alignment function: , in, Represents the scale alignment function; Indicates the first The feature map obtained by scale alignment of each detection scale feature; Subsequently, the cross-scale fusion coefficients at the current location are calculated. : , in, Indicates the first Each detection scale is at its current location. Cross-scale fusion coefficient at the location; , and These are learnable parameters; Indicates the learnable bias parameter; Based on cross-scale fusion coefficient Complete cross-scale feature reconstruction: , in Indicates spatial location Cross-scale reconstruction features at the location; when At that time, let the input feature at the current position be... Based on the degree of texture change at the current location Calculate background region weights : ; in, This is a bias term used to adjust... Input offset of the function mapping; Background features are reconstructed based on background region weights: , in Indicates spatial location Background reconstruction features at the location; when At the same time, the original features of the current position remain unchanged: ,in, This represents the output features after reconstruction of the normal region; Select the corresponding reconstruction result for each spatial location to obtain the final output features at the current scale: , in, Indicates the first Each detection scale in spatial location The final reconstructed features at the location; No. The reconstructed output feature map corresponding to each detection scale for: ; The above dynamic feature reconstruction is performed on each of the three detection scales to obtain multi-scale output features: ,in, , and These represent the reconstructed output feature maps corresponding to the 3rd, 4th, and 5th detection scales, respectively, and correspond to the YOLOv13 network. and Feature layer.

5. The method according to claim 4, characterized in that, In step 3, after completing the reconstruction of the dynamic features of continuous perception in the passage domain in step 2, the reconstructed features at three detection scales are obtained. and and the corresponding regional status diagram , and The reconstructed features and regional state information are input into the regional weights to guide the multi-scale feature fusion network RWMF, which dynamically fuses features at different detection scales.

6. The method according to claim 5, characterized in that, Step 3 includes the following steps: Step 3.1, Multi-scale feature input; First, obtain the three detection scale reconstructed features output from Step 2: , and And the corresponding area status diagram: , and ; Before performing multi-scale fusion, high-level features are first upsampled to ensure that features at adjacent scales have consistent spatial resolution. set up and Let represent two adjacent detection scales respectively, then we have: ; in, Indicates an upsampling operation. Represents the reconstruction of feature maps Feature map obtained after upsampling; After scale alignment is completed, the reconstructed features at each scale and the corresponding regional feature weight maps are used as inputs to the region weight-guided multi-scale feature fusion network RWMF. Step 3.2, based on the region state map obtained in Step 2 Determine the region status to which the current location belongs, and calculate the fusion weight of the current location accordingly; Calculate the fusion weight based on the regional feature weight map. : ; in, [0,1] represents the weight of the current location and current scale features in the fusion result; The weight mapping parameters represent the region state. This represents the bias parameter in the calculation of the fusion weights; Step 3.3, Dynamic Weighted Fusion; After calculating the fusion weights, feature fusion is performed step by step from high to low according to the detection scale; First, retain the highest-level reconstruction features. ,get: ;in, This represents the fused feature map corresponding to a detection scale of 1 / 32; Reconstructing feature maps After upsampling, we get: ;in, Indicates and Upsampled features with consistent feature map spatial dimensions and channel dimensions; Upsampled feature map With reconstructed feature maps After weighted fusion, we get: , in, Indicates the spatial location of the 1 / 16 detection scale. Fusion characteristics at the location; Indicates the spatial location of the 1 / 16 detection scale. The fusion weight at the location; Represents the reconstructed feature map In spatial location Features of the location; (p) represents the upsampled feature map. In spatial location Features of the location; For fused feature maps After upsampling, we get: ,in, Represents the fused feature map Feature map obtained after upsampling; Upsampled feature map With reconstructed feature maps After weighted fusion, we get: , in, This indicates the spatial location of the 1 / 8 detection scale. Fusion characteristics at the location; This indicates the spatial location of the 1 / 8 detection scale. The fusion weight at the location; Represents the reconstructed feature map In spatial location Features of the location; Represents upsampled feature map In spatial location Features of the location; Through the above-described step-by-step fusion method, features at different detection scales are dynamically combined; Step 3.4, merge and output.

7. The method according to claim 6, characterized in that, Step 3.4 includes: After completing the stepwise feature fusion, the fused features corresponding to the three detection scales are obtained: , in, This represents the multi-scale fusion feature set corresponding to the three detection scales; , and These represent the fused feature maps corresponding to detection scales of 1 / 8, 1 / 16, and 1 / 32, respectively. The fused multi-scale features Input the YOLOv13 detection head and perform target category prediction and bounding box regression at different detection scales to obtain the detection results of road obstacles.

8. The method according to claim 7, characterized in that, Step 4 includes the following steps: Step 4.1: Train the model on the training set. During the training process, evaluate the model performance using the validation set and adjust the model training process based on the evaluation results to obtain the trained obstacle detection model. Step 4.2: Input the test set images or the real-time video stream of the breeding base environment collected by the camera of the unmanned inspection vehicle into the trained obstacle detection model to complete inference and real-time detection; Step 4.3, Post-processing of results and Web visualization: Integrate the detection results with the web management interface.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 8.

10. A storage medium, characterized in that, It stores a computer program or instructions that, when run on a computer, perform the steps of the method as described in any one of claims 1 to 8.