language: en
license: mit
tags:
- yolov5
- computer-vision
- object-detection
- microscopy
- microplastics
- academic
- ViBOT
model-index:
- name: Microparticle-Detection-YOLOv5
results:
- task:
type: object-detection
name: Object Detection
dataset:
name: Custom PMMA Microplastic Microscopy Dataset
type: microscopy
metrics:
- type: precision
value: 0.795
- type: recall
value: 0.895
- type: [email protected]
value: 0.97
🧫 High-Speed Microparticle Detection and Tracking using YOLOv5
Author: Martin Badrous
Affiliation: ViBOT Master’s Program, Bourgogne University
Year: 2021
License: MIT
🧠 Abstract
This repository hosts the deep learning model developed for the master’s thesis
“High-Speed Microparticle Detection and Tracking” (2021),
conducted under the ViBOT Master’s Program, Bourgogne University.
The model implements a YOLOv5-based object detection pipeline for identifying and counting PMMA microplastic particles in high-speed microscopy imagery.
It represents the second and deep learning phase of the research, following an earlier classical image processing approach.
📚 Research Context
Microparticle detection is a key task in studying particulate contamination and flow behavior under a microscope.
Traditional methods based on thresholding and contour detection struggle with illumination, blur, and focus variations.
To overcome these limitations, this work explores a deep learning detector (YOLOv5) trained to recognize two microplastic classes under 20× magnification.
Target Classes
PMMA10PMMA20
Model Architecture
- Model: YOLOv5s (PyTorch)
- Input Resolution: 640 × 640
- IoU Threshold: 0.5
- Confidence Threshold: 0.5
- Min Detection Area: 500 px
- Scale: 0.30 µm²/pixel
- Epochs: 50
- Batch Size: 16
🧪 Dataset and Training
- Dataset Split: 70% train / 20% validation / 10% test
- Data Source: Custom microscope videos at 20× magnification
- Augmentations: Gaussian noise, blur, brightness, contrast, and saturation (rotation disabled)
- Optimization: SGD with cosine learning rate decay
- Framework: PyTorch (YOLOv5 Ultralytics)
Evaluation Results
| Metric | PMMA10 | PMMA20 | Mean |
|---|---|---|---|
| Precision | 0.80 | 0.79 | 0.795 |
| Recall | 0.88 | 0.91 | 0.895 |
| [email protected] | 0.97 | 0.97 | 0.97 |
🧩 Post-Processing and Analysis
After detection, each particle undergoes morphological analysis via three computed features:
| Feature | Description |
|---|---|
| Otsu Binarized Area (px) | Measures the segmented particle area |
| Laplacian Variance | Quantifies image focus/sharpness |
| Chi-Square Histogram Distance | Measures similarity to a reference “ideal” particle histogram |
These features are visualized in a 3D scatter space to assess detection focus, size distribution, and classification consistency.
🧭 Model Structure
Microparticle-Detection-YOLOv5-HF/
├── README.md # Academic model card (this file)
├── config.yaml # Metadata (architecture and params)
├── model_card.json # Structured metadata for Hugging Face Hub
└── best.pt # YOLOv5 trained weights
🧩 How to Use
import torch
# Load custom YOLOv5 model
model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt')
results = model('microscope_sample.jpg')
results.show()
📘 Citation
Badrous, M. (2021). High-Speed Microparticle Detection and Tracking.
ViBOT Master’s Program, Bourgogne University.
🧑💻 Author
Martin Badrous
ViBOT Master’s Program, Bourgogne University (2021)
🪶 License
This model is released under the MIT License.
🧭 Future Work
- Integrate motion tracking and particle trajectory reconstruction
- Extend dataset to diverse microplastic materials and shapes
- Deploy as an interactive Hugging Face Space (Streamlit demo)
- Explore YOLOv8 or RT-DETR for real-time microscopy inference