Code Monkey home page Code Monkey logo

bsuv-net-inference's Introduction

BSUV-Net: A Fully-Convolutional Neural Network forBackground Subtraction of Unseen Videos

This repository contains the source code of BSUV-Net algorithm as described in the following paper:

BSUV-Net: A Fully-Convolutional Neural Network forBackground Subtraction of Unseen Videos by M. Ozan Tezcan, Prakash Ishwar and Janusz Konrad.

BSUV-Net is a convolutional neural network which uses the concatenation of several images as input. The descriptions of these images can be found in the paper.

Currently source code contains only the trained models and inference code that can be applied to any video. examples folder includes an example video and its background subtraction result using BSUV-Net with and without FPM.

Requirements

  1. Python3 (testen on v3.6)
  2. PyTorch (tested on v1.3 and v1.4 with CUDA 10.1 on Ubuntu)
  3. OpenCV for Python (tested on version 4.2.0)
  4. YACS (pip install yacs should work)

Trained Models

Trained model which uses the RGB channels of empty background, recent background and current frame (9-channel input) can be downloaded at: https://drive.google.com/file/d/1q6a0RJuD54Gq8txw6TKPRRnC5xnSucLR/view?usp=sharing

Trained model which uses the RGB+FPM channels of empty background, recent background and current frame (12-channel input) can be downloaded at: https://drive.google.com/file/d/1ISzZyLDzuRuMnNmrZ3QVJCVeT_3eltDK/view?usp=sharing

Trained weights for BSUV-Net 2.0 (12-channel input) can be downloaded at: https://drive.google.com/file/d/12y2PMK8Ne7G27CI5Vx6hC2qkoF5cJo5I/view?usp=sharing

Trained weights for Fast BSUV-Net 2.0 (12-channel input) can be downloaded at: https://drive.google.com/file/d/12y944z5yPePy2RFPu8V4VQr9IfBhLjUM/view?usp=sharing

Usage

  1. If you want to to use a model with FPM channel, download HRNet_v2 model files from http://sceneparsing.csail.mit.edu/model/pytorch/ade20k-hrnetv2-c1/ and place them in utils/segmentation/hrnet_v2 folder.
  2. Change configs/infer_config.py based on your application.
  3. Run python inference.py <vid_in> <vid_out> where <vid_in> is the path to the input video and <vid_out> is the desired output path.

bsuv-net-inference's People

Contributors

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