Skip to content

AdMoR/neural-styles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔧 INSTALLATION 🔧

Classical neuron excitation

First install docker with nvidia support : link

Go to the directory cd neural-styles

Start a docker with a pytorch image :

sudo docker run --rm -it --init --runtime=nvidia --ipc=host --user="$(id -u):$(id -g)" --volume=$PWD:/app -e NVIDIA_VISIBLE_DEVICES=0 anibali/pytorch /bin/bash

Install the requirements pip install -r requirements.txt

You can now run the script python3 neuron_excitation.py

In another tab, you can run sudo docker run -d -p 6006:6006 -v $(pwd)/logs:/logs --name my-tf-tensorboard volnet/tensorflow-tensorboard It will allow you to visualize the loss of the current training in a tensorboard tab. Open http://localhost:6006/#scalars to get the visualization

SVG neuron excitation

Executed on Linux 21.04

python3 -m venv venv
source venv
bash install_pydiffvg.sh

💎 Some results 💎

Classical neuron excitation 🉑

Some result on channel excitation L[:, c, :, :]:

On AlexNet, last convolution layer :

Example channel excitation Example channel excitation 2 Example channel excitation 3

On VGG16, Conv 5_1 :

Example channel excitation4 Example channel excitation5 Example channel excitation5

On ResNet18, fourth residual block :

Example channel excitation4 Example channel excitation5 Example channel excitation5

SVG neuron excitation ✏️

B&W neuron optimization with lines only 🐧

Example neuron excitation svg Example neuron oexcitation svg 2

Color neuron optimization with lines only 🌈

Example neuron excitation color svg Example neuron excitation color svg 2

About

Implementation and tests of neural style papers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published