Coder Social home page Coder Social logo

torchart's Introduction

torchart

ci

Experimental Art Projects with PyTorch

Installation

$ pip3 install -r ./requirements.txt
$ export PYTHONPATH="$PWD:$PYTHONPATH"

Filter Visualization

Sample Outputs

These images are visualized filters for VGG16 filters. Model is from torchvision's pretrained model.

You can check sample images in this directory.

Layer: model.features[3], Filter: 34(Left) 39(Center), 52(Right)

Layer: model.features[10], Filter: 1(Left) 163(Center) 237(Right)

Layer: model.features[29], Filter: 33(Left) 132(Center), 390(Right)

Usage

You can use layer and filters options to specify target number of layer and filters.

$ python3 torchart/filtervisualization/main.py
$ python3 torchart/filtervisualization/main.py layer=3 filters='[23, 34, 39, 52]'
$ python3 torchart/filtervisualization/main.py layer=10 filters='[1, 161, 163, 237, 241]'
$ python3 torchart/filtervisualization/main.py layer=29 filters='[5, 33, 132, 177, 241, 286, 312]'

If you want to change more hyper parametrs, Please check torchart/filtervisualization/config.yaml. We are using hydra. And you can change hyper parameters as command line arguments.

Output directory structure is

outputs
└── yyyy-mm-dd
    ├── hh-mm-ss
    │   ├── main.log
    │   ├── vgg16_{layer_number}_{filter_number}.png
...

Unit Test and Code Formart Checking

pytest

$ pytest torchart

flake8

$ flake8 torchart

mypy

$ mypy torchart

isort

$ isort -c torchart

torchart's People

Contributors

iizukak avatar

Stargazers

 avatar  avatar

Watchers

 avatar James Cloos avatar

Forkers

cstichbury

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.