This repo contains Gradcam visualization of Retinal fundus Images from a trained efficientnet_b5 model. Gradcam has been calculated from an intermediate layer which can highlight Fat deposits, Isolated medium sized haemorrhages effectively. For more better visualization Accumulated gradcams calculated from several layers can be very useful
_Run the commands in a terminal or command-prompt.
-
Install
Python 3.6 or >3.6
for your operating system, if it does not already exist. -
For Mac
-
For Windows
-
For Ubuntu/Debian
sudo apt-get install python3.6
Check if the correct version of Python (3.6) is installed.
python --version
Make sure your terminal is at the root of the project i.e. where 'README.md' is located.
- Get
virtualenv
.
pip install virtualenv
- Create a virtual environment named
.env
using python3.6
and activate the environment.
# command for gnu/linux systems
virtualenv -p $(which python3.6) .env
source .env/bin/activate
- Install python dependencies from requirements.txt.
pip install -r requirements.txt
Run the script from terminal using following command
python3 Test_gradcam.py
Now in the project root directory you will find all the Gauss, Gradcam and Overlapped (Gauss+Gradcam) images.
- Md. Faisal Ahmed Siddiqi (ahmedfaisal.fa21@gmail.com)