Comments (3)
the same question:where is the val_40_att_list.txt and test_40_att_list.txt
from face-attribute-prediction.
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.
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?
from face-attribute-prediction.
Related Issues (12)
- pretrained model HOT 4
- wrong email address?
- pre-trained model HOT 2
- Model can't converge?
- There is no definition of "Bar" in utils HOT 1
- How do I need to crop and predict a custom image? ? HOT 1
- KeyError: 'resnet18' HOT 1
- Can you please provide trained model weight?
- how to test it on new images?
- Expected more than 1 value per channel when training HOT 1
- little typo in mail address HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from face-attribute-prediction.