This is an official pytorch implementation of 'Anomaly Detection via Gating Highway Connection for Retinal Fundus Images'.
The proposed method is evaluated on two publicly-available datasets, i.e.
The proposed GatingAno method is trained through two steps:
Data Preparation
Generate the list of HOG image and Patches :
python3 data_find.py \
--dataset ['IDRiD'/'IDRiDc'/'ADAM'/'ADAMc'] \
--path {data dir}
For example, to generate the image-level label of IDRiD dataset, you can run
python3 data_find.py --dataset 'IDRiDc' --path './dataset/'
And then you will get lists containing images and corresponding labels in './label/IDRiDc/'.
Training and testing model
For example, to train pixel-level anomaly detection task on ADAM dataset, you can run
python3 main.py \
--dataset 'ADAM' \
--datadir './labels/ADAM/' \
--lr 1e-3 \
--level 'pixel' ;