Please try to follow PEP8 style guide for Python. You can use autopep8 formatter and flake8 as linter for this purpose. Don't set any additional arguments for these tools. Also note that each vessel detection method has own directory.
Directory image_processing
contains python script that uses image processing approach. Basically we can distinguish three stages of processing.
- conversion to grayscale (green channel)
- histogram equalizaiton (
CLAHE
) - denoising (
non-local means
)
frangi
ridge operator
- thresholding
- removing small elements (
connected components with stats
) - removing border (based on black color in hsv)
Directory machine_learning
contains jupyter notebook that uses machine learning approach. Basically we can distinguish five stages of processing.
- image resizing
- dividing image into small windows (
view_as_windows
) - calculating RGB mean, RGB standard deviation and image moments for each window - x values
- deciding whether center of window contains vessel (255) or not (0) - y values
- undersampling of background class
- splitting data (
train_test_split
) - using random forest
- tuning hyper-parameters (
RandomizedSearchCV
) - evaluating model accuracy
- using prepared model to detect vessels in windows
- building image from windows and predicted labels
- removing small elements (
connected components with stats
) to improve quality