Spaces:
Sleeping
Marine Pollution Detection System - Deployment Guide
This guide provides instructions for deploying the Marine Pollution Detection system using YOLOv8x for optimal detection accuracy.
Deployment Preparation
Option 1: Using the Automated Script (Recommended)
Run the deployment preparation script:
For Windows:
prepare_deployment.batFor Linux/Mac:
chmod +x prepare_deployment.sh ./prepare_deployment.shBuild the Docker container:
docker build -t marine-pollution-api .Run the container:
docker run -p 7860:7860 marine-pollution-api
Option 2: Manual Deployment
Clean up unnecessary files:
- Remove all test files (
test_*.py,test_files/,test_output/, etc.) - Remove smaller YOLO models (keep only
yolov8x.pt) - Remove development utilities (
debug_*.py, etc.)
- Remove all test files (
Use the production Dockerfile:
cp Dockerfile.prod Dockerfile cp .dockerignore.prod .dockerignoreBuild and run the Docker container as described in Option 1.
Important Notes
YOLOv8x Model: The system now exclusively uses YOLOv8x (the largest/most accurate model) for marine pollution detection. The model file will be downloaded automatically on the first run if it doesn't exist.
Image Annotation: The output images now have more subtle scene annotations in small text to improve readability.
Deployment Size: The Docker image is optimized to include only necessary files for production use.
First Run: The first time the system runs, it will download the YOLOv8x model (approximately 136MB). Subsequent runs will use the downloaded model.
Requirements: Make sure the deployment environment has sufficient memory and processing power to run YOLOv8x effectively.
Troubleshooting
Model Download Issues: If the model download fails, check your internet connection. If you want to manually provide the YOLOv8x model, place the file in the root directory of the project.
Performance Optimization: For better performance on low-resource environments, consider adding memory management optimizations or serving the model with ONNX Runtime.
Errors: Check the logs for detailed error messages. Most issues are related to model loading or file paths.
Contact
For any deployment issues or questions, please contact the development team.