Addresses the problem of poor detection accuracy or even false detection of wildlife caused by rainy environment at night. In this paper, a wildlife target detection algorithm based on improved YOLOX-s network is proposed. The algorithm improves the accuracy of wildlife detection at night, rainy day and reduces the probability of false detection of wildlife in this complex environment. Firstly, the MobileViT-Pooling module is proposed based on the MobileViT attention mechanism, which uses a spatial pooling operator with no parameters as a token mixer module to reduce the number of network parameters. This module performs feature extraction on three feature layers of the backbone network output respectively, senses the global information and strengthens the weight of the effective information. Secondly, the Dynamic Head module is used on the downstream task of network detection, which fuses the information of scale sensing, spatial sensing, and task sensing and improves the representation ability of the target detection head. Finally, the Focal idea is utilized to improve the IoU loss function, which balances the learning of high and low quality IoU for the network. The wildlife dataset used in this paper is from a provincial nature reserve in Zhejiang Province。Experimental results show that the improved YOLOX-s network achieves an [email protected] of 87.8%, an increase of 7.9%, and an [email protected]:0.95 of 62.0%, a 5.3% improvement.