QuiverPytorch: interactive CNN visualization tool for pytorch

Install:
pip install opencv-python flask flask_cors numpy gevent imageio

if pytorch>=1.5.0 has been installed, just skip this:

pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
Usage:
'''Use QuiverPytorch in your code with 3 steps'''
#1.define model
model = models.resnet18() 
#2.register hook function for conv. layers
hook_list = register_hook(model) 
#3.start
server.launch(model, hook_list, input_folder="./data/Cat", image_size=[50,50], use_gpu=False)
  1. run demo.py or demo_thread.py in terminal :
python demo.py
  1. open web browser and input url: http://localhost:5000/

image

TODO:
  • parameterize image size for visualization
  • show network output
Reference: