Giter Club home page Giter Club logo

keras-octconv's Introduction

Keras Octave Convolutions (OctConv)


Keras implementation of the Octave Convolution blocks from the paper Drop an Octave: Reducing Spatial Redundancy in Convolutional Neural Networks with Octave Convolution.

Usage

Octave Convolutions are a semi-drop-in-replacement for regular convolution layers.

They are implemented in 3 major steps:

Intiailization of Dual Path Flow

Use the initial_octconv block from octave_conv.py to initialize the Octave convolution blocks. This function accepts a single input tensor, and returns two output tensors : The high frequency pathway and low frequency pathway tensors, in that order

ip = Input(...)

x_high, x_low = initial_conv(ip, ...)

Add any number of Octave Convolution Blocks

Once the two frequency pathways have been obtained, use any number of octconv_block from octave_conv.py to make the network larger.

NOTE:

Each of these blocks accept two input tensors, and emits two output tensors.

x_high, x_low = octconv_block(x_high, x_low, ...)
x_high, x_low = octconv_block(x_high, x_low, ...)
x_high, x_low = octconv_block(x_high, x_low, ...)

Merging the streams back together

Once you are finished adding octconv_blocks, merge the two frequency pathways using final_octconv from octave_conv.py.

This block accepts two input tensors and one output tensor.

x = final_octconv(x_high, x_low, ...)

...

Acknowledgements

This code is heavily based on the MXNet implementation by terrychenism at https://github.com/terrychenism/OctaveConv.

Requirements


  • Keras 2.2.4+
  • Tensorflow 1.13+ (2.0 support depends on when Keras will support it) / Theano (not tested) / CNTK (not tested)

keras-octconv's People

Contributors

titu1994 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.