Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StyleGene: Crossover and Mutation of Region-level Facial Genes for Kinship Face Synthesis #56

Open
vitalwarley opened this issue Feb 4, 2024 · 3 comments
Assignees

Comments

@vitalwarley
Copy link
Owner

vitalwarley commented Feb 4, 2024

Link.

Selecionando esse paper para a disciplina de IA Generativa.

@matheuslevi11 talvez possa ser uma possibilidade do seu TCC também. @tfvieira, o que acha?

@vitalwarley
Copy link
Owner Author

Por exemplo, uma sugestão seria avaliar o impacto de "completar" o FIW com mais amostras por indivíduo em famílias pequenas. Outra ideia é considerar o viés de idade: adicionar mais pares negativos de forma a aproximar a distribuição dos deltas de idade àquela dos pares positivos.

@matheuslevi11
Copy link
Collaborator

Opa, vou dar uma lida no paper

@matheuslevi11
Copy link
Collaborator

StyleGene possui um repositório com interface gráfica e os pesos do modelo pré-treinado, o que facilita a sua reprodução. Tive problemas com a interface gráfica, o código também não está adaptado para imagens PNG que possuem um quarto canal, de transparência, portanto testei o modelo a partir deste código:

from PIL import Image
from models.stylegene.api import synthesize_descendant

father = np.array(Image.open('/path_to_father_image'))
mother = np.array(Image.open('/path_to_mother_image'))

attributes = {'age': "0-2", 'gender': "male", 'gamma': 0.47, 'eta': 0.4}

imgf, imgm, img_c  = synthesize_descendant(father, mother, attributes)
Image.fromarray(img_c).show()

Opções de atributos:

  • Idade: ["0-2", "3-9", "10-19", "20-29", "30-39", "40-49", "50-59", "60-69", "70+"]
  • Gênero: ["male", "female"]
  • Gamma e Eta: Entre 0 e 0.47

No geral, o cabelo não fica muito bom, o background é consistente, e a qualidade da face em si é boa, abaixo um exemplo masculino e um feminino que gerei:
tmpvicb42q4
tmp96joerkz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants