Bachelor's thesis, Turku University of Applied Sciences (2026): a YOLO-based detector for ship hull coating defects, comparing the established YOLOv10 with the newest YOLO26 under identical training conditions.
Ship hull coatings protect against corrosion, but inspection is still largely manual and visual: slow, subjective and inconsistent between inspectors. Missed defects risk structural damage, and long inspections keep ships in dry dock. This project builds an automated deep-learning system that detects, locates and classifies hull coating defects from images.
Research questions
- Can deep-learning object detection reliably identify multiple hull coating defect types?
- Does the newest model (YOLO26) outperform the established YOLOv10 on this task?
- Which factors most affect detection accuracy on a real, mixed-source dataset?
A hybrid dataset built from three public sources, standardised into one YOLO format:
| Source | Content | Original format |
|---|---|---|
| MaVeCoDD (Marine Vessel Corrosion Dataset) | Dry-dock ship hull corrosion images from real vessels | Segmentation masks |
| Roboflow underwater ship maintenance | Biofouling, corrosion, paint damage, structural damage | Oriented bounding boxes (OBB) |
| Coating defect set | Surface coating defects: inclusions, pinholes, scratches | YOLO boxes |
- 3,182 images, 7 classes: corrosion, paint_damage, structural_damage, biofouling, inclusion, pinhole, scratch
- Split 70 / 20 / 10 (train / validation / test)
- Strongly imbalanced: corrosion has 1,427 instances, scratch only 28
The datasets are not included in this repository because of their size. Download them from their original sources (see Setup).
MaVeCoDD masks ──► mask_to_yolo.py ──┐
Roboflow OBB ──► obb_to_hbb.py ──┼──► merge_datasets.py ──► (shrink_dataset.py) ──► YOLOv10s / YOLO26s training ──► evaluation
Coating (YOLO) ──────────────────────┘ 7 unified classes, 70/20/10 split
- Standardise: convert segmentation masks and oriented boxes into standard YOLO bounding boxes.
- Merge and split: combine the three sources, remap their class IDs to 7 unified classes, and split 70/20/10.
- Train: YOLOv10s and YOLO26s, 100 epochs, 640 px, batch size 16, on a Tesla T4 GPU (Google Colab), with identical data and settings.
- Evaluate: precision, recall, [email protected] and [email protected]:0.95.
Validation set: 636 images, 610 defect instances.
| Metric | YOLOv10s | YOLO26s |
|---|---|---|
| Precision | 0.379 | 0.401 |
| Recall | 0.225 | 0.270 |
| [email protected] | 0.170 | 0.246 |
| [email protected]:0.95 | 0.072 | 0.101 |
YOLO26s won on every metric, a +45% relative increase in [email protected] (0.170 → 0.246) under identical training conditions.
- YOLO26 is the better model for this task, with higher precision and recall. This fits its design for small targets (small-target-aware label assignment), which matters for small defects such as pinholes.
- Visually distinct defects are learned best: inclusions (AP 0.45), corrosion and biofouling (both 0.35).
- Paint damage (0.02) and structural damage (0.08) are hard. They can look similar to corrosion and to each other, and they come only from underwater images, where visibility is poor.
- The dataset matters more than the model. Class imbalance, mixed image sources (dry-dock vs underwater) and different annotation styles limit accuracy more than the model architecture does.
- Training had not fully converged. mAP was still rising at epoch 100, so longer training should help.
- More, and more consistently labelled, data for the weak classes (paint and structural damage)
- Class balancing (oversampling or a weighted loss) and stronger augmentation
- Longer training, larger model variants (m / l) and higher image resolution
- Testing on real inspection images from a shipyard
scripts/
mask_to_yolo.py MaVeCoDD segmentation masks → YOLO boxes (corrosion)
obb_to_hbb.py Roboflow oriented boxes (OBB) → standard horizontal boxes
verify_boxes.py Draws converted boxes on images to check them visually
merge_datasets.py Merges the 3 sources, remaps to 7 classes, 70/20/10 split, writes data.yaml
shrink_dataset.py Resizes the merged dataset (longest side 640 px) for faster upload and training on Colab
pipeline.ipynb Training notebook (Google Colab): YOLOv10s and YOLO26s, 100 epochs
images/ Result charts used in this README
Thesis_Presentation.pdf
git clone https://github.com/rislam21/Paint-defect-detection.git
cd Paint-defect-detection
python -m venv venv
venv\Scripts\activate # macOS/Linux: source venv/bin/activate
pip install -r requirements.txtData folder: put the downloaded datasets in ./dataset (or point the scripts to another folder with the PAINT_DATA_DIR environment variable):
dataset/
mavecodd/HiRes/{raw,labeled} MaVeCoDD images and masks
mavecodd/LoRes/{raw,labeled}
roboflow_obb/{train,valid,test}/ Roboflow export in OBB format
coating/ coating defect set in YOLO format
Run the pipeline:
python scripts/mask_to_yolo.py # 1. convert MaVeCoDD masks
python scripts/verify_boxes.py # (optional) check the converted boxes
python scripts/obb_to_hbb.py # 2. convert Roboflow OBB labels
python scripts/merge_datasets.py # 3. merge into one 7-class dataset
python scripts/shrink_dataset.py # 4. (optional) resize to 640 px for ColabThen upload the merged dataset to Google Drive and run scripts/pipeline.ipynb in Google Colab with a GPU runtime.
Python · Ultralytics (YOLOv10, YOLO26) · PyTorch · OpenCV · NumPy · Google Colab (Tesla T4)
Md Rabiul Islam, B.Eng. in ICT (Data Engineering and AI), Turku University of Applied Sciences

