Differentiable NMS via Sinkhorn Matching for End-to-End Fabric Defect Detection
Zhengyang Lu, Bingjie Lu, Weifan Wang, Feng Wang
TL;DR
This work tackles fabric defect detection by removing the non-differentiable bottleneck of traditional NMS and enabling end-to-end optimization. It introduces differentiable NMS via Sinkhorn-Knopp as a differentiable bipartite matching between proposals and latent defect regions, complemented by an entropy-constrained mask refinement implemented with Frank–Wolfe and a Total Variation regularizer. The approach yields significant gains on the Tianchi fabric dataset (e.g., mAP improvements and real-time inference) while remaining architecture-agnostic and generalizable to general object detection, as evidenced by competitive COCO results. The framework provides theoretical convergence guarantees for both Sinkhorn matching and entropy refinement, supporting robust gradient flow and stable training for industrial deployment.
Abstract
Fabric defect detection confronts two fundamental challenges. First, conventional non-maximum suppression disrupts gradient flow, which hinders genuine end-to-end learning. Second, acquiring pixel-level annotations at industrial scale is prohibitively costly. Addressing these limitations, we propose a differentiable NMS framework for fabric defect detection that achieves superior localization precision through end-to-end optimization. We reformulate NMS as a differentiable bipartite matching problem solved through the Sinkhorn-Knopp algorithm, maintaining uninterrupted gradient flow throughout the network. This approach specifically targets the irregular morphologies and ambiguous boundaries of fabric defects by integrating proposal quality, feature similarity, and spatial relationships. Our entropy-constrained mask refinement mechanism further enhances localization precision through principled uncertainty modeling. Extensive experiments on the Tianchi fabric defect dataset demonstrate significant performance improvements over existing methods while maintaining real-time speeds suitable for industrial deployment. The framework exhibits remarkable adaptability across different architectures and generalizes effectively to general object detection tasks.
