Giter Club home page Giter Club logo

Comments (3)

yisampi avatar yisampi commented on June 2, 2024

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

from face-attribute-prediction.

yumaofan avatar yumaofan commented on June 2, 2024

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")

from face-attribute-prediction.

Haoyayu avatar Haoyayu commented on June 2, 2024

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

from face-attribute-prediction.

Related Issues (12)

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.