A two-stage road surface pit identification method based on feature fusion improved YOLOv26
By improving the two-stage road pothole recognition method of YOLOv26, and utilizing feature fusion and gradient reweighting, the problems of missed detection and false detection of small targets in road pothole detection are solved, achieving high accuracy and stable detection results, which are suitable for road maintenance and vehicle inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANTONG UNIV
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies for detecting road potholes suffer from problems such as missed detection of small targets, false detection of similar textures, and inaccurate localization. In particular, the YOLO algorithm is difficult to meet the engineering requirements of fewer missed detections, fewer false detections, and accurate localization in complex backgrounds.
We adopt a two-stage detection method based on feature fusion to improve YOLOv26. By constructing multi-scale feature fusion and feature fusion-guided gradient reweighting, we enhance the complementarity between shallow details and deep semantics, thereby improving the separability of small targets and weakly textured targets and the training stability.
It significantly improves the accuracy and usability of road pothole detection, reduces the false detection rate and missed detection rate, and enhances the robustness of detection and the stability of engineering deployment, making it suitable for practical applications such as vehicle-mounted inspection.
Smart Images

Figure CN122176502A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of road maintenance and intelligent highway inspection technology, and in particular to a two-stage road surface pothole recognition method based on feature fusion-based improved YOLOv26. Background Technology
[0002] Potholes in road surfaces, as a typical sudden-onset defect, are characterized by their small scale, irregular shape, blurred edges, and susceptibility to interference from complex backgrounds such as changes in lighting, shadows, water reflections, and repair marks. Existing manual inspections are inefficient and highly subjective, traditional image processing methods are sensitive to the environment and have weak generalization ability, while current deep learning detection still generally suffers from problems such as missed detection of small targets, false detection of similar textures, and inaccurate localization in real road scenes.
[0003] YOLO (You Only Look Once), as a representative single-stage object detection algorithm, has the advantages of fast inference speed and convenient deployment. However, under the multiple downsampling and single-stage discrimination mechanism, it is insufficient in representing the details of small objects with weak texture, such as potholes. Moreover, it is easily affected by sample imbalance and hard examples during training, which leads to false detections of highly similar backgrounds such as shadows, patches, and manhole covers on the road surface. It is difficult to meet the engineering requirements of "few false positives + few missed detections + accurate localization" at the same time.
[0004] To address the aforementioned issues, this application proposes a two-stage road surface pothole recognition method based on feature fusion-based improvements to YOLOv26. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing a two-stage road surface pothole recognition method based on feature fusion improvement of YOLOv26. This method enhances the complementarity between shallow details and deep semantics by constructing multi-scale feature fusion in the improved YOLOv26. Furthermore, it proposes a gradient reweighting method guided by feature fusion, which dynamically reweights the training gradient using fused features. This method highlights key pothole regions and difficult examples, while suppressing invalid and noisy gradients from easily confused backgrounds, thereby improving the separability of small targets and weakly textured targets and the stability of training.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26, comprising the following steps: Step 1: Task definition and overall framework; Given a road scene image I, the goal is to detect potholes and output a final set of detection boxes D, including: 1) In the first stage, a detector is used to generate candidate boxes (including confidence scores); 2) In the second stage, the candidate bounding boxes (ROIs) are classified into binary categories based on the gradient reweighting method guided by feature fusion, and then fused with the detector confidence to obtain a more reliable detection result. Step 2: Detect candidate bounding box generation; YOLOv26 adopts an end-to-end object detection paradigm. The model directly outputs a set of candidate boxes and their class confidence scores. The resolution of duplicate boxes is mainly completed in the training matching and network structure. Therefore, explicit NMS is no longer needed in the inference stage. Here, only confidence threshold filtering and (optional) Top-K truncation are performed at the inference stage to control the output size. Step 3: ROI Construction and Classification; Step 4: Feature fusion mechanism; Step 5: Consistency constraints; Step 6: Gradient reweighting guided by feature fusion; Step 7: Inference Stage: Confidence Fusion and Candidate Filtering.
[0007] Preferably, step 2 includes the following method: Let the model output candidate set be: ; Where B: the set of candidate boxes output by the detector, and N: the number of candidate boxes. : Position parameters of the i-th candidate box (center point coordinates and width and height, this representation is consistent throughout the text). : Confidence (or category score) of the i-th candidate box : The category label of the i-th candidate box (which can be "pit / non-pit" or just "pit").
[0008] Given a confidence threshold The screening results are as follows: ; in Confidence threshold : The candidate set after threshold filtering.
[0009] If it is necessary to further limit the number of outputs, then take the top K candidates with the highest scores: ; Where K: the maximum number of candidates to retain. :according to Sort the operators from highest to lowest and select the top K. : The candidate set after Top-K truncation.
[0010] If using the softmax multi-class form, it can be written as: ; in Number of categories The class probabilities obtained from softmax.
[0011] Candidate boxes are constrained by NMS during the detection phase, and the candidate set after NMS output is still B.
[0012] Preferably, step 3 includes the following method: 3.1 ROI Pruning and Normalization For each candidate box Cropping ROI from an image: ; in Input a road scene image. : The i-th candidate box, : The ROI obtained by cropping I according to b_i, Crop(·): the cropping operator.
[0013] And perform scalar normalization to a fixed size.
[0014] ; Where S: Normalized target size of ROI, =Resize(R_i,S×S): Scales the ROI to a fixed size. Resize(·): Scales the interpolation operator (such as bilinear interpolation).
[0015] 3.2 ROI Classifier Structure Features are extracted using the ResNet backbone and binary classification is performed, including pit and non-pit classification. The feature extractor and classification head are defined as follows: ; in ROI Feature Extractor : Feature vector of the i-th ROI, W: Classification head (e.g., fully connected / MLP), parameter φ, : The binary logit for the i-th ROI, : The Sigmoid function. : The probability that the i-th ROI is identified as a "pit".
[0016] 3.3 ROI Monitoring Signal and Basic Loss Binary category tags: ; : The true label of the i-th ROI; =1 indicates a pit or groove. =0 indicates no pit or groove.
[0017] Binary cross-entropy (BCE) loss: ; In step 4, to enhance the robustness of classification, a feature fusion based on multi-source information is proposed. For each ROI, m anchor features are constructed: ; The number of anchor features constructed for each ROI. : The j-th anchor feature of the i-th ROI (from different scales / layers or different enhancement perspectives), d: Feature dimension.
[0018] and use weight vector To integrate: ; Feature fusion weight vector ≥0 and Weight constraints ; Specifically, the following methods are included: 4.1 Weight Calculation Define query vector With anchor vector : ; Query vector (which can be derived from...) (obtained by linear transformation) : The key vector of the j-th anchor point (which can be obtained by linear transformation).
[0019] Similarity can be calculated using either the dot product or cosine similarity. or ; Weights are normalized using softmax: ; in This is a temperature coefficient used to control the sharpness of the weight distribution.
[0020] 4.2 Classification Output Based on Feature Fusion Features are fused into the same classifier to achieve fusion. : ; Binary classification logit with fused features. : The probability of pits and grooves corresponding to the fused features.
[0021] Preferably, step 5 includes the following methods: To ensure consistency between the fused prediction and the predictions of each anchor point, a consistency loss is introduced for each anchor point: ; : The predicted probability of the i-th ROI at the j-th anchor point.
[0022] : Fusion prediction probability.
[0023] Consistency loss is calculated using MSE, and KL can be written: ; MSE consistency loss ; KL(·||·): Kullback–Leibler divergence (if KL is used, firstly, the specific expansion of the binary KL must be clearly defined, and secondly, it must be given as either or both of the KL and MSE).
[0024] Preferably, step 6 includes the following methods: 6.1 Gradient Form from a Fusion Perspective The training gradients are adaptively reweighted using the fused output, so that the model pays more attention to more reliable / consistent gradient contributions. Fusion BCE loss for ROI: ; For a single anchor point BCE: ; 6.2 Construction of reweighted coefficients Define the error driving term for each sample at anchor point j, with gradient scaling as the core: ; in : The gradient scale of the i-th sample at anchor point j Error-driven term; Construct FGGR reweighted coefficients to avoid division by zero. : ; FGGR is the reweighting coefficient constructed for anchor point j. >0: Numerical stable term, avoid division by zero.
[0025] To prevent extreme weights from causing training instability, Perform truncation and smoothing: ; And normalize it: ; clip(·): Truncation operator. : The cutoff range of the reweighted coefficients, β: the smoothing coefficient (such as the parameter used for EMA smoothing or power function mildening).
[0026] 6.3 Weighted Training Objectives Ultimately, FGGR expresses the total loss as a reweighted combination of anchor losses: ; :FGGR weighted anchor point loss; in ; Consistency loss weighting coefficient; Total loss after adding the consistency term: ; The baseline CE for the comparative experiment is as follows: ; Preferably, step 7 includes the following methods: During inference, for each candidate box ; and at the same time, the detection confidence level is obtained. With classification confidence Define the fusion score: Option A, weighted fusion: ; The candidate confidence scores output by the first-stage detector. The confidence score output by the ROI classifier in the second stage. : The final confidence level after fusion.
[0027] Option B, product fusion: ; : Weighted fusion coefficient.
[0028] Option C, Threshold Gating + Fusion: ; ;
[0029] , : Detection / classification threshold.
[0030] Final filtering rules: ; D: Final refined box set (output filtered).
[0031] By adopting the above technical solutions, multi-scale feature fusion is constructed in the improved YOLOv26 to enhance the complementarity between shallow details and deep semantics. A gradient reweighting method guided by feature fusion is proposed, which uses fused features to dynamically reweight the training gradient, highlighting the key regions of pits and grooves and learning difficult examples, and suppressing invalid gradients and noise gradients of easily confused backgrounds, thereby improving the separability of small targets and weak texture targets and the training stability.
[0032] This includes: The first stage is based on the improved YOLOv26 to achieve high recall of road pothole candidate region detection. Unlike the traditional YOLO series, which relies on non-maximum suppression (NMS) during the inference stage, YOLOv26 adopts an end-to-end object detection paradigm. The model directly outputs a set of candidate boxes and their class confidence. The resolution of duplicate boxes is mainly completed in the training matching and network structure. Therefore, explicit NMS is no longer needed in the inference stage.
[0033] The second stage re-discriminates and refines the candidate regions for road potholes, proposing a gradient reweighting strategy guided by feature fusion: by utilizing the fusion information of candidate box confidence and ROI classification output, gradient weights are adaptively assigned to each sample, thereby making training more focused on samples that are "easy to misdetect / have blurred boundaries / are highly confusing", improving the kernel's ability to distinguish between interfering backgrounds and similar textures. Ultimately, this significantly reduces false negatives and false positives and improves localization accuracy in complex road pothole scenarios, enhancing the robustness and deployability of the method in practical applications such as vehicle inspection.
[0034] Compared with the prior art, the present invention has the following beneficial effects: 1. Compared with traditional single-stage road pothole detection methods (relying solely on detector output), this invention achieves significant improvements in accuracy and usability through a two-stage detection process of "YOLOv26 candidate box generation + ROI verification and filtering": Under the same test set and consistent evaluation criteria, the baseline precision of YOLOv26 is 0.631. After introducing FGGR verification, the precision of this invention increases to 0.7636, an improvement of approximately +13.26 percentage points (approximately +21.0% relative improvement); at the same time, mAP50–95 increases from 0.2287 to 0.2858 (approximately +0.0571, +25.0% relative improvement), indicating that this invention has a stronger ability to suppress false detections under complex road textures (repair marks, cracks, manhole covers, water reflection, shadows), and the output results are more suitable for subsequent maintenance decisions and work order closure, significantly reducing the probability of "invalid work orders / repeated checks caused by false detections".
[0035] 2. Compared with the traditional approach of "only performing confidence threshold truncation / simple rule filtering", this invention adopts a structural improvement based on feature fusion-guided gradient reweighting (FGGR) and ROI classification review, enabling the system to shift its learning focus from easy samples to difficult road surface samples and conflict samples, improving the stability of the discrimination boundary for "potholes-similar backgrounds". This significantly improves the overall performance while maintaining detection recall. For example, the AP50 of this invention reaches 0.594 under the FGGR review configuration, which is higher than the YOLOv26 baseline of 0.5529 (approximately +0.0411, a relative improvement of +7.4%). This shows that this invention not only reduces false alarms but also achieves simultaneous benefits in localization quality and detection consistency. This improvement comes from the adaptive adjustment mechanism of FGGR on gradient contribution, which can suppress background texture noise gradient-dominated updates and enhance the effective learning of difficult road surface samples. From a structural mechanism perspective, this invention solves the defects of traditional training, such as "easy samples of road surface potholes and backgrounds submerging difficult samples and high-confidence false positives being difficult to correct".
[0036] 3. Compared with traditional detection systems that require complex post-processing links, this invention, based on the end-to-end prediction feature of YOLOv26 (inference phase does not rely on explicit NMS) and a two-stage decoupled design, improves efficiency and engineering deployment stability: the first stage quickly generates candidate boxes, and the second stage only performs cropping / alignment and lightweight verification on candidate ROIs, avoiding secondary intensive inference across the entire map. This reduces post-processing dependencies and link coupling in engineering implementation, lowering deployment complexity and runtime jitter risk. At the same time, through the division of labor between the two stages of "high recall candidate - high precision verification", more stable and usable results can be obtained with a lower invalid output rate in road inspection scenarios, indirectly reducing the cost of manual verification, invalid dispatching, and repeated inspections, demonstrating significant engineering efficiency advantages and application value. Attached Figure Description
[0037] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a schematic diagram of the YOLOv26 network structure in this invention; Figure 3 This is a schematic diagram of the ROI classifier process in this invention; Figure 4 shows the threshold scanning performance heatmap in this invention; where (a) CE grid search F1 heatmap; (b) FGGR grid search F1 heatmap; (c) CE grid search Precision heatmap; (d) FGGR grid search Precision heatmap; (e) CE grid search Recall heatmap; (f) FGGR grid search Recall heatmap; Figure 5 This is a comparative example of typical road surface pothole detection results in this invention; Figure 6 This is a comparison chart of false detection suppression of typical road potholes in this invention. Detailed Implementation
[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the scope of protection of the present invention. The embodiments described in this invention are only some embodiments of the present invention, 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. Example
[0039] This invention validates its performance on the publicly available dataset RDD2020. The main components include: image input, YOLO candidate box generation, ROI cropping / alignment, ROI classification using a gradient reweighting method guided by feature fusion, confidence fusion decision-making, and outputting refined boxes. The core of this invention lies in: the first stage using a YOLOv26 object detector to quickly generate candidate pit / groove boxes across the entire image; the second stage using an ROI verifier to verify the authenticity of local images of the candidate boxes and filtering false detections using a confidence fusion strategy. Simultaneously, a gradient reweighting mechanism guided by feature fusion is introduced during the ROI verification training stage, assigning higher gradient contributions to critical hard samples and conflicting samples to improve the stability of the verification decision.
[0040] The process is as follows Figure 1 As shown, it includes: image input, YOLO candidate box generation, ROI cropping / alignment, ROI classification using gradient reweighting guided by feature fusion, confidence fusion decision and output refined box.
[0041] A two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26 includes the following steps: Step 1: Task definition and overall framework; Given a road scene image I, the goal is to detect potholes and output a final set of detection boxes D, including: 1) In the first stage, a detector is used to generate candidate boxes (including confidence scores); 2) In the second stage, the candidate bounding boxes (ROIs) are classified into binary categories based on the gradient reweighting method guided by feature fusion, and then fused with the detector confidence to obtain a more reliable detection result. Step 2: Detect candidate bounding box generation; Unlike traditional YOLO models that rely on non-maximum suppression (NMS) during inference, YOLOv26 employs an end-to-end object detection paradigm. The model directly outputs a set of candidate boxes and their class confidence scores. The resolution of duplicate boxes is mainly completed during training matching and network structure, so explicit NMS is no longer needed during inference. Here, only confidence thresholding and (optional) Top-K truncation are performed at the inference stage to control the output size. Step 3: ROI Construction and Classification; Step 4: Feature fusion mechanism; Step 5: Consistency constraints; Step 6: Gradient reweighting guided by feature fusion; Step 7: Inference Stage: Confidence Fusion and Candidate Filtering.
[0042] Specifically, step 2 includes the following methods: Let the model output candidate set be: ; Where B: the set of candidate boxes output by the detector, and N: the number of candidate boxes. =: Position parameters of the i-th candidate box (center point coordinates and width and height, this representation is consistent throughout the text). : Confidence (or category score) of the i-th candidate box : The category label of the i-th candidate box (in this task, it can be "pit / non-pit" or only "pit"); Given a confidence threshold The screening results are as follows: ; in Confidence threshold : The candidate set after threshold filtering.
[0043] If it is necessary to further limit the number of outputs, then take the top K candidates with the highest scores: ; Where K: the maximum number of candidates to retain. :according to Sort the operators from highest to lowest and select the top K. The candidate set after Top-K truncation.
[0044] If using the softmax multi-class form, it can be written as: ; in Number of categories The class probabilities obtained from softmax.
[0045] Candidate boxes are constrained by NMS during the detection phase, and the candidate set after NMS output is still B.
[0046] Specifically, step 3 includes the following methods: 3.1 ROI Pruning and Normalization For each candidate box Cropping ROI from an image: ; in Input a road scene image. : The i-th candidate box, : The ROI obtained by cropping I according to b_i, Crop(·): the cropping operator.
[0047] And perform scalar normalization to a fixed size.
[0048] ; Where S: Normalized target size of ROI, =Resize(R_i,S×S): Scales the ROI to a fixed size. Resize(·): Scales the interpolation operator (such as bilinear interpolation).
[0049] 3.2 ROI Classifier Structure Features are extracted using the ResNet backbone and binary classification is performed, including pit and non-pit classification. The feature extractor and classification head are defined as follows: ; in ROI Feature Extractor : Feature vector of the i-th ROI, W: Classification head (e.g., fully connected / MLP), parameter φ, : The binary logit for the i-th ROI, The Sigmoid function. : The probability that the i-th ROI is identified as a "pit".
[0050] 3.3 ROI Monitoring Signal and Basic Loss Binary category tags: ; : The true label of the i-th ROI; =1 indicates a pit or groove. =0 indicates no pit or groove.
[0051] Binary cross-entropy (BCE) loss: ; Specifically, in step 4, to enhance the robustness of classification, a feature fusion based on multi-source information is proposed. For each ROI, m anchor features are constructed: ; The number of anchor features constructed for each ROI. : The j-th anchor feature of the i-th ROI (from different scales / layers or different enhancement perspectives), d: Feature dimension.
[0052] and use weight vector ; To integrate: ; Feature fusion weight vector ≥0 and Weight constraints ; Specifically, the following methods are included: 4.1 Weight Calculation Define query vector With anchor vector : ; Query vector (which can be derived from...) (obtained by linear transformation) : The key vector of the j-th anchor point (which can be obtained by linear transformation).
[0053] Similarity can be calculated using either the dot product or cosine similarity. or ; Weights are normalized using softmax: ; in This is a temperature coefficient used to control the sharpness of the weight distribution.
[0054] 4.2 Classification Output Based on Feature Fusion Features are fused into the same classifier to achieve fusion. : ; Binary classification logit with fused features. : The probability of pits and grooves corresponding to the fused features.
[0055] Specifically, step 5 includes the following methods: To ensure consistency between the fused prediction and the predictions of each anchor point, a consistency loss is introduced for each anchor point: ; : The predicted probability of the i-th ROI at the j-th anchor point : Fusion prediction probability.
[0056] Consistency loss is calculated using MSE, and KL can be written: ; MSE consistency loss ; KL(·||·): Kullback–Leibler divergence (if KL is used, firstly, the specific expansion of the binary KL must be clearly defined, and secondly, it must be given as either or both of the KL and MSE).
[0057] Specifically, step 6 includes the following methods: 6.1 Gradient Form from a Fusion Perspective The training gradients are adaptively reweighted using the fused output, so that the model pays more attention to more reliable / consistent gradient contributions. Fusion BCE loss for ROI: ; For a single anchor point BCE: ; 6.2 Construction of reweighted coefficients Define the error driving term for each sample at anchor point j, with gradient scaling as the core: ; ; in : The gradient scale of the i-th sample at anchor point j Error-driven term; Construct FGGR reweighted coefficients to avoid division by zero. :
[0058] ; FGGR is the reweighting coefficient constructed for anchor point j. >0: Numerical stable term, avoid division by zero.
[0059] To prevent extreme weights from causing training instability, Perform truncation and smoothing: ; And normalize it:
[0060] clip(·): Truncation operator. : The cutoff range of the reweighted coefficients, β: the smoothing coefficient (such as the parameter used for EMA smoothing or power function mildening).
[0061] 6.3 Weighted Training Objectives Ultimately, FGGR expresses the total loss as a reweighted combination of anchor losses: ; :FGGR weighted anchor point loss; in ; Consistency loss weighting coefficient; Total loss after adding the consistency term: ; The baseline CE for the comparative experiment is as follows: ; Specifically, step 7 includes the following methods: During inference, for each candidate box At the same time, the detection confidence level is obtained. With classification confidence Define the fusion score: Option A, weighted fusion: ; The candidate confidence scores output by the first-stage detector. The confidence score output by the ROI classifier in the second stage. : The final confidence level after fusion.
[0062] Option B, product fusion: ; : Weighted fusion coefficient.
[0063] Option C, Threshold Gating + Fusion: ; , : Detection / classification threshold.
[0064] Final filtering rules: ; D: Final refined box set (output filtered).
[0065] In summary, this invention leverages the end-to-end prediction capabilities of YOLOv26 (inference phase does not rely on explicit NMS) and a two-stage decoupled design to improve efficiency and deployment stability: the first stage rapidly generates candidate boxes, while the second stage only performs cropping / alignment and lightweight verification on candidate ROIs, avoiding secondary intensive inference across the entire graph. This reduces post-processing dependencies and link coupling in engineering implementation, lowering deployment complexity and runtime jitter risks. Furthermore, the two-stage division of labor—"high-recall candidate—high-precision verification"—enables more stable, usable results with a lower invalid output rate in road inspection scenarios, indirectly reducing manpower verification costs, invalid dispatch costs, and repetitive inspection costs, demonstrating significant engineering efficiency advantages and application value.
[0066] The descriptions and practices disclosed in this invention are readily apparent and understandable to those skilled in the art, and various modifications and refinements can be made without departing from the principles of this invention. Therefore, any modifications or improvements made without departing from the spirit of this invention should also be considered within the scope of protection of this invention.
Claims
1. A two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26, characterized in that, Includes the following steps: Step 1: Task definition and overall framework; Given a road scene image I, the goal is to detect potholes and output a final set of detection boxes D, including: 1) In the first stage, a detector is used to generate candidate boxes; 2) In the second stage, the candidate bounding boxes (ROIs) are classified into binary categories based on the gradient reweighting method guided by feature fusion, and then fused with the detector confidence to obtain a more reliable detection result. Step 2: Detect candidate bounding box generation; YOLOv26 adopts an end-to-end object detection paradigm. The model directly outputs a set of candidate boxes and their class confidence scores. The resolution of duplicate boxes is completed in the training matching and network structure, so explicit NMS is no longer needed in the inference stage. Here, only confidence threshold filtering and Top-K truncation are performed at the inference stage to control the output size. Step 3: ROI Construction and Classification; Step 4: Feature fusion mechanism; Step 5: Consistency constraints; Step 6: Gradient reweighting guided by feature fusion; Step 7: Inference Stage: Confidence Fusion and Candidate Filtering.
2. The two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26 according to claim 1, characterized in that, Step 2 includes the following methods: Let the model output candidate set be: ; Where B: the set of candidate boxes output by the detector, and N: the number of candidate boxes. : The position parameter of the i-th candidate box : Confidence of the i-th candidate box : The category label of the i-th candidate box; given the confidence threshold The screening results are as follows: ; in Confidence threshold The candidate set after threshold filtering; If it is necessary to further limit the number of outputs, then take the top K candidates with the highest scores: ; Where K: the maximum number of candidates to retain. :according to Sort the operators from highest to lowest and select the top K. The candidate set after Top-K truncation; If using the softmax multi-class form, it can be written as: ; in Number of categories The class probabilities obtained from softmax; Candidate boxes are constrained by NMS during the detection phase, and the candidate set after NMS output is still B.
3. The two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26 according to claim 1, characterized in that, Step 3 includes the following methods: 3.1 ROI Pruning and Normalization For each candidate box Cropping ROI from an image: ; in Input a road scene image. : The i-th candidate box, : The ROI obtained by cropping I according to b_i, Crop(·): the cropping operator; And perform scalar normalization to a fixed size. ; ; Where S: Normalized target size of ROI, =Resize(R_i,S×S): Scales the ROI to a fixed size; Resize(·): Scale interpolation operator; 3.2 ROI Classifier Structure Features are extracted using the ResNet backbone and binary classification is performed, including pit and non-pit classification. The feature extractor and classification head are defined as follows: ; in ROI Feature Extractor : Feature vector of the i-th ROI, W: Classifier head, parameter φ, : The binary logit for the i-th ROI, The Sigmoid function. The probability that the i-th ROI is identified as a pit. 3.3 ROI Monitoring Signal and Basic Loss Binary category tags: ; : The true label of the i-th ROI; =1 indicates a pit or groove. =0 indicates no pit or groove; Binary cross-entropy (BCE) loss: .
4. The two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26 according to claim 1, characterized in that, In step 4, to enhance the robustness of classification, a feature fusion based on multi-source information is proposed. For each ROI, m anchor features are constructed: ; The number of anchor features constructed for each ROI. d: Feature of the j-th anchor point of the i-th ROI; and use weight vector To integrate: ; Feature fusion weight vector ≥0 and Weight constraints; Specifically, the following methods are included: ; 4.1 Weight Calculation Define query vector With anchor vector : ; Query vector, The key vector of the j-th anchor point; Similarity can be calculated using either the dot product or cosine similarity. or ; Weights are normalized using softmax: ; in This is a temperature coefficient used to control the sharpness of the weight distribution; 4.2 Classification Output Based on Feature Fusion Features are fused into the same classifier to achieve fusion. : ; Binary classification logit with fused features. : The probability of pits and grooves corresponding to the fused features.
5. The two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26 according to claim 1, characterized in that, Step 5 includes the following methods: To ensure consistency between the fused prediction and the predictions of each anchor point, a consistency loss is introduced for each anchor point: ; : The predicted probability of the i-th ROI at the j-th anchor point : Fusion prediction probability; Consistency loss is calculated using MSE, and KL can be written: ; MSE Consistency Loss ; KL(·||·): Kullback–Leibler divergence.
6. The two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26 according to claim 1, characterized in that, In step 6, Including the following methods: 6.1 Gradient Form from a Fusion Perspective The training gradients are adaptively reweighted using the fused output, so that the model pays more attention to more reliable / consistent gradient contributions. Fusion BCE loss for ROI: ; For a single anchor point BCE: ; 6.2 Construction of reweighted coefficients Define the error driving term for each sample at anchor point j, with gradient scaling as the core: ; in : The gradient scale of the i-th sample at anchor point j Error-driven term; Construct FGGR reweighted coefficients to avoid division by zero. : ; FGGR is the reweighting coefficient constructed for anchor point j. >0: Numerically stable terms, avoid division by zero; To prevent extreme weights from causing training instability, Perform truncation and smoothing: ; And normalize it: ; clip(·): Truncation operator. : Cutoff range of reweighted coefficients, β: Smoothing coefficient; 6.3 Weighted Training Objective Finally, FGGR writes the total loss as a reweighted combination of the anchor losses: ; :FGGR weighted anchor point loss; in ; Consistency loss weighting coefficient; Total loss after adding the consistency term: ; The baseline CE for the comparative experiment is as follows: 。 7. The two-stage road surface pothole recognition method based on feature fusion and improved YOLOv26 according to claim 1, characterized in that, Step 7 includes the following methods: During inference, for each candidate box At the same time, the detection confidence level is obtained. With classification confidence Define the fusion score: Option A, weighted fusion: ; The candidate confidence scores output by the first-stage detector. The confidence score output by the ROI classifier in the second stage. : The final confidence level after fusion; Option B, product fusion: ; Weighted fusion coefficient; Option C, Threshold Gating + Fusion: ; Detection / classification threshold; Final filtering rules: ; D: Final refined box set.