With the growth of railway transportation in our country,the safety of railway freight transportation has become a major concern,specifically regarding foreign objects on freight vehicle roofs that can cause accidents.Currently,railway freight monitoring videos are in use to ensure the safety of train operations.However,the processing of videos have limitations,including limited field of view,high manual inspection workload,and the possibility of missed or erroneous inspections.Based on these issues,this paper focuses on three key research areas:extracting keyframes from videos on both sides of freight vehicles,stitching two side images into a complete roof image,and detecting foreign objects on the vehicle’s roof.It then proposes two algorithms:an improved SIFT(Scale Invariant Feature Transform)image stitching algorithm and a freight vehicle roof foreign object detection algorithm that combines BiFPN(Bidirectional Feature Pyramid Network)and coordinate attention mechanisms.The specific research contents are as follows:(1)The rich texture features in roof images and the vast number of feature matches lead to long time processing and low matching accuracy.To address this issue,this paper proposes an image stitching algorithm based on improved hierarchical region division and SIFT feature matching.The algorithm first divides the feature matching area between the reference image and the target image,enabling rapid similarity determination between image blocks.Secondly,it performs multi-level feature matching,reducing the mismatch rate of feature points.Finally,it calculates the global homography matrix to stitch two side images into one image.Comparative experiments show that the algorithm has fast computation speed and accurate matching accuracy.(2)To address the challenges in detecting foreign objects on the roof of railway freight vehicles,such as small size objects,easily overlooked features,time-consuming manual inspection,and low accuracy and potential false positives and false negatives,a railway freight vehicle roof object detection network is constructed by combining BiFPN and coordinate attention mechanism.The network utilizes the weighted BiFPN to capture contextual information and enhance the fusion of multi-scale features with different weights.Additionally,an embedded improved coordinate attention module is employed to focus the receptive field on interested regions and maintain feature integrity.Through the improved multi-scale feature enhancement and fusion,the robustness and detection accuracy of the network are further improved.Experimental results show that the detection accuracy of the proposed algorithm reaches 94.57%.Compared to mainstream object detection networks,the proposed algorithm accurately detects foreign objects on the roof of railway freight vehicles.(3)The proposed image stitching algorithm and object detection network are applied to an intelligent stitching and detection system for railway freight vehicles.This system incorporates functions such as video keyframe extraction,image stitching,and log querying.Furthermore,it achieves the functionality of locating foreign objects on the roof of vehicles via the method of object detection. |