yangxuntu / vrd

two models for visual relationship detection
93 stars 28 forks source link

faster RCNN和Vtranse的VGG-16得出来的结果不一致 #7

Open Atmegal opened 5 years ago

Atmegal commented 5 years ago

用faster RCNN计算出的框的分类,和用同样的框和参数然后使用Vtranse计算得出的结果不一致。为啥啊。而且你的计算Recall的方式和Lifeifei的有一定的区别,会导致方法的结果高1到2个百分点。

yangxuntu commented 5 years ago

其实做relationship的时候的recall的计算方法我也不是很清楚到底哪个是对的,我自己看了好几份代码,也是每一份都不一样。 你说的框的分类是指什么意思。

Atmegal commented 5 years ago

def generate_phrase_box(sbox, obox): N_box = len(sbox) phrase = np.zeros([N_box,4]) for i in range(N_box): phrase[i,0] = min(sbox[i,0], obox[i,0]) phrase[i,1] = min(sbox[i,1], obox[i,1]) phrase[i,2] = max(sbox[i,2], obox[i,2]) phrase[i,3] = max(sbox[i,2], obox[i,3]) return phrase

Atmegal commented 5 years ago

这里有个错误。。。你更新的gan是怎么做的?我试过gan不好。

Atmegal commented 5 years ago

我的意识是,你使用faster RCNN计算图片中的目标框以及他们的概率,会输出一个值。 你的Vtranse不是把faster RCNN中vgg拿出来了么,使用这个vgg和faster RCNN的参数,求出来的同一个目标框的分类概率和原始的faster RCNN会有很大的不同。 我觉得这也是你加入cls反而不好的原因。因为相差太大了。

yangxuntu commented 5 years ago

The ECCV paper's network is net/vtranse_vgg_gan.py, if you want to train it, please use vrd/train_vrd_vgg_gan.py and vrd/train_vrd_vgg_tri.py. And if you want to have a good baseline which can be used for further research, I recommend you to use vtranse model, since my eccv paper use gan, which is really hard to train, there are many tricks.

其实使用vtranse的时候,是不fine tune前面的faster rcnn的,只要fine tune后面的relationship detection部分就好了。还有,vtranse的结构并不是那么好,你把两个box的roi pooling并起来那样效果更好。

我也没有加入cls信息,只用了roi pooling的信息。

我今天刚把用gan的传上去了,你可以看一看,我用了cycle gan,还有一些训练的trick。gan的训练不稳定,你可以拿我写的那个去跑,但是你要是在一个新的数据集上跑的话,gan要自己慢慢调试的,如果你想要一个baseline来改的话,你就拿vtranse的结构,然后把两个roi pooling的features concatenate起来再去算分类,这样效果更好。


发件人: Atmegal notifications@github.com 发送时间: 2018年10月10日 10:32:44 收件人: yangxuntu/vrd 抄送: #YANG XU#; Comment 主题: Re: [yangxuntu/vrd] faster RCNN和Vtranse的VGG-16得出来的结果不一致 (#7)

我的意识是,你使用faster RCNN计算图片中的目标框以及他们的概率,会输出一个值。 你的Vtranse不是把faster RCNN中vgg拿出来了么,使用这个vgg和faster RCNN的参数,求出来的同一个目标框的分类概率和原始的faster RCNN会有很大的不同。 我觉得这也是你加入cls反而不好的原因。因为相差太大了。

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/yangxuntu/vrd/issues/7#issuecomment-428417285, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AkiaOinAJI0MA4f9bhXM5YwpoQghsHh8ks5ujVxMgaJpZM4XHzp-.

Atmegal commented 5 years ago

我并没有fine tune。。你可以试一下,直接调用,然后用你的prediction【cls_pred】看目标的输出。会和faster RCNN给出的框的类别有部分不一致。我想问这个为啥,我读了代码,并没有发现有不同的地方。Vtranse本身效果是不好,直接级联都可以提高很多。但是,我们既然用了faster rcnn的vgg作为base的CNN,我们就应该保持他们一致,目前视乎有问题。

Atmegal commented 5 years ago

你是指pool5?还是fc7.。Vtranse用了fc7.你的gan用的pool5?。弱弱的问一下,我提出来的框都要是同样大小的么?

Atmegal commented 5 years ago

如何通过tensorflow批量提取图片中的框,而且图片框中对应位置值置为0,其余的值保持不变。

yangxuntu commented 5 years ago

有个技术叫做roi pooling,用这个去pool的。

vtranse用的是fc7,gan那个用的是pool5,这两篇文章做的内容不一样。gan那篇文章的目的就是消除object的影响,所以就用了pool5的特征。


发件人: Atmegal notifications@github.com 发送时间: 2018年10月10日 11:17:37 收件人: yangxuntu/vrd 抄送: #YANG XU#; Comment 主题: Re: [yangxuntu/vrd] faster RCNN和Vtranse的VGG-16得出来的结果不一致 (#7)

如何通过tensorflow批量提取图片中的框,而且图片框中对应位置值置为0,其余的值保持不变。

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/yangxuntu/vrd/issues/7#issuecomment-428424234, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AkiaOqkoeUdS-kHUDkOyEMU7QaAZ-Iz3ks5ujWbRgaJpZM4XHzp-.

Atmegal commented 5 years ago

。。。好吧,忽略我的那个问题。。。我目前的问题是,使用faster RCNN训练得到的框和框的label,与使用Vtranse计算同一个框得到的label有的会不一致。。。Vtranse的基本网络来自于fater RCNN,理论上两者应该一致,我想问为什么。这导致的问题是,Vtranse或者Vtranse-gan使用的faster RCNN网络可能不正确,你修正之后,结果可能会提高。

yangxuntu commented 5 years ago

你两个网络导入的parameters一样吗,faster rcnn有用visual genome的数据pretrain过吗?还有你说的faster rcnn的代码是哪里的代码呢?


发件人: Atmegal notifications@github.com 发送时间: 2018年10月10日 19:04:30 收件人: yangxuntu/vrd 抄送: #YANG XU#; Comment 主题: Re: [yangxuntu/vrd] faster RCNN和Vtranse的VGG-16得出来的结果不一致 (#7)

。。。好吧,忽略我的那个问题。。。我目前的问题是,使用faster RCNN训练得到的框和框的label,与使用Vtranse计算同一个框得到的label有的会不一致。。。Vtranse的基本网络来自于fater RCNN,理论上两者应该一致,我想问为什么。这导致的问题是,Vtranse或者Vtranse-gan使用的faster RCNN网络可能不正确,你修正之后,结果可能会提高。

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/yangxuntu/vrd/issues/7#issuecomment-428531179, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AkiaOkdsHIyP826yLt1eKDvunHYsMb7mks5ujdQ-gaJpZM4XHzp-.

Atmegal commented 5 years ago

。我用的你的Vtranse啊,不过特征我导入了自己训练的faster RCNN。code也来自你的代码