8000 GitHub - klickmal/autoencoder_for_background_extraction: This small project shows how to use autoencoder to extract the background from images.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

klickmal/autoencoder_for_background_extraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Autoencoder_for_Background_Extraction using Tensorflow and Keras

Background extraction is an import step for background subtraction. This small project shows how to model background using convolutional autoencoder. The principle is that we treat the foreground of images as noises and use autoencoder to rebuild the missing informations.

Autoencoder in Keras

Create some folders at the same level as the file "Autoencoder.py" before running it

  • train_image: this folder for the training images. Here 200 images were used for training autoencoder. The dataset can be found in changedetection.net [4].
  • test_image: this folder for the testing images
  • save_img: save the predicted backgrounds
  • model_save: save the model of autoencoder

Autoencoder in Tensorflow

The codes base on the project[1] which provides pure tensorflow code to build a convolutional autoencoder. Here the ssim index [2] is used as the loss function. The tensorflow code of ssim can be found in [3].

At first you should creat some folders at the same level as the file "convolutional_autoencoder.py":

  • train_image: this folder for the training images. Here 200 images were used for training autoencoder. The dataset can be found in changedetection.net [4].
  • test_image: this folder for the testing images
  • test_gray: save the gray-scale images of testing image
  • saver: save the model of autoencoder
  • background: save the predicted backgrounds

The following images show the result of AE in Tensorflow. The first image is the input image.
Original_Image
The second image is the predicted background.
Background_Image

Reference

About

This small project shows how to use autoencoder to extract the background from images.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0