Liusifei / Face_parsing_python

19 stars 6 forks source link

Model and proto files for python #2

Open huyvvo opened 6 years ago

huyvvo commented 6 years ago

Thank you for the python version of face parsing. Could you also share the model and proto files for Python? I tried the model for matlab but it does not work in python with the following error message:

huy@Dom:~/Face_parsing_python/python_scripts$ python Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 18:10:19) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import caffe import test ls Traceback (most recent call last): File "", line 1, in NameError: name 'ls' is not defined args = test.parse_arges() Traceback (most recent call last): File "", line 1, in AttributeError: module 'test' has no attribute 'parse_arges' args = test.parse_args() args Namespace(device_id=2, model='models/face_parsing_v1_iter_20800.caffemodel', proto='models/face_parsing_v1_test4one.prototxt', root_dir='/Data/') net = caffe.Net(args.proto, args.model, caffe.TEST) WARNING: Logging before InitGoogleLogging() is written to STDERR W0623 13:34:52.418781 6606 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface W0623 13:34:52.418848 6606 _caffe.cpp:140] Use this instead (with the named "weights" parameter): W0623 13:34:52.418864 6606 _caffe.cpp:142] Net('models/face_parsing_v1_test4one.prototxt', 1, weights='models/face_parsing_v1_iter_20800.caffemodel') [libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format caffe.NetParameter: 456:16: Message type "caffe.LayerParameter" has no field named "resize_param". F0623 13:34:52.425428 6606 upgrade_proto.cpp:90] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: models/face_parsing_v1_test4one.prototxt Check failure stack trace: Aborted (core dumped)

aarif96 commented 6 years ago

You need to build the caffe from the project. She has defined her own layers in the project which will get built only if you build caffe from the project

huyvvo commented 6 years ago

By building caffe from the project, do you mean that I need to use the caffe that she has given instead of downloading from http://caffe.berkeleyvision.org/installation.html?

lcybuzz commented 6 years ago

I think you should use provided caffe_dev which contains new defined layers such as Resize Layer. However, I still have some problems with proto and model files. Are they the same with the Matlab version? In test.py the output layer is named 'ae_prob', but it is not defined in the Matlab version proto. Besides, I use 'ae_label' as output and test some images, and the results seem not right. Have you solved this issue?@vohuy93

KeyuLi commented 6 years ago

Can you train this model successfully?@lcybuzz

lcybuzz commented 6 years ago

No. I just transfer the code from Matlab to Python and make some tests. It seems this repository is not complete. @KeyuLi

yanglinxiabuaaa commented 6 years ago

Is there any other way to handle face parsing? @KeyuLi @lcybuzz

KeyuLi commented 6 years ago

I have the the same question, I'm looking for python code about face parsing, but I haven't found it. @yanglinxiabuaaa

yanglinxiabuaaa commented 6 years ago

Also looking for python code about face parsing . What do you do with face parsing? GAN? @KeyuLi

KeyuLi commented 6 years ago

I'm not studying in face parsing, I just want to use it for other directions. So do you find any other codes? @yanglinxiabuaaa

yanglinxiabuaaa commented 6 years ago

I'm in the same situation as you, there's no good code to solve right now. 发自网易邮箱手机版 在2018年09月06日 16:52,Keyu Li 写道: I'm not studying in face parsing, I just want to use it for other directions. So do you find any other codes? @yanglinxiabuaaa — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

lcybuzz commented 6 years ago

It seems face parsing doesn't have many available codes. I just found one GuideSeg using two FCNs. But it only works on an old version Caffe. @KeyuLi @yanglinxiabuaaa

yanglinxiabuaaa commented 6 years ago

I also find it,Haven't tried yet!I am trying : Exemplar-Based-Face-Parsing. But Programming language is not Python,it use lua! @lcybuzz @KeyuLi

lcybuzz commented 6 years ago

Yes, this is a classic algorithm used by many papers as comparisons. But it is not based on DL. I wonder if the performance is good enough for using currently. How is your test results? @yanglinxiabuaaa

KeyuLi commented 6 years ago

OK, I will try this code GuideSeg later. @lcybuzz @yanglinxiabuaaa

yanglinxiabuaaa commented 6 years ago

There hasn't been a good result so far . Maybe I should try GuideSeg @lcybuzz

AviP1234 commented 5 years ago

Did you succeed to install this ( @lcybuzz , @yanglinxiabuaaa, @KeyuLi, @vohuy93 , @aarif96 )? I found this blog post: https://blog.csdn.net/bl128ve900/article/details/79863578 Did you try its recipes?

Thanks

oceanogeology commented 5 years ago

Dose anyone succeed to execute this repositary?