/image_transfer

An image transfer used tensorflow ๐ŸŽจ

Primary LanguagePythonApache License 2.0Apache-2.0

์ด๋ฏธ์ง€์— ํ™”๊ฐ€์˜ ํ™”ํ’ ์ž…ํžˆ๊ธฐ

์œ ๋ช…ํ™”๊ฐ€์˜ ์ž‘ํ’ˆ์„ ์„ ํƒํ•˜์—ฌ, ํ•ด๋‹น ์ž‘ํ’ˆ์˜ ํ™”ํ’์œผ๋กœ ์ด๋ฏธ์ง€๋ฅผ ๋ณ€ํ™˜์‹œ์ผœ์ฃผ๋Š” ํ”„๋กœ๊ทธ๋žจ์ž…๋‹ˆ๋‹ค.

๊ธฐ๋Šฅ ์†Œ๊ฐœ

tensorflow ๋ฐ tensorflowhub - magenta/arbitrary-image-stylization-v1-256 ๋ชจ๋ธ์„ ํ™œ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€๋ฅผ ์œ ๋ช…ํ™”๊ฐ€์˜ ์ž‘ํ’ˆ์˜ ํ™”ํ’์œผ๋กœ ๋ณ€ํ™˜์‹œ์ผœ์ค€๋‹ค.

Introduce

How To Use

ํ”„๋กœ์ ํŠธ ๊ฒฝ๋กœ๋กœ ์ด๋™ํ•˜์—ฌ ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•œ๋‹ค.

python style_transfer.py --content_img="./image/content/sample.png" --style_img="./image/portrait/sample_1.jpg"

ํŒŒ๋ผ๋ฏธํ„ฐ ์˜ต์…˜ ์„ค์ •

  • --content_img=[์ปจํ…์ธ  ์ด๋ฏธ์ง€ ๊ฒฝ๋กœ]
  • --style_img=[์Šคํƒ€์ผ ์ด๋ฏธ์ง€ ๊ฒฝ๋กœ]
  • --output_img=[๊ฒฐ๊ณผ ์ด๋ฏธ์ง€ ๊ฒฝ๋กœ]
  • --resize_width=[๊ฒฐ๊ณผ ์ด๋ฏธ์ง€ ํฌ๊ธฐ]
  • --model=[๋ชจ๋ธ ๋ฒ„์ „]

์‹คํ–‰ ํ™˜๊ฒฝ

๋‹ค์Œ ํ™˜๊ฒฝ ๋ฐ ๋ชจ๋“ˆ์ด ์„ค์น˜๋˜์–ด์•ผ ํ”„๋กœ๊ทธ๋žจ์„ ์‹คํ–‰ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์–ธ์–ด

  • Python 3.8 ์ด์ƒ

์‚ฌ์šฉ ๋ชจ๋“ˆ

  • TensorFlow 2.2 ์ด์ƒ
  • TensorFlow_Hub
  • numpy
  • pillow

์ถœ์ฒ˜