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

where can I get "celeA train test val.txt"? #5

Open
xugangtongji opened this issue Jul 1, 2019 · 3 comments
Open

where can I get "celeA train test val.txt"? #5

xugangtongji opened this issue Jul 1, 2019 · 3 comments

Comments

@xugangtongji
Copy link

did you make it by yourself? what the format of it?

@yisampi
Copy link

yisampi commented Jul 5, 2019

the same question:where is the val_40_att_list.txt and test_40_att_list.txt

@yumaofan
Copy link

I've solved it.
The list_eval_partition.txt and list_attr_celeba.txt file can be download from celebA official site.

import os

train_list = []
val_list = []
test_list = []
with open("Anno/list_eval_partition.txt") as f:
    for line in f.readlines():
        row = line.strip().split(" ")
        img_name = row[0]
        label = row[-1]
        if label == "0":
            train_list.append(img_name)
        if label == "1":
            val_list.append(img_name)
        if label == "2":
            test_list.append(img_name)

with open("Anno/list_attr_celeba.txt", encoding="utf-8") as f:
    for line in f.readlines():
        row = line.strip().split(" ")
        row = [i.replace("-1", "0") for i in row if i != ""]
        if len(row) == 41:
            img_name = row[0]
            if img_name in train_list:
                with open("train_attr_list.txt", "a", encoding="utf-8") as ff:
                    ff.writelines(" ".join(row) + "\n")
            if img_name in val_list:
                with open("val_attr_list.txt", "a", encoding="utf-8") as ff:
                    ff.writelines(" ".join(row) + "\n")
            if img_name in test_list:
                with open("test_attr_list.txt", "a", encoding="utf-8") as ff:
                    ff.writelines(" ".join(row) + "\n")

@Haoyayu
Copy link

Haoyayu commented Feb 22, 2023

I've solved it. The list_eval_partition.txt and list_attr_celeba.txt file can be download from celebA official site.

import os

train_list = []
val_list = []
test_list = []
with open("Anno/list_eval_partition.txt") as f:
    for line in f.readlines():
        row = line.strip().split(" ")
        img_name = row[0]
        label = row[-1]
        if label == "0":
            train_list.append(img_name)
        if label == "1":
            val_list.append(img_name)
        if label == "2":
            test_list.append(img_name)

with open("Anno/list_attr_celeba.txt", encoding="utf-8") as f:
    for line in f.readlines():
        row = line.strip().split(" ")
        row = [i.replace("-1", "0") for i in row if i != ""]
        if len(row) == 41:
            img_name = row[0]
            if img_name in train_list:
                with open("train_attr_list.txt", "a", encoding="utf-8") as ff:
                    ff.writelines(" ".join(row) + "\n")
            if img_name in val_list:
                with open("val_attr_list.txt", "a", encoding="utf-8") as ff:
                    ff.writelines(" ".join(row) + "\n")
            if img_name in test_list:
                with open("test_attr_list.txt", "a", encoding="utf-8") as ff:
                    ff.writelines(" ".join(row) + "\n")

Can you repeat the model? My model seems like not converge fast? Are the training parameters same as default? Is the training data same as original img_align_celeba?
image

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

4 participants