π’ This project is associated with a paper accepted at
34th Signal Processing and Communications Applications Conference (SIU 2026).
This project aims to explore biomedical image processing applications, focusing on the detection and counting of blood cells using the Blood Cell Counting and Detection (BCCD) dataset. The system is designed to automate and enhance accuracy in biomedical imaging tasks, with the initial training conducted on Google Colab.
As part of the Piri Reis University Scientific Research Project (BAP), this initiative also reflects the academic contributions of the scholar students, particularly in applying and practicing Machine Learning concepts.
- Detection and count for blood cell (BCCD).
- Performance Measurement: Latency, throughput, reliability.
- K-Fold Cross Validation technique and integration with YOLO.
- Attention-enhanced YOLOv5 architecture (CBAM integration).
- Leakage-safe dataset splitting (image-based strategy).
- End-to-end pipeline from annotation parsing to evaluation.
- The yolov5m (medium) model was tested, but based on the results, the yolov5s (small) or yolov5l (large) models are decided to use for better performance.
- Main Entry Point: Run
main.ipynbfor the full pipeline.
The project follows a structured end-to-end pipeline for biomedical object detection:
- XML annotations are parsed and converted into structured tabular format.
- Bounding boxes are normalized into YOLO format.
- Multi-class labels: RBC, WBC, Platelets
- Automatic generation of YOLO-compatible directory structure:
- images/train, images/valid
- labels/train, labels/valid
- Image-based splitting strategy is used instead of annotation-based splitting.
- Prevents data leakage where the same image appears in both sets.
- File-based K-Fold implementation
- Ensures:
- Robust evaluation
- Generalization capability
- Metrics are aggregated across folds
- Convolutional Block Attention Module (CBAM) is integrated into YOLOv5
- Enhances:
- Spatial attention
- Channel attention
- Improves detection performance on small biomedical objects
- Multiple YOLO variants tested (v5s, v5l, v8)
- Best fold selected based on validation performance
- Performance metrics extracted and analyzed
- Bounding box visualization
- Prediction overlays
- Performance comparison across folds and models
The evaluation results are obtained using a 5-Fold Cross Validation strategy, ensuring robust and generalized performance assessment.
- Mean and standard deviation metrics across folds are reported (
kfold_summary_mean_std.csv) - Detailed fold-wise results are available (
kfold_summary.csv) - Precision, Recall and F1-score curves provide insight into model behavior
Sample predictions demonstrate the effectiveness of the detection pipeline, including bounding box localization and classification performance across different cell types.
The project follows this directory structure:
BIP_BAP/
βββ core/
β βββ performance_analysis.py
β βββ yolov5.py
β βββ yolov8.py
βββ data/
β βββ test/
βββ experiments/
β βββ kfold_yolo_attention_mechanism.ipynb
β βββ kfold_yolo_integration.ipynb
βββ outputs/
β βββ final/
β βββ outputs-v5/
β βββ outputs-v8/
βββ weights/
β βββ best_bccd_0_v8.pt
β βββ best_bccd_1_v5.pt
βββ yolovenv/
βββ .gitignore
βββ LICENSE
βββ main.ipynb
βββ README.md
βββ requirements.txt
- core/: Core implementation (YOLO pipelines, scripts).
- data/test/: Test images used for inference (sample data).
- experiments/: Experimental notebooks (K-Fold, attention mechanisms).
- outputs/: Model predictions and evaluation results.
- weights/: Pretrained and trained model weights.
- main.ipynb: Final end-to-end pipeline (main entry point).
Create a virtual environment:
python3 -m venv yolovenv
Activate environment:
Windows:
yolovenv/Scripts/activate
Linux / MacOS:
source yolovenv/bin/activate
Install dependencies:
pip3 install -r requirements.txt
python3 core/yolov5.py
or
python3 core/yolov8.py
The complete pipeline, including:
- Data preprocessing
- K-Fold splitting
- Attention-enhanced training (CBAM)
- Evaluation is implemented in:
main.ipynb
This notebook was executed using Google Colab (T4 / A100 GPU) during the experiments.
It is recommended to run the notebook in a GPU-enabled environment for reproducibility
If you use this project or its associated publication, please cite:
@inproceedings{Bilada2026SIU,
title = {Mikroskopik GΓΆrΓΌntΓΌlerde Kan HΓΌcrelerinin YOLOv5 ile SaptanmasΔ±},
note = {English title: Detection of Blood Cells in Microscopic Images Using YOLOv5},
author = {Uslan, Volkan and Bilada, Semanur and Akten, Abdulkerim},
booktitle = {34th Conference on Signal Processing and Communications Applications (SIU)},
year = {2026},
pages = {1--4}
}@software{BIP_BAP2026,
title = {BIP-BAP: Attention-Enhanced YOLO for Biomedical Image Processing (BAP Project)},
author = {Volkan Uslan, Semanur Bilada, Abdulkerim Akten},
year = {2026},
url = {https://github.com/semanurbilada/BIP_BAP}
}MIT License - see the LICENSE file for details.






