Giter Site home page Giter Site logo

hairdyeing-api's Introduction

HairDyeing-api

main.py를 통해 염색 이미지를 생성할 수 있는 방법은 2가지 입니다.

아래 방법을 통해 이미지를 생성하기 위해서는 Face parsing, SEAN의 pretrained 모델을 다운 받아, pretrained_network 폴더에 담아주세요.

pip install -r requirements.txt

위 명령어를 통해 필요한 패키지들을 설치할 수 있습니다.

1. Reference 이미지 이용

: 머리 색을 가져오고싶은 reference 이미지가 있는 경우

1) data/ref, data/src 폴더 생성

2) data/ref 폴더에는 reference 이미지를, data/src 폴더에는 source 이미지를 저장

3) python main.py --mode custom 

2. 미리 저장된 색으로 염색

: pkl 파일(Python 3.8 이상에서만 가능)에 미리 저장된 색을 이용해 염색하고자 하는 경우 (지원 색상 - black, brown, blond, red, blue)

1) data/src 폴더 생성

2) data/src 폴더에 source 이미지 저장

3) python main.py --mode {color_name}
   ex. python main.py --mode black

+pkl 파일 색상 코드 변경 또는 새로운 색상 추가하기

1) data/ref 폴더 생성

2) data/ref 폴더에 reference 이미지 저장

3) python main.py --mode save_color --color_name {color_name} 
   ex. python main.py --mode save_color --color_name pink

Reference

hairdyeing-api's People

Contributors

hyelinnam avatar

Stargazers

Seunghwan Choi 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.