Comments (17)
Can you run the code successfully?
from beautygan_pytorch.
@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!
from beautygan_pytorch.
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.
from beautygan_pytorch.
@CrystalWong2
Yes,the vgg pretrained model found on the network cannont match because the auther has made some modifications to the vgg network and the parameter names are different。If you want to run successfully,you can use the vgg network that comes with torch,just "self.vgg=models.vgg16(pretrained=True).features[:28]" or you can modify the network and model parameters to make them match
from beautygan_pytorch.
@CrystalWong2
Notice that "import torchvision.models as models"
from beautygan_pytorch.
@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!
You can download the vgg model in "https://bethgelab.org/media/uploads/pytorch_models/vgg_conv.pth".
from beautygan_pytorch.
@CodingMice
Thank you!By the way,can you use multi-gpu training? I have tried many times but still failed
from beautygan_pytorch.
I downloaded and tried,but I think if need to match the author‘s network it need more work.
’
from beautygan_pytorch.
I downloaded and tried,but I think if need to match the author‘s network it need more work.
’
I have run it successfully. It is the model of vgg loss in "addings", not the pretrained model of Beautygan.
from beautygan_pytorch.
@CodingMice
Thank you!By the way,can you use multi-gpu training? I have tried many times but still failed
I do not use the muti-gpu training. If I have more gpus, I will try it.
from beautygan_pytorch.
@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.
@et148 @CodingMice
from beautygan_pytorch.
@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.
@et148 @CodingMice
Maybe you should firstly check self.data_loader_train. In other word, the dataloader is what you want.
from beautygan_pytorch.
@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.
from beautygan_pytorch.
@CrystalWong2
Yes,the vgg pretrained model found on the network cannont match because the auther has made some modifications to the vgg network and the parameter names are different。If you want to run successfully,you can use the vgg network that comes with torch,just "self.vgg=models.vgg16(pretrained=True).features[:28]" or you can modify the network and model parameters to make them match
feature[:28] or feature[:18]?
from beautygan_pytorch.
@TalentedMUSE Hey is it any chance for you to share with your code?
from beautygan_pytorch.
@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')
from beautygan_pytorch.
@TalentedMUSE Hey is it any chance for you to share with your code?
txt file generator
import os
file_path = "/BeautyGAN_pytorch/data/images/makeup"
path_list = os.listdir(file_path)
path_name=[]
for i in path_list:
path_name.append(i)
path_name.sort()
num=0
for file_name in path_name:
num += 1
if num>2400:#1115
with open("/BeautyGAN_pytorch/data/test_MAKEMIX.txt","a") as f:
f.write(str(file_name)+' '+ str(file_name) + "\n")
f.close()
from beautygan_pytorch.
Related Issues (15)
- Why choose 6 residual blocks in the generator but not 9 as in CycleGAN? HOT 2
- Excuse , I have a question, what does the para --cls_list means ? HOT 1
- MT-dataset HOT 2
- Could you please share MTdataset? HOT 1
- The process of face parsing HOT 1
- Makeup Transfer Dataset link was broken HOT 1
- makeup loss HOT 7
- Is there no code to extract the mask or I missed it? HOT 4
- [Errno 2] No such file or directory: 'addings/vgg_conv.pth'
- About update the code.
- pretrained vgg weight HOT 1
- How to run the code
- A Guide To Run The Code HOT 44
- Pretrained model
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 beautygan_pytorch.