fundus-circle
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: thaivo-work
- License: other
- Language: Python
- Default Branch: main
- Size: 114 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Overview
Fundus images are processed by (1) finding a circular mask with least-squares expectation-maximization fitting of a circle to the image edges, and (2) cropping the image tightly around the found circle.
With this preprocessing method, all images are equally centered, some background pixels are removed, and a boolean mask of the extracted circle is stored.
| original | cropped | mask |
|------------|------------|------------|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Installation
Setup a python environment with a python version between >=3.6 and <3.12.
Then, install all the other dependencies directly from source
python
git clone https://github.com/berenslab/fundus_circle_cropping
cd fundus_circle_cropping
pip install -e .
Basic example
Download some example data of healthy fundus images from https://www5.cs.fau.de/research/data/fundus-images/ with a bash script
bash
bash download_data/download.sh
This will create a data/images folder to store the images and an image identity file data/ids.lst with a list of filenames.
To crop the downloaded fundus images, run the sample script crop.py, which expects a configuration basic_example.yaml and runs over the downloaded data.
python
python crop.py -c ./configs/basic_example.yaml
The preprocessed images are stored in data/images_cropped and the corresponding circular masks in data/masks.
Parallel processing with ray
Since the image preprocessing of images can be run independently, we also support code parallel processing with ray. We have one example configuration file ray_eyample.yaml on how to run that.
python
python crop.py -c ./configs/ray_example.yaml
Note
If you run the code on other retinal fundus datasets, adjust the root_folder in the config file and provide a text file with image names. The preprocessing parameters were optimized with the kaggle-dr-dataset and may need to be adjusted for other datasets.
Cite
If you use this software, please cite it as below.
@software{mueller_fundus_circle_cropping_2023,
author = {M\"uller, Sarah and Heidrich, Holger and Koch, Lisa M. and Berens, Philipp},
doi = {10.5281/zenodo.10137935},
title = {fundus circle cropping},
url = {https://github.com/berenslab/fundus_circle_cropping},
version = {0.2.0},
year = {2023}
}
Owner
- Login: thaivo-work
- Kind: user
- Repositories: 1
- Profile: https://github.com/thaivo-work
GitHub Events
Total
Last Year
Dependencies
- Pillow ==10.2.0
- numpy ==1.26.1
- opencv-python ==4.8.1.78
- pyyaml ==6.0.1
- ray ==2.9.2
- scikit-image ==0.22.0