imlixinyang / HiSD

Official pytorch implementation of paper "Image-to-image Translation via Hierarchical Style Disentanglement" (CVPR 2021 Oral).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-tag task

jackskr666 opened this issue · comments

tags:

name: Bangs
tag_irrelevant_conditions_dim: 2
attributes: 
  -
    name: 'with'
    filename: datasets/Bangs_with.txt
  -
    name: 'without'
    filename: datasets/Bangs_without.txt
  • name: Eyeglasses
    tag_irrelevant_conditions_dim: 2
    attributes:

    name: 'with'
    filename: datasets/Eyeglasses_with.txt
    
    • name: 'without'
      filename: datasets/Eyeglasses_without.txt

if I want to make experiment on Multi-tag task, how to replace Multi-tag task on celeba-hq.yaml setting?

Hi, here are the steps:

  1. please refer to (https://github.com/imlixinyang/HiSD/blob/main/preprocessors/celeba-hq.py) and modify it for your desired tags and attributes. You will get some datasets/Tag_attribute.txt files if succeed.
  2. modify the config file to use the your own datasets/Tag_attribute.txt files.
  3. train.

if I changing the style of hair while changing the style of glasses, so my custom.yaml modify follow the settings?

tags:

name: Eyeglasses_black
tag_irrelevant_conditions_dim: 2
attributes: 
  -
    name: 'with'
    filename: datasets/Eyeglasses_with.txt
  -
    name: 'without'
    filename: datasets/Eyeglasses_without.txt
  -
    name: 'black'
    filename: datasets/HairColor_black.txt

This config file is only for training. If you want to edit multiple tags in inference, you should edit code in here.

Thank you very much, I find facial age transformation in supplementary. How to generate age 7-9’/‘10-14’/‘15-19’/‘20-29’/‘30-39’/‘40-49’/‘50-69 in test.py?

Hi @jackskr666, sorry for the late reply.
For age transformation, we use the images from FFHQ dataset and the labels provided by FFHQ-aging. You may process them into the label structure of HiSD to reproduce this experiment.