Integration caffe model to c# application

544 views
Skip to first unread message

Сергей Мельников

unread,
Jun 7, 2017, 1:02:14 PM6/7/17
to Caffe Users
Hello,

I'm new to caffe, previously I used MatConvNet for my researches. Now I got some results and want to add cnn classification to my application, which is written in C#. I tried to find any information about using caffe from c#, but failed. The best, that I found is c++ api. As I understand, I can manually convert my net from MatConvNet to Caffe in python, test it and than create c++ classifier and some wrapper from c#, which calls c++. It's a bit tricky, but still better than deploy matlab runtime to users. So my question is: did anybody try something similar?

Sergei

Przemek D

unread,
Jun 8, 2017, 3:47:45 AM6/8/17
to Caffe Users
I would suggest running two processes in parallel and communicating them using sockets for example. This way you could have load the network when the classifier process starts, and the front end would simply query it - this way you save the tremendous overhead of setting up the network.
You might want to look into C# and Python interprocess communication, as Python is mush easier than C++ to write a classifier in and set it up and running. Also there are examples for this approach online (although haven't seen any for caffe).

10948...@qq.com

unread,
Sep 28, 2017, 9:57:36 AM9/28/17
to Caffe Users
Hi,
Recently, I want to make a demo (C# winform/metroframework demo) about emotion recognition. We have used the matcaffe, and it can run successfully. But we want to transfer it to the c# code/demo. I 'm really confused that it can run ".\+caffe\reset_all.m". Do you solve the problems?  Help me. Thanks a lot.

在 2017年6月8日星期四 UTC+8上午1:02:14,Сергей Мельников写道:

10948...@qq.com

unread,
Sep 28, 2017, 9:59:56 AM9/28/17
to Caffe Users
Sorry, I mean that it can not run ".\+caffe\reset_all.m".

在 2017年9月28日星期四 UTC+8下午9:57:36,10948...@qq.com写道:
Reply all
Reply to author
Forward
0 new messages