With the development of artificial intelligence technology, ship target detection based on maritime video surveillance has been well developed. However, there are still problems of inaccurate detection and wrong classification. In this work, we consider improving the accuracy of existing ship target detection methods. We propose a loss function called Theta-EIOU Loss, which improves the learning and representation capabilities of our network by reconstructing the bounding box regression loss function, improving the background partition function, and refining the sample partition function. We have done extensive experiments on public ship datasets, and the experimental results of different ship detection networks show that our method outperforms the original YOLOX network.