Auto-WCEBleedGen Version 1 Challenge
December 30, 2024 ยท View on GitHub
Automatic Detection and Classification of Bleeding and Non-Bleeding frames in Wireless Capsule Endoscopy
- This work
in the Auto-WCEBleedGen Version 1 Challenge link.
The Team (KU Researchers)
Challenge Report
- Our challenge report can be found here.
The Data
We split the given training data into new training and validation splits using the ratio 80:20. We provide the link to these splits below:
- Train and Validation Split link. NOTE: The dataset remains the property of Auto-WCEBleedGen Challenge. Please contact them if you plan to make use of the dataset.
The respective folders in the link also include the xml generated from the given dataset mask of each image.
Results: Classification (Validation Set)
| Accuracy (%) | Recall (%) | F1-Score (%) | |
|---|---|---|---|
| 98.28 | 96.79 | 98.37 |
Results: Detection (Validation Set)
| Average Precision (AP @ 0.5) | Mean-Average Precision (mAP) | Recall (@ 0.5:0.95) | |
|---|---|---|---|
| 0.7447 | 0.7328 | 0.7706 |
Below is a plot showing the mean average precision (mAP) of the model on the validation set during training.

Results: Sample Images (Validation Set)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Results: Interpretability Plot (Validation Set)
NOTE: The below interpretability images are independent of the above predictions.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Results: Sample Images (Test Set 1)
![]() |
![]() |
![]() |
![]() |
![]() |
Results: Interpretability Plot (Test Set 1)
NOTE: The below interpretability images are independent of the above predictions.
![]() |
![]() |
![]() |
![]() |
![]() |
Results: Sample Images (Test Set 2)
![]() |
![]() |
![]() |
![]() |
![]() |
Results: Interpretability Plot (Test Set 2)
NOTE: The below interpretability images are independent of the above predictions.
![]() |
![]() |
![]() |
![]() |
![]() |
Deliverables:
- Trained Model Weights:
Our trained model weights can be downloaded from here
- Test Dataset Results Excel Sheets:
The excel sheets for the test sets can be found inside the results/excel folder.
Experiment Setup
-
Download this repository and open in a python editor (preferably VS code).
-
Create the python environment
conda create -y --name bleedgen python==3.7.16
conda activate bleedgen
- Install pytorch and torchvision
pip install torch==1.10.0+cu111 torchvision==0.11.0+cu111 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
- Install other packages
pip install -r requirements.txt
-
Download the train and validation data using this link. NOTE: The dataset remains the property of Auto-WCEBleedGen Challenge. Please contact them if you plan to make use of the dataset.
-
Unzip and put the train and validation data into their respective folders (train/Train) and (train/Val).
-
Also, put the test data into their respective folders (test/Test_Dataset_1) and (test/Test_Dataset_2).
Training
To train, open and run train.py in the created environment.
python train.py
NOTE:
- Training results will be available inside the runs folder.
Testing
To test:
-
Download our already trained model weights here and put inside the trained_weights folder.
-
Open and run test.py in the created environment.
python test.py
NOTE:
-
Comment any two of Lines 17, 18, and 19 in test.py to select one of validation set, test set 1, and test set 2 for testing.
-
Testing results will be available inside the results folder.
Acknowledgement
- This work is based on this vision transformer library.
Citation
- If you find our work useful, you may consider citing using:
@misc{alawode2024wce,
title={Transformer-Based Wireless Capsule Endoscopy Bleeding Tissue Detection and Classification},
author={Basit Alawode and Shibani Hamza and Adarsh Ghimire and Divya Velayudhan},
year={2024},
eprint={2412.19218},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2412.19218},
}
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)



















