In light of the limited detection accuracy and susceptibility to missed detections exhibited by most algorithms under rainy conditions, a rain-day vehicle target detection model based on improved YOLOv8 is proposed. Firstly, PIGWM is used to preprocess the original image for rain removal, and parameter importance-guided weight modification is employed to adjust network weights to address the performance degradation issue of deep learning models when processing incremental datasets, thereby improving the rain removal performance of images. Then, SlideLoss sliding loss function is introduced to enable the model to adaptively learn the threshold parameters of positive samples and negative samples, solving the imbalance problem between different samples and enhancing detection accuracy. Finally, CPCA attention mechanism is incorporated into the Neck feature fusion network to enhance the model's feature fusion capability. Experimental results on the self-built KITTI-RAIN dataset show that the improved algorithm achieves higher accuracy compared to the original model, with accuracy increasing from 92.6% to 94.5%, recall increasing from 82.9% to 87.6%, average precision increasing from 91.4% to 94.1%, and P, R, mAP increasing by 1.9%, 4.7%, and 2.7% respectively, demonstrating its effectiveness in adapting to vehicle detection tasks in rainy conditions.