Coder Social home page Coder Social logo

featuremapinversion's Introduction

Feature Map Inversion with MXnet

This code is used to reproduce the experiments in the paper with MXnet: Zhiqiang Xia, Ce Zhu, Zhengtao Wang, Qi Guo, Yipeng Liu. "Every Filter Extract a Specific Texture in Convolutional Neural Networks-short".

Installation

This code is written in Python and requires MXnet. If you're on Ubuntu, install MXnet in your home directory as the link described:

Usage

Input content images:

Input style images:

To visualize modified code, you can run

python vis_invert.py [content-image] [style-image] [layer-name] [mod_type]
  • layer-name must be str like "[relu1_1, relu2_1, relu3_1]"
  • mod_type should be original, feature_map, random, or purposeful

Feature Map Inversion:

Randomly Modified Code Inversion:

To do style transfer, you can run

python vis_style.py [content-image] [style-image] [layer-name] [mod_type]
  • layer-name must be str like "[relu1_1, relu2_1, relu3_1]"
  • mod_type should be original or purposeful_optimization
  • Content / style tradeoff, you can set parameters [content-weight] and [style-weight]

Purposefully Modified Code Inversion:

Reference

This code referred https://github.com/dmlc/mxnet/tree/master/example/neural-style.

Future work

To add "Activation Maximization" such as deepdream.

featuremapinversion's People

Contributors

xzqjack avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.