gmayday1997 / SceneChangeDet

pytorch implementation of scene change detection
MIT License
233 stars 74 forks source link

When are you updating the complete source code? #3

Open Amelia0911 opened 5 years ago

Amelia0911 commented 5 years ago

I am very interested in your paper. I want to run your code to see the effect. If you can send me a complete project, it would be great. My email address is: zhumeiliu_0911@163.com

gmayday1997 commented 5 years ago

@Amelia0911 hi, thanks for your interest in our work. full source code and pre-train model will be updated before 15.Nov.

Amelia0911 commented 5 years ago

I am glad to received your Email. Can you speak chinese? I want to ask you a few question about your paper.

At 2018-11-07 14:59:41, "gmayday1997" notifications@github.com wrote:

@Amelia0911 hi, thanks for your interest in our work. full source code and pre-train model will be updated before 15.Nov.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

gmayday1997 commented 5 years ago

有相关问题,请讲。

Amelia0911 commented 5 years ago

训练过程中的输入分别是t0,t1和GT,下载的数据集中包含t1和GT,想问一下关于t0的输入方式、t0数据的组成、t0与t1是如何对应输入的?

在 2018-11-07 20:10:10,"gmayday1997" notifications@github.com 写道:

有相关问题,请讲。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

gmayday1997 commented 5 years ago

• t0和t1是同一场景不同时刻的图像对(a pair of images/image-pair),其作为原始输入喂到孪生卷积神经网络中。具体是下图中圈的部分

Amelia0911 commented 5 years ago

issue

gmayday1997 commented 5 years ago

事实上,我们在文章的4.2.3提到过cdnet的数据组织方式 我们是从input里面选出一张最最接近背景的图片(无任何前景)作为t0,其余的作为t1. 这样做的好处是groundtruth不用做任何处理,可以直接作为change mask使用。 建议你去看看PCD数据集,那个结构比较清晰。 http://www.vision.is.tohoku.ac.jp/us/research/4d_city_modeling/pano_cd_dataset/

Amelia0911 commented 5 years ago

谢谢您的回复,我再好好看一下实验部分的内容,如果有什么问题还得请教。希望代码早一点更新,可以看一下效果。再次感谢。

在 2018-11-08 19:31:02,"gmayday1997" notifications@github.com 写道:

事实上,我们在文章的4.2.3提到过cdnet的数据组织方式

我们是从input里面选出一张最最接近背景的图片(无任何前景)作为t0,其余的作为t1. 这样做的好处是groundtruth不用做任何处理,可以直接作为change mask使用。 建议你去看看PCD数据集,那个结构比较清晰。 http://www.vision.is.tohoku.ac.jp/us/research/4d_city_modeling/pano_cd_dataset/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Amelia0911 commented 5 years ago

还没更新啊~~~

gmayday1997 commented 5 years ago

抱歉,最近有个紧急的事耽搁了,这个事情要19号完成。不好意思。

Amelia0911 commented 5 years ago

hello,我等的花都谢了~

raytrun commented 5 years ago

事实上,我们在文章的4.2.3提到过cdnet的数据组织方式 我们是从input里面选出一张最最接近背景的图片(无任何前景)作为t0,其余的作为t1. 这样做的好处是groundtruth不用做任何处理,可以直接作为change mask使用。 建议你去看看PCD数据集,那个结构比较清晰。 http://www.vision.is.tohoku.ac.jp/us/research/4d_city_modeling/pano_cd_dataset/

 请问groundtruth输入是3通道还是1通道?

gmayday1997 commented 5 years ago

事实上,我们在文章的4.2.3提到过cdnet的数据组织方式 我们是从input里面选出一张最最接近背景的图片(无任何前景)作为t0,其余的作为t1. 这样做的好处是groundtruth不用做任何处理,可以直接作为change mask使用。 建议你去看看PCD数据集,那个结构比较清晰。 http://www.vision.is.tohoku.ac.jp/us/research/4d_city_modeling/pano_cd_dataset/

 请问groundtruth输入是3通道还是1通道?

hi, 我们已经把cd2014的数据集分享到百度云,又需要请下载 https://pan.baidu.com/s/19ReVH6pmizcU79sk2Rsz5w

Amelia0911 commented 5 years ago

你好,我之前用date2014里的数据进行训练和测试效果都挺好的,但是我现在的输入图像尺寸是413*134,结果验证保存的图像显示fc与embedding都没有输出了。这是为什么呢?我试着修改了网络中conv3中的stride值,将值变为1,也是没有效果。我应该如何调整训练参数呢?

gmayday1997 commented 5 years ago

你好,我之前用date2014里的数据进行训练和测试效果都挺好的,但是我现在的输入图像尺寸是413*134,结果验证保存的图像显示fc与embedding都没有输出了。这是为什么呢?我试着修改了网络中conv3中的stride值,将值变为1,也是没有效果。我应该如何调整训练参数呢?

应该不是分辨率的问题,可能是你数据量少吧。如果是的话,做 data augmentation. 如果不是,看loss下降情况,先调整初始学习率。

Amelia0911 commented 5 years ago

最开始我用的是dataset2014中的PTZ中的twoPositionPTZCam,共460张,从验证的10张图片来看,训练效果还不错。用自己的图片训练,loss值最开始1~2epoch降,后面就没有明显的下降,将学习率调小也没有变化。 这是PTZ的效果。 in001520 in001520 这是我的图的conv5的效果: left_behind_2019_01_08_2296 left_behind_2019_01_08_2296 left_behind_2019_01_08_2296

gmayday1997 commented 5 years ago

如果我没理解错的话,只有conv5有输出,最后两个没有输出内容。最开始浅层特征有多层监督信息,深层收敛慢于浅层,所以conv5最容易收敛。但深层特征经过几个epoch也会收敛。 你观察一下,深层的loss是不是一直不降? 试一试调整不同层loss的权重,看有没有效果。

Amelia0911 commented 5 years ago

确实如您所说的,我之前只打印了loss的均值和embedding的loss。那这个loss的权重是要怎么定才合理呢? 2019-01-16 16-13-14

gmayday1997 commented 5 years ago

看loss问题应该出现在fc层上,loss下降的很慢,权重设置多少要试,我也不是很确定。

gmayday1997 commented 5 years ago

@Amelia0911 或者调整fc学习率,目前只是为embedding层设置了10倍学习率。

Amelia0911 commented 5 years ago

修改了学习率和系数之后明显好多了,目前就是loss收敛过程中呈上下跳动,且幅度挺大的,不过绘制了曲线发现走势是好的,现在已经把学习率调小并且把batch_size设为4,loss看起来正常多了。阿里嘎多!

XinZhangRadar commented 5 years ago

请问如果想检测其他类物体的变化,是否需要使用该类物体的标注数据重新训练网络?谢谢。

stillwaterman commented 5 years ago

@Amelia0911 你好,我同样用twoPositionPTZCam中的700多张图像做训练,源码基本没改动,但是模型好像没有学习的趋势,changemaps都是一片蓝,loss也没有下降的趋势,请问你对代码有做什么改动吗,label是用gtbinary吗 Edit: 自己改了改模型和超参数,可以训练了

xiaoyige99 commented 5 years ago

When I use the t dataset, I get the following error, how do you do it? thank you ! NotImplementedError: Got 5D input, but bilinear mode needs 4D input Position in "utils line 227" I want to know the format of your trainval.txt,may be i am wrong

xiaoyige99 commented 5 years ago

@Amelia0911 你好,我同样用twoPositionPTZCam中的700多张图像做训练,源码基本没改动,但是模型好像没有学习的趋势,changemaps都是一片蓝,loss也没有下降的趋势,请问你对代码有做什么改动吗,label是用gtbinary吗

Hello, I also want to try to feed the neural network with hundreds of images from CD2014, but it seems that there is a problem with the format of train.txt, even though I just deleted some of the contents of train.txt, but tried many times. There will be problems, but the original train.txt can be used, I would like to ask how you do it, if you can share your data screenshots and txt documents, thank you. My email: 1139444918@qq.com 图片

124399839 commented 5 years ago

@gmayday1997 你好,非常感謝你的工作,我在執行該code時運行非常慢,請問你在訓練的時候一個epoch要多久呢,我執行python train.py,一個小時都沒有跑完一個epoch,如下圖: 123Capture 我的電腦配置如下: Ca33pture 請問程序執行很慢,是什麼原因呢,謝謝。

124399839 commented 5 years ago

@gmayday1997 我將程序 if (batch_idx) % 1000 == 0: model.eval() current_metric = validate(model, val_loader, epoch,save_change_map_dir,save_roc_dir) 改爲 if (batch_idx + 1) % 1000 == 0: model.eval() current_metric = validate(model, val_loader, epoch,save_change_map_dir,save_roc_dir) 這樣在batch_idx=0時就不執行eval, 我發現在執行current_metric = validate(model, val_loader, epoch,save_change_map_dir,save_roc_dir)時非常慢,請問這樣正常嗎?Tanks.

124399839 commented 5 years ago

@Amelia0911 @raytrun @XinZhangNLPR @stillwaterman 請問你們在訓練的時候是不是也非常的慢,你們有什麼解決方法嗎?另外可以分享一下cdnet2014訓練的model麼。謝謝, 我在使用cdnet2014訓練model,現在訓練的速度非常慢,而且還有如下error, Epoch [0/27990] Loss: 2006.7865 Mask_Loss_conv5: 177.4561 Mask_Loss_fc: 1743.4923 Mask_Loss_embedding: 85.8382 Exception RuntimeError: RuntimeError('main thread is not in main loop',) in <bound method PhotoImage.__del__ of <Tkinter.PhotoImage instance at 0x7f78b8226950>> ignored Tcl_AsyncDelete: async handler deleted by the wrong thread Aborted (core dumped) 請問你們有沒有遇到呢,謝謝。

ahfriedman commented 5 years ago

修改了学习率和系数之后明显好多了,目前就是loss收敛过程中呈上下跳动,且幅度挺大的,不过绘制了曲线发现走势是好的,现在已经把学习率调小并且把batch_size设为4,loss看起来正常多了。阿里嘎多!

@Amelia0911 I have been using google translate to read this page as I am having issues training. I was wondering if you could list what changes to the code you made so that I could try them? I plan on using google translate to translate this message, but I wanted to leave the English version in case there are problems with the translation.

Google Translate: 我一直在使用谷歌翻译阅读此页面,因为我有问题培训。 我想知道你是否可以列出你所做代码的哪些更改,以便我可以尝试一下? 我计划使用谷歌翻译来翻译此消息,但我想保留英文版以防翻译出现问题。

zjz5250 commented 5 years ago

When I use the t dataset, I get the following error, how do you do it? thank you ! NotImplementedError: Got 5D input, but bilinear mode needs 4D input Position in "utils line 227" I want to know the format of your trainval.txt,may be i am wrong @xiaoyige99 我遇到了同样的问题。你解决掉了吗

zjz5250 commented 5 years ago

@124399839 val特别慢的问题 你解决了吗

124399839 commented 5 years ago

我沒有解決,只是淡定的等待就好,, 我查看了一下訓練和測試的數據list,發現訓練和測試的數據有很多都是相鄰的幀,,這樣的問題就是訓練和測試的數據也太像了,是不是有些不合理呢。。。

ahfriedman commented 5 years ago

@124399839 获得结果需要多长时间? 多少个时代?

How long does it take to get results? How many epochs?

zjz5250 commented 5 years ago

我沒有解決,只是淡定的等待就好,, 我查看了一下訓練和測試的數據list,發現訓練和測試的數據有很多都是相鄰的幀,,這樣的問題就是訓練和測試的數據也太像了,是不是有些不合理呢。。。

谢谢你的回复。另外请教下,如果要更改bachsize的话,都需要更改哪些地方呢?我改了cfg中batchsize后,会出现shape不匹配的错误,还没搞清楚要这么修改,多谢啦!

zjz5250 commented 5 years ago

修改了学习率和系数之后明显好多了,目前就是loss收敛过程中呈上下跳动,且幅度挺大的,不过绘制了曲线发现走势是好的,现在已经把学习率调小并且把batch_size设为4,loss看起来正常多了。阿里嘎多! @Amelia0911 你好 batch_size该如何修改呢?多谢

zjz5250 commented 4 years ago

确实如您所说的,我之前只打印了loss的均值和embedding的loss。那这个loss的权重是要怎么定才合理呢? 2019-01-16 16-13-14

你好,请问你怎么做到的呢?batch_size我更改后,有很多地方报错,能否分享下你是如何修改的,另外lr设置为多少比较和合适呢?多谢啦

luhan11 commented 4 years ago

When I use the t dataset, I get the following error, how do you do it? thank you ! NotImplementedError: Got 5D input, but bilinear mode needs 4D input Position in "utils line 227" I want to know the format of your trainval.txt,may be i am wrong @xiaoyige99 我遇到了同样的问题。你解决掉了吗

gt需要单通道输入,给的数据是三通道的,改成单通道就ok了

zjz5250 commented 4 years ago

When I use the t dataset, I get the following error, how do you do it? thank you ! NotImplementedError: Got 5D input, but bilinear mode needs 4D input Position in "utils line 227" I want to know the format of your trainval.txt,may be i am wrong @xiaoyige99 我遇到了同样的问题。你解决掉了吗

gt需要单通道输入,给的数据是三通道的,改成单通道就ok了

好的,多谢啦

zjz5250 commented 4 years ago

When I use the t dataset, I get the following error, how do you do it? thank you ! NotImplementedError: Got 5D input, but bilinear mode needs 4D input Position in "utils line 227" I want to know the format of your trainval.txt,may be i am wrong @xiaoyige99 我遇到了同样的问题。你解决掉了吗

gt需要单通道输入,给的数据是三通道的,改成单通道就ok了

@luhan11 你好,多谢啦。 另外请教下,这个工程必须用torch0.20的版本吗? 我用的1.0的版本,loss一直不收敛,不知道跟版本有没有关系

luhan11 commented 4 years ago

When I use the t dataset, I get the following error, how do you do it? thank you ! NotImplementedError: Got 5D input, but bilinear mode needs 4D input Position in "utils line 227" I want to know the format of your trainval.txt,may be i am wrong @xiaoyige99 我遇到了同样的问题。你解决掉了吗

gt需要单通道输入,给的数据是三通道的,改成单通道就ok了

@luhan11 你好,多谢啦。 另外请教下,这个工程必须用torch0.20的版本吗? 我用的1.0的版本,loss一直不收敛,不知道跟版本有没有关系

有关系的

zjz5250 commented 4 years ago

When I use the t dataset, I get the following error, how do you do it? thank you ! NotImplementedError: Got 5D input, but bilinear mode needs 4D input Position in "utils line 227" I want to know the format of your trainval.txt,may be i am wrong @xiaoyige99 我遇到了同样的问题。你解决掉了吗

gt需要单通道输入,给的数据是三通道的,改成单通道就ok了

@luhan11 你好,多谢啦。 另外请教下,这个工程必须用torch0.20的版本吗? 我用的1.0的版本,loss一直不收敛,不知道跟版本有没有关系

有关系的

图片 loss 终于能看了

Tangjunjun0925 commented 4 years ago

我在cmu的数据集上训练,loss很奇怪完全不能下降,大家有这个问题么? image

Qifan123 commented 4 years ago

为啥没我的change map没有输出呢,有人出现这种情况了吗

Rikaaaaaa95 commented 4 years ago

为啥没我的change map没有输出呢,有人出现这种情况了吗

同学,留一下qq联系方式呗

PhiAbs commented 4 years ago

@Amelia0911 @stillwaterman You made the model train if I understood your comments correctly. I am currently trying to train it, too, but the model does not converge (cd2014 dataset. tried preset parameters and also reduced learning rate). Could you share some insight in how you trained the network? What did you have to change? What parameters did you use? How long did you have to train the model? Any help is highly appreciated.