Giter Site home page Giter Site logo

brunosauvalle / ae-ne Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 5.0 4.45 MB

Original implementation of the model AE-NE described in the paper " Autoencoder-based background reconstruction and foreground segmentation with background noise estimation"

License: MIT License

Python 100.00%

ae-ne's Introduction

AE-NE : Autoencoder with background noise estimation for background reconstruction and foreground segmentation

Implementation of the model AE-NE described in the paper " Autoencoder-based background reconstruction and foreground segmentation with background noise estimation"

BMC008.mp4
turbulence.mp4
zoom_in_zoom_out.mp4
continuous_pan.mp4

Requirements

The model needs Pytorch (>= 1.7.1) and Torchvision with cuda capability (see https://pytorch.org/ )

The model also needs OpenCV (>=4.1) (see https://opencv.org/ )

To install other requirements:

pip install -r requirements.txt

The model has been tested on Nvidia RTX 2080 TI and Nvidia RTX 3090 GPU for image_sizes lower than 1000x1000

Higher image resolutions are also supported but may require reducing the default batch size in order to avoid GPU memory overflow and updating other hyperparameters such as learning rate and number of steps accordingly

How to use the model

the command to generate the backgrounds and foreground masks from a sequence of frames is

python main.py --input_path your_input_path 

where your_input_path is the path to the folder where the frame sequence is saved. Example : python main.py --input_path /workspace/Datasets/CDnet2014/dataset/baseline/highway

the result background images and foreground masks will be stored in two subdirectories 'results' and 'backgrounds' the current working directory.

To view options, type python main.py -h

The default training mode is fully unsupervised. A weakly supervised option is also implemented, where the number of training iterations and the background complexity have to be provided as inputs to the model.

Evaluation

To evaluate the AE-NE model on the CDnet 2014 dataset:

  • download the CDnet 2014 dataset from the following link :
http://jacarini.dinf.usherbrooke.ca/static/dataset/dataset2014.zip

and save it in some folder

  • update the dataset path in the end of the python file "test_CDnet.py"
  • to perform a partial test, update the category list in the end of the python file "test_CDnet.py"
  • run the python program test_CDnet.py

Warning : Different runs of the model with the same inputs may lead to small differences in evaluation results compared to the published results due to the random initialization of the autoencoder and the random sampling of the images during training.

To evaluate the model on the non video datasets Clevrtex, Shapestacks and ObjectsRoom, see AST repository

ae-ne's People

Contributors

brunosauvalle avatar

Stargazers

 avatar Nguyễn Văn Thiệu avatar  avatar Wenhao Guo avatar Zijun avatar ZARANT avatar Srinivas Venkatanarayanan avatar  avatar 宋启平 avatar Yuchen Yang avatar Richard Higgins avatar  avatar  avatar

Watchers

 avatar

ae-ne's Issues

How do I pass in 1920*1080 video?

When I looked at your source code, I found that it does not support high resolution images. Is there any algorithm that supports 1920*1080 images?

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.