Skip to content

Live In Your Style for style transferring background via AI

Notifications You must be signed in to change notification settings

pschang-phy/LIYS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live In Your Style

This is project Live In Your Style, which has objective

  • Segment person in an image frame and style transfer background
  • Integrate with cloud computing and edge application

This repository is the source code for training required deep learning model. And its integration applications.


Code base structure

In this code base, it maintains the code for two model-related tasks

  • Segmentation (2 classes, background and person)
  • Style transfer

In the top folder, it has subdirectories

  • Libs

    The required libraries or model code will be in here. For example, because we use DeeplabV3+ model and Slim library from Tensorflow, a copy of their code base will be placed in here.

  • Segmentation

    This could be a workspace for the preparation of segmentation model. It may contains the training, validation, test tools.

  • StyleTransfer

    Similar to Segmentation folder, this folder is a workspace for the preparation of style transfer model.

Workspace Environment

For each workspace folder, Segmentation and StyleTransfer, it has 2 shell scripts, under bin folder, to activate and deactivate the working environment.

  • activate.sh
  • deactivate.sh

After launching the activate.sh script

$ source activate.sh

current environment will be activated to facilitate working on model-related tasks by

  • Set proper environment variables
    • TOP

      It stores the full path of this code base. You could inspect it by

      $ echo $TOP 
      /home/jovyan/AT073_10_Orig_Style

      Or use it to refer your file in your code base, for example

      $ python ${TOP}/Segmentation/bin/train.py
      
    • WORKENV

      It stores string about the variant of activated working environment, it may be one of Segmentation or StyleTransfer. You could inspect it by

      $ echo $WORKENV
      Segmentation
  • Add the path of required Python libraries in PYTHONPATH
  • Create shortcuts, in bin folder, for useful tools

To reset the activated working environment, just run as below

$ source ${TOP}/${WORKENV}/bin/deactivate.sh

It will clear stuff that the activate.sh setup.

About

Live In Your Style for style transferring background via AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published