Skip to content

Using BodyPix body segmentation to extract image background and apply style transfer to it with arbitrary fast style transfer

Notifications You must be signed in to change notification settings

sina-jamshidi/background-filters-with-style-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Background Filters with Style Transfer

This project uses TensorflowJS's BodyPix model to perform body segmentation to extract an image background. Then using Reiichiro Nakano's arbitrary style transfer models a style transfer is applied to the background.

For reference, there's also simple grayscale and sepia filters to use.

The style transfer model is based on an InceptionV3 model and distilled down in size with a MobileNetV2 network. You can check their repo for more details.

Demo:

Check out the segmenting and style transfer for yourself! https://background-filters.herokuapp.com/

Improvements:

Obviously the style transfer is not preserving enough style details (outside of colour) to be really satisfactory. Furthermore, the body segmentation is quite rough. So upcoming improvements are:

  1. Experiment with different models. Including porting different models such as Avatar-Net and AdaIN to test their performance
  2. Implement feathering into the segmentation processing for a cleaner body segmentation

About

Using BodyPix body segmentation to extract image background and apply style transfer to it with arbitrary fast style transfer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published