Giter Club home page Giter Club logo

clothflow's Introduction

Implementation Clothflow (Here is a paper's link.)

Result

image

What we did

  • head swap
  • change cloth
  • generate neck & arms considering skin color.

(If you want to show more detail, go to etc folder.)

Stage 0

We used a MVC dataset. Please download this first.

  • Resize

Image's original size is (1920, 2240), but this is too big to learn for computer. So, we need to resize this.

Before run this code, you must be set TARGET_SIZE and base_dir.

python resize.py
  • Segmentation

Use opensource for segmentation. You must save images in 'p','1','2',3',... in image folder.

We use CIHP_PGN.

(128,0,0),(255,0,0),(0,85,0),(170,0,51),(255,85,0)
1=Hat, 2=Hair, 3=Glove, 4=Sunglasses, 5=UpperClothes
(0,0,85),(0,119,221),(85,85,0),(0,85,85),(85,51,0)
6=Dress, 7=Coat, 8=Socks, 9=Pants, 10=Neck
(52,86,128),(0,128,0),(0,0,255),(51,170,221),(0,255,255)
11=Scarf, 12=Skirt, 13=Face, 14=LeftArm, 15=RightArm
(85,255,170),(170,255,85),(255,255,0),(255,170,0)]
16=LeftLeg, 17=RightLeg, 18=LeftShoe, 19=RightShoe

  • Pose

Use opensource for pose. You must save images in 'p','1','2',3',... in image folder.

We use pytorch_Realtime_Multi-Person_Pose_Estimation.

  • Crop

Crop clothes from person's image.

Before run this code, you must be set TARGET_SIZE, IS_TOPS, base_dir. The meaning of IS_TOPS is whether you are learning tops or bottoms.

python crop.py
  • Split

Split train data and test data.

Before run this code, you must be set base_dir.

python stage0/split.py
  • Make pair txt

Make pair in same clothes image.

Before run this code, you must be set base_dir.

python mkpairtxt.py

Hyper Parameters

It is in utils.py.

  • PWD

    • your repository's full path
    • str(ex : '/home/fashionteam/ClothFlow/')
  • IS_TOPS

    • whether to wear tops or bottoms
    • bool(ex : True)
  • REAL_TEST

    • test for training or not
    • bool(ex : True)
  • TENSORBOARD

    • how to display for you(tensorboard or console log)
    • bool(ex : True)

Stage 1

Change condition cloth mask to target cloth mask

title

  • Train

python stage1/train.py
  • Warped_Mask

python stage1/test.py

-> result/warped_mask & test/warped_mask

Result image

Stage 2

Warp

title

  • Train

We need a warped_mask folder.

python stage2/train.py
  • Warped_Cloth

python stage2/test.py

-> result/warped_cloth & test/warped_cloth Result image

Stage 3

wear cloth

title

  • Train

We need warped_mask, warped_cloth folders.

python stage3/train.py

Result image

  • Final Result

python stage3/test.py

-> result/final & test/final

Inference

python inference.py

clothflow's People

Contributors

adldotori avatar amy-hyunji avatar minsoh avatar dependabot[bot] avatar

Watchers

 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.