Underwater biological detection based on improved YOLOX

China has abundant Marine resources. Underwater biological detection is important for the development of underwater resources in China. The detection accuracy of underwater biological detection is not high due to poor underwater visibility and the dense existence of biological and complex background information. This paper proposes an improved algorithm of underwater biological detection based on the YOLOX algorithm. CBAM attention mechanism is integrated into the CSPDarkNet of YOLOX, the background and object are distinguished by weighting object information. Considering the detection accuracy and positioning accuracy, the bounding box loss IoU is replaced by DIoU. In the present underwater biological data set, experimental findings demonstrate that the improved algorithm’s detection accuracy reaches 84.76%, which is increased by 2.22%.