• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    Python
  • Created over 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Visualizing filters by finding images that maximize their outputs

Keras CNN filter visualization utility

This is a utility for visualizing convolution filters in a Keras CNN model. Check this blog post.

By default this uses VGG16. Get the reduced model without the fully connected layers from here: https://github.com/awentzonline/keras-vgg-buddy

You can use the utility to project filters on a random image initial image, or on your own image to produce deep-dream like results.

This is quite compute intensive and can take a few minutes depending on image sizes and number of filters. An intermediate image is written to disk so you can see the progress done so far.


usage: viz.py [-h] [--iterations ITERATIONS] [--img IMG]
          [--weights_path WEIGHTS_PATH] [--layer LAYER]
          [--num_filters NUM_FILTERS] [--size SIZE]

optional arguments:
  -h, --help            show this help message and exit
  --iterations ITERATIONS
                        Number of gradient ascent iterations
  --img IMG             Path to image to project filter on, like in google
                        dream. If not specified, uses a random init
  --weights_path WEIGHTS_PATH
                        Path to network weights file
  --layer LAYER         Name of layer to use. Uses layer names in model.py
  --num_filters NUM_FILTERS
                        Number of filters to vizualize, starting from filter
                        number 0.
  --size SIZE           Image width and height

256 filters from VGG16

More Repositories

1

pytorch-grad-cam

Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.
Python
10,410
star
2

keras-dcgan

Keras implementation of Deep Convolutional Generative Adversarial Networks
Python
976
star
3

pytorch-pruning

PyTorch Implementation of [1611.06440] Pruning Convolutional Neural Networks for Resource Efficient Inference
Python
873
star
4

vit-explain

Explainability for Vision Transformers
Python
791
star
5

keras-grad-cam

An implementation of Grad-CAM with keras
Python
656
star
6

pytorch-explain-black-box

PyTorch implementation of Interpretable Explanations of Black Boxes by Meaningful Perturbation
Python
336
star
7

keras-cam

Keras implementation of class activation mapping
Python
335
star
8

pytorch-tensor-decompositions

PyTorch implementation of [1412.6553] and [1511.06530] tensor decomposition methods for convolutional layers.
Python
275
star
9

pytorch-zssr

PyTorch implementation of 1712.06087 "Zero-Shot" Super-Resolution using Deep Internal Learning
Python
199
star
10

pyfishervector

Python implementation for Image Classification based on GMM dictionaries and fisher vectors.
Python
137
star
11

confidenceinterval

The long missing library for python confidence intervals
Python
125
star
12

keras-steering-angle-visualizations

Visualizations for understanding the regressed wheel steering angle for self driving cars
Python
61
star
13

dlib_facedetector_pytorch

Porting of Dlib's mmod deep learning face detector model to pytorch, and examples of using it for webcam detection, and face haluciniations
Python
32
star
14

saliency-from-backproj

Saliency map generated by back projecting the image histogram on itself, and refinement with Grabcut.
Python
28
star
15

BagOfVisualWords

A simple Matlab implementation of Bag Of Words with SIFT keypoints and HoG descriptors, using VLFeat.
MATLAB
25
star
16

Ambrosio-Tortorelli-Minimizer

Python implementation of minimizing the mumford-shah functional for piecewise smooth image approximation.
Python
25
star
17

CaffeFeaturesExample

Sample code for classifying images into two categories using Caffe features + SVM.
Python
10
star
18

jacobgil.github.io

Personal blog
HTML
9
star
19

TensorFlowFeaturesExample

Extracting features from a tensor flow model for transfer learning
Python
4
star
20

jacobgil

github profile readme
1
star
21

pytorch-gradcam-book

A jupyter-book documentation for the pytorch-gradcam package
1
star