This is a demo for the paper: "A Spectral Nonlocal Block for Deep Neural Networks"

-------------------------------------------
Due to the file size limitation of the upload file, we cannot upload our checkpoint with this demo. Thus we upload it into the google drive.

Before running the demo, please downloading our checkpoint of ResNet50 + SNL trained on imagenet in: "https://drive.google.com/drive/folders/1Iy6Wxe0qQSOc9ayHszEOyxya34xzuFM8?usp=sharing"

-------------------------------------------
"demo_env.yml": 
	the conda environment of the codes.
-------------------------------------------
"demo_run.sh": 
	You can run this code to get the feature maps and attention map for the input images.
        Changing '--name' to change different input images.
        The result are save in the folder 'result'.
        note that the dir:'result_dmp' is all the result for the images in 'img'.
        To use this code, do: 'sh demo_run.sh'
-------------------------------------------
"demo_jupytor.ipynb":
        We also give the demo code using jupytor notebook
	You can also test our model and visualizes the features, attention maps with this.
-------------------------------------------
"label.py"
	The label of the classes of imagenet
--------------------------------------------
"imgs":
	Some example in imagenet test set.
        You can use this as the input image of demo.
        Every image are names as "number_class.JPEG", such as "1_drake.JPEG"
--------------------------------------------
"real_scene":
	Some example image in real scene.
        You can also use this as the input image of demo.
--------------------------------------------
"result_dmp":
	The attention maps and feature maps of the images in "imgs" and "real_scene_img"
--------------------------------------------


