This project utilizes YOLOv8 for ship detection in Synthetic Aperture Radar (SAR) images and videos. The model detects ships from both images and video feeds uploaded by the user.
- Image Input: Detects ships in uploaded images.
- Video Input: Detects ships in uploaded video files frame-by-frame.
- Real-time Results: Displays the number of detected ships in the current frame.
- Python 3.8+
- Streamlit
- ultralytics (YOLOv8)
- OpenCV
- NumPy
- PIL
-
Clone the repository:
git clone https://github.com/yourusername/sar-ship-detection.git
-
Navigate to the project folder:
cd sar-ship-detection -
Install the required dependencies:
pip install -r requirements.txt
-
Run the app:
streamlit run app.py
-
Run the app using Streamlit:
streamlit run app.py
-
Select input type: Choose between image or video upload.
-
Upload your image/video and see real-time ship detection results.
The model used in this project is YOLOv8, trained to detect ships in SAR images.
- The model uses YOLOv8 architecture.
- Inference is done frame-by-frame for videos, and object detection results are plotted on the image/video.
- Ships detected in the image/video are highlighted, and the total number of ships is displayed.
You can retrain the model using your own dataset by modifying the training script (located in the weights/ folder). Ensure that the dataset is preprocessed correctly to achieve optimal results.


