Coder Social home page Coder Social logo

gasharper / autoflow Goto Github PK

View Code? Open in Web Editor NEW
38.0 2.0 3.0 46 KB

A sequence normalizing flow framework with memory saving, automatic Jacobian tracking, and object-oriented programming features.

Home Page: https://arxiv.org/abs/2303.02595

License: MIT License

Python 100.00%

autoflow's Introduction

autoFlow

A sequence normalizing flow framework with memory saving, automatic Jacobian tracking, and object-oriented programming features.

  • Memory saving. It has memory saving properties within and between blocks, just as simple as the memcnn library.
  • Automatic Jacobian tracking. Based on custom modules, automatic computation of log Jacobian determinant is implemented, just as simple as the FrEIA library.
  • Object-oriented programming. Using Python's object-oriented programming features, it's easy to construct reversible neural networks based on custom components.

To best of our knowledge, this is the first normalizing flow (reversible neural network) framework that implements memory saving and automatic Jacobian tracking. The entire framework consists of only one file, autoFlow.py, which is easy to use and requires no installation!

Requirements

PyTorch >= 1.9.0

Quick Start

git clone this repository by

git clone https://github.com/gasharper/autoFlow.git

In our repository, autoFlow.py is the core framework file, while the simple_test.py is a quick start python script to learn how to use this framework.

You can run the following command to test and learn this framework:

python simple_test.py

In simple_test.py script, we built the simplest PyramidFlow (w/o Volume Normalization and other tricks, only two layer) as a test model. You can flexibly build your own model in a similar way.

Training Demo

The Official implementation of PyramidFlow is released at here. If you have any issues in reproducing our work, please create a new issue.

Note

The autoFlow framework is the core framework used in our work (PyramidFlow, CVPR 2023), which is more powerful and user-friendly than memcnn or FrEIA. If it is helpful, please star this repository and cite our work.

@article{lei2023pyramidflow,
  title={PyramidFlow: High-Resolution Defect Contrastive Localization using Pyramid Normalizing Flow},
  author={Jiarui Lei and Xiaobo Hu and Yue Wang and Dong Liu},
  journal={CVPR},
  year={2023}
}

autoflow's People

Contributors

gasharper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

autoflow's Issues

如何训练模型?

你好,在工程文件中只有模型的核心代码,后续会开源训练代码吗?或者我该如何训练它?希望得到解答,谢谢!

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.