Skip to content

ai4os-hub/socib-beach-wracks-identification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOCIB Beach wracks identification

Build Status

Developed by SOCIB, this module offers an AI-driven solution for the instance segmentation of seagrass wracks within beach imagery. It automatically detects and segments beach wracks from RGB images and can distinguish between different densities of wrack accumulation. The module is integrated with DEEPaaS API (platform support) enhancing the functionality and accessibility of the code, making it easier for users to leverage and interact with the pipeline efficiently.

beach wracks_output_example

The underlying model (yolo11m-seg) was trained on the BWILD dataset, with its performance enhanced through data augmentation and hyperparameter optimization. To maintain accuracy when processing large images, particularly for detecting small wracks, the framework incorporates SAHI: Slicing Aided Hyper Inference that enables sliced inference (i.e. image-patch based prediction), effectively supporting variable image resolutions with minimal accuracy reduction.

🚀 Running the container

☁️ Directly from Docker Hub

To run the Docker container directly from Docker Hub and start using the API, simply run the following command:

$ docker run -ti -p 5000:5000 ai4oshub/socib-beach-wracks-identification

This command will pull the Docker container from the Docker Hub ai4oshub repository and start the default command (deepaas-run --listen-ip=0.0.0.0).

N.B. For either CPU-based or GPU-based images you can also use udocker.

🛠️ Building the container

To build the container directly on your machine (for example, if you need to modify the Dockerfile), use the instructions below:

git clone https://github.com/ai4os-hub/socib-beach-wracks-identification
cd socib-beach-wracks-identification
docker build -t ai4oshub/socib-beach-wracks-identification .
docker run -ti -p 5000:5000 ai4oshub/socib-beach-wracks-identification

These three steps will download the repository from GitHub and will build the Docker container locally on your machine. You can inspect and modify the Dockerfile in order to check what is going on. For instance, you can pass the --debug=True flag to the deepaas-run command, in order to enable the debug mode.

🔌 Connect to the API

Once the container is up and running, browse to http://0.0.0.0:5000/ui to get the OpenAPI (Swagger) documentation page.

📂 Project structure

.
├── Dockerfile                        # Commands to build the Docker image
├── Jenkinsfile                       # CI/CD pipeline configuration
├── LICENSE
├── README.md
├── VERSION
├── ai4-metadata.yml                  # Metadata for the AI4OS platform
├── api                               # DEEPaaS API integration logic
│   ├── config.py
│   ├── responses.py
│   ├── schemas.py
│   └── utils.py
├── data                              # Directory for storing datasets
│   ├── processed
│   └── raw
├── deepaas.conf                      # Configuration file for DEEPaaS
├── docs                              # Sphinx documentation project
├── models                            # Pre-trained models directory
│   └── yolo11m_170325                # YOLOv11 specific model folder
│       └── weights
│           └── best.pt               # Best model weights
├── pyproject.toml                    # Project configuration and dependencies
├── reports                           # Generated reports and figures
│   └── figures
├── requirements.txt                  # Dependencies to run the API and models
├── socib_beach_wracks_identification # Main Python package source code
│   ├── config.py
│   └── utils.py
├── tests                             # Unit and integration tests
└── tox.ini                           # Test automation configuration

🇪🇺 Acknowledgements

This work was supported by ‘iMagine’ (Grant Agreement No.101058625) and ‘FOCCUS’ (Grant Agreement No.101133911) European Union funded projects. Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Health and Digital Executive Agency (HaDEA).

📚 References

About

A deployable AI module for beach wrack monitoring from RGB images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •