Git Product home page Git Product logo

predefinedfilternetworks's Introduction

Pre-defined Filter Networks

Pre-defined Filter Convolutional Neural Networks (PFCNNs) are CNNs where the n x n convolution kernels with n>1 are pre-defined and constant during training. Training occurs end-to-end by simply finding linear combinations of the outputs of the pre-defined filters using gradient descent. This repository implements a PFCNN as a residual network with depth-wise convolution. In the n x n convolution operations with n > 1 the filters can be freely chosen by the user. The implementation currently focuses on edge filters with different orientations.

Get started:

Clone this repository, either by downloading the files in zipped format directly from Github or using:

git clone https://github.com/Criscraft/HackathonDigitaltag2022.git

Go to the folder where you have downloaded/cloned the Git

cd PredefinedFilterNetworks

We recommend to use a virtual environment. There are many options how to setup virtual environments. Please have a look at conda or venv. For example if you wish to work with conda you can create a new Python environment using:

conda create --name myenv python=3.8 pip

If you prefer, you can give any desired name for the created enviorment by replacing myenv with your desired name. Subsequently, activate the enviorment with:

conda activate myenv

Install the requirements from the requirements.txt file:

pip install -r requirements.txt

Please test, if you have GPU support. Open an interactive python session

python

and type

import torch
print(torch.cuda.is_avaliable())

The output should be "True". If not, please check if your CUDA version is up-to-date. Then, go to the Pytorch website, insert your specifications there. You will receive an install command for pytorch that suits your CUDA version. After installing the Pytorch version that suits your setup you should have GPU support.

Get started:

The repository contains a script "example.py" which shows how to load the HFNet model. You can run the script using:

python example.py

Requirements

Tested for Python 3.8.0

numpy==1.23.2
Pillow==9.2.0
torch==1.12.1+cu116
torchinfo==1.7.0
torchvision==0.13.1+cu116

predefinedfilternetworks's People

Contributors

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