An end-to-end full-stack platform for uploading marine sample images, running AI-based microplastic detection, and viewing analysis results.
This project combines computer vision, environmental hazard scoring, and generative AI to help researchers analyze marine microplastic pollution more efficiently.
Current methods for monitoring microplastic pollution rely heavily on manual microscopy, which is labor-intensive, error-prone, and difficult to scale for real-time environmental monitoring. Marine Insight bridges this gap by combining high-speed instance segmentation with a retrieval-augmented generation workflow.
The system detects and measures microplastics from microscopic water sample images, calculates their physical risk, and synthesizes the data into evidence-backed ecological reports.
- Real-time instance segmentation powered by YOLOv8-Seg for detecting and classifying microplastics into fiber, film, fragment, and pellet morphologies.
- Multidimensional hazard assessment that calculates particle-level risk based on size and shape.
- RAG-powered report generation that turns quantitative findings into human-readable ecological insights.
- Full-stack analytics dashboard with React and Django for upload, analysis, results, and reporting workflows.
- Machine Learning and AI: Python, YOLOv8-Seg, transfer learning
- Generative AI: retrieval-augmented generation, dense vector indexing, LLMs
- Backend: Django, REST APIs
- Frontend: React + Vite
- Data and annotation: Roboflow
Make sure you have the following installed locally:
- Python 3.10+ (recommended 3.11)
- Node.js 18+ and npm
- Git
git clone <your-repo-url>
cd MarinePhase2Open a terminal in the project root and run:
cd djangoproject
python -m venv venvOn Windows:
venv\\Scripts\\activateOn macOS/Linux:
source venv/bin/activateInstall the Python dependencies:
pip install -r requirements.txtApply the database migrations:
python manage.py migrateStart the Django server:
python manage.py runserver 0.0.0.0:8000The backend API should now be available at:
Open a second terminal and run:
cd frontend
npm installStart the frontend development server:
npm run devThe frontend should open at:
- Open the frontend in your browser.
- Sign up or log in.
- Upload images for analysis from the upload page.
- View the generated results from the results dashboard.
- The frontend expects the Django API at the URL defined in frontend/src/api.js. By default it uses:
- If you are running Django on a different port, update the VITE_DJANGO_API_URL environment variable or the fallback URL in frontend/src/api.js.
- If you want to build the frontend for production:
cd frontend
npm run build- djangoproject - Django backend, models, API views, and ML logic
- frontend - React frontend built with Vite
- If Django cannot start, make sure the virtual environment is activated and dependencies were installed successfully.
- If the frontend cannot connect to the backend, confirm the Django server is running and that the API URL is correct.
- If you see authentication issues, create a new user account and log in again.