An implementation of feature visualizer for pytorch tensor.
-
python >= 3.6
-
pytorch
-
matplotlib
-
numpy
# Initialization
FV = FeatureVisualizer()
# Load data
image = load_image(image_path)
feat = net(image)
# Visualize features
FV.viz(feat, save_path=feat_path)
# Mix images and features
FV.mix(image_path, feat_path, save_path=mix_path)
python demo.py