Coder Social home page Coder Social logo

yijunmaverick / generativefacecompletion Goto Github PK

View Code? Open in Web Editor NEW
317.0 317.0 95.0 3.85 MB

The source code of CVPR17 'Generative Face Completion'.

License: Other

CMake 2.91% Makefile 0.67% Shell 0.42% Python 8.77% C++ 80.37% Cuda 5.17% MATLAB 1.68% M 0.01%

generativefacecompletion's People

Contributors

yijunmaverick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generativefacecompletion's Issues

Specific version that support to build matcaffe

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

question about the fully-connected layer

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

User editing demo

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

Matlab problem

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.

caffe.solver problem

@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?

关于人脸矫正损失函数模型

您好
很早之前就看了您的论文,在gan的应用领域里真的非常好,其中几个损失函数让我记忆尤新,最近在做人脸老化问题,也希望可以用到人脸矫正损失函数,可是我用的代码是tensorflow,无法对您的模型引用,希望您能把网络模型告诉我,我好完成您模型在tensorflow上的重建,非常感谢

a problem about demo_GFC_training.m

I have encountered a problem when I ran the demo_GFC_training.m, the output always be the same color in a small phase, and the parsing always orange color . I dont't know the reason about it. I send you a picture about it. Thank you!

2017-11-03 22-34-47

Matlab has encountered an internal problem and needs to close

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 .

Bad image completion with pretrained model

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.

image

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.

the version of google protobuf

@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

Caffe doesn't declare its version in headers

@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 ?????

Train the model only with the reconstruction loss

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?

a problem about demo_face128.m

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!

error with test code

@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!

The parsing network does not give desired output

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)

image

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.