Comments (3)
Because I have came across difficulty when reproducing DeepID2. It optimize the softmax loss and contrastive loss simultaneously. I must add an additional label layer to tell contrastive loss whether the two samples are the same/different class. It is stupid.
Then I modified the contrastive layer to determine the same/different class by itself. With my implementation, I just need two usual data layers created by convert_imageset.exe, where 'usual' means a data blob and its corresponding label blob. No need to write program to create the weird data db as in siamese network example.
Here (https://github.com/happynear/FaceVerification/blob/master/caffe_proto/mnist_siamese_train_test.prototxt) is an example of how to use my contrastive layer. I think it is the best way for using the contrastive layer. All I need is to ensure the two image list files are mutually correspond to each other.
from caffe-windows.
Thanks for the clarification. I am about to start using Caffe for a face verification project, so I might be using it in the same way as you do. I will keep an eye to your other repo as well since I am very interested on reproducing DeepID/CASIA/DeepFace results.
In any case, don't you think that it would be better to have two different contrastive loss layers, one with the original implementation and another one with your custom implementation? In this way, the original siamese network example would still work.
from caffe-windows.
I would rather to write a new example to introduce my contrastive layer. The usage of the original siamese network is really weird. Not only for the contrastive loss layer, but also for its two-way network definition. You can find that I used the concat_layer to combine the two-way network together. I think this is the right way to realize siamese network, too.
from caffe-windows.
Related Issues (20)
- how to use Contrastive/Triplet loss layer? Is there any train_val.ptototxt example?
- Accessing .\windows
- building caffe issue fatal error LNK1104 cannot open file python36.lib HOT 6
- can not compile in the windows
- python3.5报错LINK : fatal error LNK1104: 无法打开文件“python36.lib” HOT 2
- Can not find the prototxt including the LabelSpecificAdd
- fatal error: caffe/proto/caffe.pb.h: No such file or directory HOT 1
- softmax_loss = 0 ,under ubuntu16.04,cuda10,opencv 3.4.5
- caffe_pb2.py has no LabelMap() HOT 1
- win10+cuda10+cudnn7.3编译出现MSB271错误? HOT 3
- 编译出现:InitLogLevelPipe错误
- python3.5
- Compile on ubuntu
- mnist demo failed
- compile error on win10 + VS2017 + cuda9
- after deleting a Net instance, the GPU memory is not released
- 求助大佬,win7 64位,vs2015+cuda10.2 环境下编译需要如何修改啊?
- 0 projects, projects or modules unavailable
- cuda11.1+win10+vs2015+rtx3090 NetParameter problem
- libcaffe编译成功,pycaffe 编译失败
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 caffe-windows.