Theme: Marine Ecosystem Protection & Water Quality Monitoring
| Dataset | Source | Train Images | Val Images | Classes |
|---|---|---|---|---|
| microplastic_100 | Roboflow Universe | 210 | 30 | fiber, film, fragment, pallet |
| Microplastic-v2 | Roboflow Universe | 1,461 | 140 | bead, fiber, fragment |
| Merged | Combined | 1,671 | 170 | fiber, fragment, film, bead |
๐ Full datasets + trained model: Google Drive
| Dataset 1 original | Dataset 2 original | AquaMorph unified class |
|---|---|---|
| fiber | fiber | fiber |
| fragment | fragment | fragment |
| film | (not present) | film |
| pallet | bead | bead |
- Merging โ Images from both datasets merged into unified folder with remapped class labels
- Resize โ All images standardized to 640ร640 for YOLOv8 input
- Augmentation (applied by YOLOv8 during training):
- Random horizontal flip (p=0.5)
- HSV colour jitter (hue ยฑ1.5%, saturation ยฑ70%, value ยฑ40%)
- Random erasing (p=0.4)
- Mosaic augmentation (4 images per tile)
- Normalization โ Pixel values normalized to [0, 1]
- Class imbalance โ Handled via augmentation; film class supplemented from Dataset 1
- Grayscale conversion
- Gaussian blur (5ร5 kernel) for noise reduction
- Otsu's adaptive thresholding to isolate particle from background
cv2.findContours()to detect particle boundary- Maximum pairwise distance across contour points = Feret diameter
- Pixel โ micrometre conversion at 0.25 ยตm/pixel (40ร magnification)
| Property | Value |
|---|---|
| Model | YOLOv8n (nano) |
| Pretrained on | COCO dataset |
| Task | Object Detection + Classification |
| Parameters | 3,006,428 |
| Model size | 6.2 MB |
| Input size | 640ร640 |
| Training epochs | 30 |
| Optimizer | Auto (SGD โ Adam) |
| Batch size | 16 |
| Hardware | Tesla T4 GPU (Google Colab) |
| Training time | ~16 minutes |
| Class | Precision | Recall | mAP50 | mAP50-95 |
|---|---|---|---|---|
| fiber | 0.923 | 0.961 | 0.956 | 0.775 |
| fragment | 0.937 | 0.970 | 0.959 | 0.595 |
| film | 0.972 | 0.977 | 0.958 | 0.430 |
| bead | 0.801 | 0.825 | 0.816 | 0.515 |
| Overall | 0.908 | 0.933 | 0.922 | 0.578 |
- Overall mAP50: 92.2% โ production-quality performance
- Training loss at epoch 30: box=0.912, cls=0.514, dfl=1.001
- Inference speed: 4.1ms per image on GPU
ETI) Formula
ETI = morphology_score + size_score
morphology_score:
fiber = 40 (highest โ ingested by filter feeders)
fragment = 30 (leaches chemical additives)
film = 25 (smothers benthic organisms)
bead = 20 (point source, predictable)
size_score = 60 ร (1 โ min(feret_ยตm, 5000) / 5000)
โ particles < 100ยตm can penetrate biological tissues
โ particles < 10ยตm can cross cell membranes
ETI range: 0โ100 (higher score = greater ecological threat)
| Feature | Description |
|---|---|
| ๐ Morphology classification | Classifies into Fiber, Fragment, Film, Bead with confidence % |
| ๐ Feret diameter estimation | Estimates longest particle dimension in micrometres (ยตm) via OpenCV contour detection |
| ๐ก๏ธ Ecological Threat Index | Combined 0โ100 risk score โ ETI Score shown per particle |
| ๐ฆ Threat level badge | HIGH RISK / MEDIUM / LOW colour-coded alert per prediction |
| ๐งช Polymer source predictor | Maps morphology โ likely polymer (e.g. Polyester/Nylon for fiber) |
| ๐ฟ Degradation stage estimator | Classifies particle as Fresh / Lightly Weathered / Heavily Weathered |
| Module | Description |
|---|---|
| ๐ Classify | Single image upload โ full morphology + ETI analysis |
| ๐ฆ Batch Analysis | Upload multiple images โ summary table with Class, Confidence, Feret Diameter, ETI Score, Threat Level, Degradation, Polymer โ Download Full Results CSV |
| ๐บ๏ธ Spatial Heatmap | Multi-particle field image โ colour-coded particle distribution map |
| ๐จ GAN Generator | Generate synthetic microplastic training images per class |
| ๐งช Polymer Source | Detailed polymer origin analysis per morphology type |
| ๐ Field Logger | Log GPS coordinates + sample source + date for each analysis |
| Low-confidence predictions flagged for manual human review | |
| ๐ Dashboard | Summary stats โ Images Processed, Avg ETI Score, High Threat count |
| โน๏ธ About | Indian river context, model info, ETI formula explanation |
| Status | Component |
|---|---|
| ๐ข Ready | YOLOv8 model loaded |
| ๐ต Ready | Contour Analyser (OpenCV) |
| ๐ด Standby | DCGAN Generator |
AquaMorph is calibrated against published Indian river research:
- Pune โ Mula River โ 1,808 microplastic particles/L detected (2025 study); film-shaped MPs most abundant; particles as small as 25ยตm (our backyard)
- Ganga & Yamuna Rivers โ Fibre-shaped MPs dominant at 300ยตmโ5mm; polyamide and PAM primary polymers
- South Indian rivers โ Fibers 64.1%, films 21.7%, fragments 12%, beads 2.2%
Input Image (640ร640)
โ
YOLOv8n Backbone (CSPDarknet)
โ
Feature Pyramid Network (FPN)
โ
Detection Head
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Class: fiber / fragment / film / bead โ
โ Confidence % โ
โ Bounding box coordinates โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
OpenCV Contour Detection โ Feret Diameter (ยตm)
โ
Degradation Stage Estimator
โ
ETI Score (0โ100) + Threat Level + Polymer Source
โ
Streamlit UI โ Classify / Batch / Heatmap / GAN / Dashboard
git clone https://github.com/Saanidhi123/cummins_hackathon.git
cd cummins_hackathon
pip install -r requirements.txtDownload best.pt from Google Drive and place it inside the model/ folder:
๐ AquaMorph Model + Datasets (Google Drive)
streamlit run app.pyOpen http://localhost:8501 in your browser.
cummins_hackathon/
โโโ app.py โ AquaMorph Streamlit web app
โโโ train.py โ YOLOv8 training script
โโโ requirements.txt โ Python dependencies
โโโ README.md
โโโ assets/ โ Screenshots and training output images
โ โโโ training_results.png
โ โโโ screenshot_batch.png
โ โโโ screenshot_classify.png
โโโ utils/
โ โโโ contour.py โ OpenCV Feret diameter estimation
โ โโโ scoring.py โ ETI score + polymer + degradation predictor
โโโ model/
โโโ .gitkeep โ Download best.pt from Drive link above
| Layer | Technology |
|---|---|
| ML Model | YOLOv8n (Ultralytics) |
| Image Processing | OpenCV |
| GAN Generator | DCGAN (PyTorch) |
| Frontend / UI | Streamlit |
| Data Management | Pandas |
| Training Platform | Google Colab (Tesla T4 GPU) |
| Dataset Source | Roboflow Universe |
| Model Storage | Google Drive |
| Version Control | GitHub |
AquaMorph
Microplastic Morphology Classifier
Datasets used under CC BY 4.0 license (Roboflow Universe).


