-
Notifications
You must be signed in to change notification settings - Fork 41
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
Confused in dataloader #1
Comments
Can you run the code successfully? |
@et148 No,first,the dataloader should read the txt,I tried to guess and pass. But the author use the vgg net in net.py, and it must read the conv args. I downloaded the parameters in the pytorch pretained model zoo,but failed to match.. If you can run,please help! |
Sorry for the late reply. Since the DDL of CVPR is coming, we have no time for this repo. We will update it in November. |
@CrystalWong2 |
@CrystalWong2 |
You can download the vgg model in "https://bethgelab.org/media/uploads/pytorch_models/vgg_conv.pth". |
@CodingMice |
I do not use the muti-gpu training. If I have more gpus, I will try it. |
@CodingMice Thank you so muc. I can run it successfully. I am not very familiar with pytorch. I tried to train the model with my own database. But it seems to fail to train.Because in the solver_makeup.py,the params self.i always be 0. I don't know why. If you know,please help. |
Maybe you should firstly check self.data_loader_train. In other word, the dataloader is what you want. |
@CodingMice @CrystalWong2 I have downloaded the code and the BeautyGAN dataset(named makeup_dataset). So how to run the code successfully? I am new to this area and I quite wonder what the "train_xxx.txt" means(error: No such file or directory: './data/images/train_SYMIX.txt'). Do I need to create such txt and what should the txt contain? Thanks a lot. |
feature[:28] or feature[:18]? |
@TalentedMUSE Hey is it any chance for you to share with your code? |
@DanielMao2015 Here is my code to generate the txt file. import os
import sys
import random
"""Among 3834 images, we randomly select 100 non-makeup images and 250 makeup images for test.
The remaining images are separated into training set and validation set."""
train_non_makeup_labels = 'train_SYMIX.txt'
train_makeup_labels = 'train_MAKEMIX.txt'
test_non_makeup_labels = 'test_SYMIX.txt'
test_makeup_labels = 'test_MAKEMIX.txt'
data_path = '/home/xxx/data/makeup_dataset/'
# Windows测试文件夹
# data_path = 'E:/Datasets/makeup_dataset/'
makeup_path = 'all/images/makeup/'
non_makeup_path = 'all/images/non-makeup/'
makeup_files = os.listdir(os.path.join(data_path, makeup_path))
non_makeup_files = os.listdir(os.path.join(data_path, non_makeup_path))
# 每次生成的文件都是随机的
random.shuffle(makeup_files)
random.shuffle(non_makeup_files)
test_non_makeup_files = non_makeup_files[:100]
train_non_makeup_files = non_makeup_files[100:]
test_makeup_files = makeup_files[:250]
train_makeup_files = makeup_files[250:]
with open(os.path.join(data_path, train_non_makeup_labels), 'wt') as f:
for file_name in train_non_makeup_files:
file_path = os.path.join(non_makeup_path, file_name)
mask_file_path = file_path.replace('images', 'segs')
f.write(file_path + ' ' + mask_file_path)
f.write('\n')
with open(os.path.join(data_path, train_makeup_labels), 'wt') as f:
for file_name in train_makeup_files:
file_path = os.path.join(makeup_path, file_name)
mask_file_path = file_path.replace('images', 'segs')
f.write(file_path + ' ' + mask_file_path)
f.write('\n')
with open(os.path.join(data_path, test_non_makeup_labels), 'wt') as f:
for file_name in test_non_makeup_files:
file_path = os.path.join(non_makeup_path, file_name)
mask_file_path = file_path.replace('images', 'segs')
f.write(file_path + ' ' + mask_file_path)
f.write('\n')
with open(os.path.join(data_path, test_makeup_labels), 'wt') as f:
for file_name in test_makeup_files:
file_path = os.path.join(makeup_path, file_name)
mask_file_path = file_path.replace('images', 'segs')
f.write(file_path + ' ' + mask_file_path)
f.write('\n') |
txt file generator
|
Hello,I'm very interested in this. But I ran the code, there are so many options. And I aslo download the database.But I am not sure which args means non-make up picture,please help
The text was updated successfully, but these errors were encountered: