Comments (33)
准确率改善的还不错。特征比对的结果比softmax分类结果略好,不过测试时间开销大。特此感谢 @pinguo-luhaofang
from tripletloss.
@tanyuan1992 tripletloss的输出结果,极其依赖训练集。做lfw测试,可以用你的数据进行softmax的训练,最后用lfw的数据来训练embedding,来做测试。如果你的训练数据足够大请忽略这句话。。。
from tripletloss.
@thu-zxs 用softmax训练的模型, 加上tripletloss以后 ,初始loss值小的可怕 只有零点零几 正常吗?还有,在用triplet来训练时,因为loss初始时就很小,那么训练好的指标是什么呢
from tripletloss.
@tanyuan1992 正常的。如果训练样本比较多的话考虑batch size大一些,或者多训几万个iteration。训练好的话不仅loss是0,而且ap和an的差距应该是逐渐拉大的,不过变化的过程比较缓慢。我训3000多类,用softmax来fintuning训了20万个iteration,不过我batch size只有18。
from tripletloss.
@thu-zxs ,你好,我训练的过程中,loss只有从一开始从0.18,10000次左右跌倒到了0.001之后到了十万次左右还是这样个样子,拿5万次结果去测试,发现和之前的结果差不多,略低0.5%.您最后训练了多少次,中间结果ap和an差距有多大?
from tripletloss.
@dianxin556 你好,你最后得到的模型,用的什么方法测试模型的,贝叶斯吗?
from tripletloss.
@zhangfudiyi ,不是,我是测verification,跟另外一篇Deepface文章的测试方式一样。不过我不太明白训练tripletloss时的validation是怎么测试的,不计算回传,随机找测试的batch吗
from tripletloss.
@dianxin556 是的,测试的话是随机batch的。你说的verification是不是DeepID中提到的方法,如个不是麻烦你能告诉我是那一篇论文吗?谢谢了!
from tripletloss.
@zhangfudiyi ,deep face recognition。
from tripletloss.
@thu-zxs,你好,你softmax特征取的是哪一层特征和tripletloss比的? 谢谢
from tripletloss.
@dianxin556 softmax是fc8,tripletloss是长度为512的fc9。我用softmax finetuning tripletloss的时候没要fc8
from tripletloss.
@dianxin556 你好!你能给我一份你的verification代码吗?我用的joint-Bayesian的一直没搞好。
from tripletloss.
@thu-zxs 你好,请问一下你那边测试出来,triplet比softmax提高的几个点呢?我是1000分类80000多张图片训练的softmax,然后换成tripletloss迭代了400000次。最后在lfw上的测试结果是:softmax上是88.54,triplet上是88.70
from tripletloss.
@thu-zxs 你使用这个code训练正常?我觉得tripletselectlayer.py中有个判断有问题
from tripletloss.
@pinguo-luhaofang ,你好,如果拿一些每个人只有两三张图片,但是有很多人的数据去训练tripletloss的话,可行吗?谢谢
from tripletloss.
@pinguo-luhaofang 我现在倒是有200W的数据集 但是现在数据选择的策略我觉得有点问题 按照你现在的策略 每次迭代相当于在整个数据集在index只加了1,要想走完一个epoch 有多少图片就得多少次迭代 我200W的图片就要200W次迭代
from tripletloss.
@pinguo-luhaofang 我觉得你原来那个版本用的策略挺好的,只是会出现死循环 但是可以参考一下openface的策略 稍微进行一下修改
from tripletloss.
@pinguo-luhaofang 按照你说的用lfw来训练embedding,这可行吗?lfw里面大多数分类只有1张或者两张图片
from tripletloss.
@tanyuan1992 建议你看下论文,然后 epoch 的策略倒是有很多方法来做,但是个人认为并非是最重要的,如果你的数据集较大,那么当然可以在数据中进行随机筛选个数,达到降低选取样本个数的目的,如果你的数据较小,那么当然全量配对进行训练是能找到最优解的。
from tripletloss.
@tanyuan1992 之所以需要通过测试数据来进行,原因请考虑什么叫做embedding,拿着地球的质量来套公式计算月球的第一宇宙速度,这看起来是不可行的吧。
from tripletloss.
@pinguo-luhaofang 能否加Q私聊 763100314
from tripletloss.
@chendd14 那里面的判断我改过
from tripletloss.
@thu-zxs 除了这里,你还有别的地方的改动吗?我现在使用了这段代码,经过一段时间后,所有的对之间的距离都是0. [email protected],欢迎私聊,我是电子系的。
from tripletloss.
@thu-zxs
请问下tripletselectlayer.py第58行这里你怎么改的 ?
from tripletloss.
@chendd14 只改动了这儿,至于都是0,可以考虑finetuning的时候不要softmax训好的fc8。你好,我也是电子。
from tripletloss.
@yzk0281 我注释掉了58、59行
from tripletloss.
@pinguo-luhaofang 请问triplet loss的输入为什么是fc_9,一般来说embedding应该对特征层fc_7来做才合理吧?
from tripletloss.
@jiangxuehan 对的,是应该拿fc_7来做。
from tripletloss.
@pinguo-luhaofang 可是你的train.prototxt里是 fc7->fc9->norm2->fc9_1->triplet ?
from tripletloss.
@pinguo-luhaofang 如果说进行embedding的时候 ,需要用测试数据来进行,那么这样的意义在哪里呢? 假如我要将这种方法运用到实际中来 ,我事先并不知道我要进行测试的数据是什么,这时候貌似这种方法并不管用呢
from tripletloss.
@pinguo-luhaofang 你好,原文当中learning rate设置是0.25, 你的配置文件是0.05
这个对训练的影响大不大; 还有发现loss在一两万次迭代的时候就收敛为0了,远没有达到训练集的大小。请教下你训练的时候用的什么数据集
from tripletloss.
@thu-zxs 您好,我现在还没跑通他的代码,我已经将WITH_PYTHON_LAYER := 1取消注释,并重新编译了,但是接下来该怎么做?我直接Python train.py 但是出现了错误,
I0811 06:09:47.978478 18994 solver.cpp:70] Creating training net from net file: /home/dl1/lvlu/10000all/tripletloss-master/m_train.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 2223:14: Message type "caffe.PythonParameter" has no field named "param_str".
请问,我是不是少做了什么步骤?
from tripletloss.
你取消注释pythonlayer 怎么调用tripletloss层呢。。。
from tripletloss.
Related Issues (20)
- the module name is right,but it still failed with boost::python::error_already_set
- 训练到后面 loss都变为0.1 an,ap变为0 HOT 6
- training problem HOT 5
- training problem
- Hard Sample
- the triplet loss architecture is unsupervised, is this correct?
- tipletselectlayer - computing the distance against the anchor image HOT 2
- shuffle
- fc9_1 weights is increase with the train iterations from 0.0x to 40.x HOT 1
- Training your code on custom dataset HOT 1
- how to train it on 2 gpus
- Use of the margin HOT 2
- Negative mining in TripletSelectLayer HOT 1
- what does no_residual_list for?
- 数据集组织需要什么特别处理么? HOT 1
- online triplet sample selection usage?
- 您好,我想用自己的数据集跑这个网络,除了修改config路径,还需要修改哪里? HOT 2
- Online triplet generation HOT 1
- 工作推荐
- ap,an都变得特别大
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 tripletloss.