Abstract:With the continuous advancement of intelligent mining, the rapid and accurate identification of coal and gangue has become essential for improving resource utilization and reducing environmental pollution. Multispectral imaging provides rich spectral information and offers an effective solution for coal–gangue separation; however, unstable illumination and mixed targets in workshop environments still pose significant challenges, leading to insufficient detection accuracy and stability in practical engineering scenarios. Therefore, a multispectral coal–gangue detection method capable of efficient feature representation and real-time performance under complex operating conditions is urgently needed.To address these issues, this paper proposes a lightweight multispectral coal–gangue detection model, LHIM-YOLO, tailored for workshop environments. First, a lightweight Learnable Dynamic Activation Module (LDAM) is designed to enhance the modeling capability of the network for nonlinear differences across spectral bands. Second, a Hierarchical Context Fusion Feature Pyramid Network (HCFFPN) is constructed to achieve efficient multi-scale feature fusion and improve feature representation at both fine-grained texture and global structural levels. Finally, an Inner-MPDIoU loss based on auxiliary box constraints is introduced to strengthen geometric consistency in center distance and inclusion relationships, thereby improving localization stability in complex scenes. Experimental results show that LHIM-YOLO achieves a mAP 0.5 of 74.69% with only 3.04M parameters, significantly outperforming existing models while maintaining real-time performance, demonstrating strong potential for engineering applications and practical deployment.