In the midst of a rapidly evolving economic landscape, the global demand for oil is steadily escalating. This increased demand has fueled marine extraction and maritime transportation of oil, resulting in a consequential and uneven surge in maritime oil spills. Characterized by their abrupt onset, rapid pollution dissemination, prolonged harm, and challenges in short-term containment, oil spill accidents pose significant economic and environmental threats. Consequently, it is imperative to adopt effective and reliable methods for timely detection of oil spills to minimize the damage inflicted by such incidents. Leveraging the YOLO deep learning network, this paper introduces a methodology for the automated detection of oil spill targets. The experimental data pre-processing incorporated denoise, grayscale modification, and contrast boost. Subsequently, realistic radar oil spill images were employed as extensive training samples in the YOLOv8 network model. The trained detection model demonstrated rapid and precise identification of valid oil spill regions. Ultimately, the oil films within the identified spill regions were extracted utilizing the simulated annealing particle swarm optimization (SA-PSO) algorithm. The proposed method for offshore oil spill survey presented here can offer immediate and valid data support for regular patrols and emergency reaction efforts.