yijunmaverick / generativefacecompletion Goto Github PK
View Code? Open in Web Editor NEWThe source code of CVPR17 'Generative Face Completion'.
License: Other
The source code of CVPR17 'Generative Face Completion'.
License: Other
I have encountered a problem when I ran the demo_face128.m.
Error occurs at line 36: net = caffe.Net(net_model, net_weights, phase);
It shows that:
Error parsing text-format caffe.NetParameter: 372:18: Message type "caffe.LayerParameter" has no field named "upsample_param".
Is that I failed to compile caffe? but I run make matcaffe and mattest successfully
Do you know how to solve it? Thank you!
Hello, I have read this paper.
I'd like to use this network to process images much larger than 128X128 and the fully-connected layers (FC) will limit the dimension of input,so I wonder that what if you drop that two FC layers in Generator?
If you have conducted such experiments, could you please share the results to me. Thanks
i want to download this model_parsing and model , but the google drive tell me no permission.
Hi @Yijunmaverick ,
When I was trying to run your parsing demo, I can not get it work correctly. I implemented your demo in python by following the matlab code step by step. However, the output (as shown below) does not give a good segmentation result. Could you please help me to point out what is wrong with the following code? Or maybe the .caffemodel file itself is not the correct one?
Thanks,
Haofu
import caffe
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
model_def = "Model_parsing.prototxt"
model_weights = "Model_parsing.caffemodel"
net = caffe.Net(model_def, model_weights, caffe.TEST)
caffe.set_mode_cpu()
image_file = "../../repos/gfc/matlab/FaceCompletion_testing/TestImages/182701.png"
image = np.array(Image.open(image_file))
# preprocessing the image to fit the net requirement
input_ = image / 255.0
input_ = input_ * 2 - 1
input_ = input_.transpose(2, 0, 1)
input_ = input_[np.newaxis, ...]
net.blobs['data'].reshape(*input_.shape)
net.blobs['data'].data[...] = input_
output = net.forward()
scores = output['conv_decode0'][0]
segmentation = scores.argmax(0)
segmentation_rgb = np.zeros(image.shape, dtype=np.uint8)
colors = [
[0, 0, 255],
[255, 255, 0],
[160, 32, 240],
[218, 112, 214],
[210, 105, 30],
[94, 38, 18],
[0, 255, 0],
[156, 102, 31],
[0, 0, 0],
[255, 127, 80],
[255, 0, 0]
]
for i in range(11):
segmentation_rgb[np.where(segmentation == i)] = colors[i]
plt.figure(1)
plt.subplot(121)
plt.imshow(image)
plt.subplot(122)
plt.imshow(segmentation_rgb)
@Yijunmaverick hello:
when i make the caffe you provided,i meet a error: too few arguments to function ‘cudnnStatus, then i change the version of caffe,i use the i made already,and put the folder FaceCompletion_testing in my own caffe/matlab ,but when i run the demo_face128.m,the matlab collapsed.
can you give me some suggestions。 thank you!
hero , when run the 'demo_face128.m',I encounter a problem 'Matlab has encountered an internal problem and needs to close',what should i do ?
i use cuda 8.0 cudnn 5.1 matlab 2016a , matcaffe compile sucessedly,win 10 ;
however when i run the demo on the ubuntu 14.04 cuda 8.0 cudnn 7.5 matlab 2014a matcaffe compile sucessedly ,still this problem .
hi,python how to run
thanks
您好
很早之前就看了您的论文,在gan的应用领域里真的非常好,其中几个损失函数让我记忆尤新,最近在做人脸老化问题,也希望可以用到人脸矫正损失函数,可是我用的代码是tensorflow,无法对您的模型引用,希望您能把网络模型告诉我,我好完成您模型在tensorflow上的重建,非常感谢
@Yijunmaverick Hi, I want to know the version of google protobuf, thank you!
When i compile the project, i get an incompatible error about protocol buffer headers.
In my machine:
protoc --version
libprotoc 2.5.0
@Yijunmaverick
when i ran the demo.training.m for training , the matlab showed these errors,:
Error in caffe.get_solver (line 7)
pSolver = caffe_('get_solver', solver_file);
Error in caffe.Solver (line 22)
self = caffe.get_solver(varargin{:});
Error in GFC_caffeinit (line 6)
Solver_ = caffe.Solver(solver_file); % c++
Error in demo_GFC_training (line 22)
[Solver_G_, Solver_G] = GFC_caffeinit(solver_file_G, save_file_G);
but i ran make matcaffe successfully, have you encountered this problem before?
I use matlab2015b.
When I run ./matlab/FaceCompletion_training/demo_GFC_training.m, it shows caffer error(undefined caffe or caffe.Solver).
I find the error word is 'Solver_ = caffe.Solver(solver_file)' in GFC_caffeinit.m.
Have you meet this problem, and do you know how to solve it?
Thanks.
Hi,
I tried testing your pretrained Model_G provided here. I tested a sample image that comes in the ./matlab/FaceCompletion_testing/TestImages/ folder with your pretrained model using the ./matlab/FaceCompletion_testing/demo_face128.m file. However, the completion results looks bad. It just seems like a brown plain color and no face completion.
Also, in the demo_face128.m file, there seemed to have been a bug where line 63 was scores = scores{1} which was a 64x64x32 tensor. I changed it to scores = scores{5} which infact was a 128x128x3 sized tensor. Can you tell me what's going wrong here. Thanks.
Hello, im wondering what is the combination of Ubuntu, MATLAB, gcc, g++, cuda and cudnn to build matcaffe?
I have Ubuntu 16.04 with gcc 5.4, CUDA 9.2 and cudnn 7.5. Works well with caffe make test but not with make matcaffe.
Matlab 2015a - 2016a need gcc 4.7
Matlab 2016b - 2017b need gcc 4.9
matlab 2018a - 2019b need gcc 6.3
@Yijunmaverick while running the demo, the matlab shows a error like this:
Error using caffe_
Could not open file model/Model_G_solver.prototxt
is it my path?
@Yijunmaverick Hi !See your item , i'm very intresting ! But , i can't build it ! Because of the caffe version is not confirm!!!
at Setup Introduction
We use the caffe version v2.5.48. Please refer Caffe for more installation details ! What's means caffe v2.5.48 ?????
Hi, I train the model only with the reconstruction loss, than using the caffemodel to do the next train. However, I cannot obtain the expect result. So, dose it means that I shouldn't consider the local D, global D and face parsing when I train only with reconstruction loss. And how many iterations do you train in celebA?
I want to know the version of the cudnn,thank you!
Hello,
I am interested in your code. Is it possible to make the User editing demo available as well? That would be very nice.
Thank you, Tobias
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.