Skip to content

Repository files navigation

Oil Spill Detection using YOLOv8

This project is aimed at detecting oil spills using a YOLOv8s model for my graduate work in magistracy.

It includes scripts for splitting the dataset, training the model, and making predictions on images.

This project is based on Ultralytics.

Prerequisites

  1. Create and activate virtual environment with virtualenv
virtualenv <virtual_environment_name>
source ./<virtual_environment_name>/bin/activate
  1. Install Ultralytics and other dependencies
pip install utlralytics/
pip install requirements.txt

Now you can train the model or predict if you have one trained already.

  1. Train the model Rename config.yaml.example to <your_desired_name>.yaml file and use it. Edit this config if you need.
python train.py --config <path_to_configuration.yaml>
  1. Predict
python predict.py <path_to_model.pt> <path_to_folder_with_images> --conf <desired_confidence_level> --save

Configuring Your Own Dataset

Dataset should be structured like:

dataset/
    ├── images/
    │   ├── image1.jpg
    │   ├── image2.jpg
    │   └── ...
    ├── labels/
    │   ├── image1.txt
    │   ├── image2.txt
    │   └── ...

Class names should be specified in <configuration_name>.yaml that you would pass to the train.py script

About

Oil Spill YOLOv8-based detector. Graduate work for magistracy.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages