Bobholamovic / FCN-CD-PyTorch

Training code for https://github.com/rcdaudt/fully_convolutional_change_detection
BSD 2-Clause "Simplified" License
19 stars 8 forks source link

something help #2

Closed qingtian-k closed 4 years ago

qingtian-k commented 4 years ago

hello,I have read your code,can I contact you with some information,thank you very much.

Bobholamovic commented 4 years ago

Sure, my email is mhlin425@whu.edu.cn

Bobholamovic commented 4 years ago

柯同学你好,其实我也是研一哒。谢谢你的肯定和称赞。

关于数据增强,那个Compose用于组合(顺序执行)多种变换,可以接受任意个参数,而这些参数都必须是data/augmentation.py中的Transform类型的对象。比如可以这样:

Compose(Crop(256), Flip(), Crop(128))

上面这句的效果就是先从输入影像(可以是一组影像)中随机裁剪256x256的小块,然后随机翻转,然后再从翻转结果中随机裁剪128x128的小块。

比较常用的Transform有水平翻转HorizontalFlip,垂直翻转VerticalFlip、各种角度翻转和旋转Flip、缩放Scale、指定几个固定比例的缩放DiscreteScale、裁剪Crop、颜色扰动ColorJitter、HSV偏移HSVShift、RGB偏移RGBShift、PCA扰动PCAJitter、亮度对比度拉伸ContraBrightScale、添加高斯噪声AddGaussNoise等等,而这些都能在data/augmentation.py中找到,可以通过Compose进行组合。

值得注意的是,Dataset接受的transforms参数一般是一个长度为3的列表,第一个元素表示针对两个时相的输入影像进行的变换,第二个元素表示针对变化标签的变换,第三个元素表示针对输入影像和标签的整体变换,None可以作为占位符使用。比如,类似颜色扰动、高斯噪声之类的变换就只应该对输入影像进行处理,而不应该对标签使用;而Crop、Scale之类的变换则应该对样本对整体应用。

此致

敬礼

武汉大学 林漫晖

发件人: qingtian-kmailto:notifications@github.com 发送时间: 2020年2月7日 12:46 收件人: Bobholamovic/FCN-CD-PyTorchmailto:FCN-CD-PyTorch@noreply.github.com 抄送: Lin Manhuimailto:bob1998425@hotmail.com; State changemailto:state_change@noreply.github.com 主题: Re: [Bobholamovic/FCN-CD-PyTorch] something help (#2)

师兄你好,我是中山大学研一的师弟,我看了师兄的变化检测代码,写的是非常好,我也拿来跑了几次,有一个问题是在数据增强上,我想多加几种图像变化方式却报错,请问师兄在数据增强那个factory上对应的Compose代码该怎么调呢?  麻烦师兄解答。 中山大学  柯晴天

---Original--- From: "Lin Manhui"<notifications@github.com> Date: Fri, Jan 31, 2020 21:45 PM To: "Bobholamovic/FCN-CD-PyTorch"<FCN-CD-PyTorch@noreply.github.com>; Cc: "qingtian-k"<508436565@qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [Bobholamovic/FCN-CD-PyTorch] something help (#2)

Sure, my email is mhlin425@whu.edu.cn

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

― You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Bobholamovic/FCN-CD-PyTorch/issues/2?email_source=notifications&email_token=AFCKI2KQAZGF725SIZYWCKDRBTRTVA5CNFSM4KOGJDAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELBWVHQ#issuecomment-583232158, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCKI2ONH24LLMSQVGOSUGTRBTRTVANCNFSM4KOGJDAA.

Bobholamovic commented 4 years ago

不客气,我的qq是849792245,欢迎交流。祝新年paper多多,学业丰收。

此致

敬礼 武汉大学 林漫晖 发件人: qingtian-kmailto:notifications@github.com 发送时间: 2020年2月7日 13:45 收件人: Bobholamovic/FCN-CD-PyTorchmailto:FCN-CD-PyTorch@noreply.github.com 抄送: Lin Manhuimailto:bob1998425@hotmail.com; State changemailto:state_change@noreply.github.com 主题: Re: [Bobholamovic/FCN-CD-PyTorch] something help (#2)

非常感谢林同学的解答,我想我大概懂了你的意思,如果还有问题还请继续赐教。 另外,因为我也是研究图像的,所以请问能不能加个联系方式,以后好继续交流。 祝 顺利 中山大学  柯晴天

---Original--- From: "Lin Manhui"<notifications@github.com> Date: Fri, Feb 7, 2020 13:31 PM To: "Bobholamovic/FCN-CD-PyTorch"<FCN-CD-PyTorch@noreply.github.com>; Cc: "qingtian-k"<508436565@qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [Bobholamovic/FCN-CD-PyTorch] something help (#2)

柯同学你好,其实我也是研一哒。谢谢你的肯定和称赞。

关于数据增强,那个Compose用于组合(顺序执行)多种变换,可以接受任意个参数,而这些参数都必须是data/augmentation.py中的Transform类型的对象。比如可以这样:

Compose(Crop(256), Flip(), Crop(128))

上面这句的效果就是先从输入影像(可以是一组影像)中随机裁剪256x256的小块,然后随机翻转,然后再从翻转结果中随机裁剪128x128的小块。

比较常用的Transform有水平翻转HorizontalFlip,垂直翻转VerticalFlip、各种角度翻转和旋转Flip、缩放Scale、指定几个固定比例的缩放DiscreteScale、裁剪Crop、颜色扰动ColorJitter、HSV偏移HSVShift、RGB偏移RGBShift、PCA扰动PCAJitter、亮度对比度拉伸ContraBrightScale、添加高斯噪声AddGaussNoise等等,而这些都能在data/augmentation.py中找到,可以通过Compose进行组合。

值得注意的是,Dataset接受的transforms参数一般是一个长度为3的列表,第一个元素表示针对两个时相的输入影像进行的变换,第二个元素表示针对变化标签的变换,第三个元素表示针对输入影像和标签的整体变换,None可以作为占位符使用。比如,类似颜色扰动、高斯噪声之类的变换就只应该对输入影像进行处理,而不应该对标签使用;而Crop、Scale之类的变换则应该对样本对整体应用。

此致

敬礼

武汉大学 林漫晖

发件人: qingtian-k<mailto:notifications@github.com> 发送时间: 2020年2月7日 12:46 收件人: Bobholamovic/FCN-CD-PyTorch<mailto:FCN-CD-PyTorch@noreply.github.com> 抄送: Lin Manhui<mailto:bob1998425@hotmail.com>; State change<mailto:state_change@noreply.github.com> 主题: Re: [Bobholamovic/FCN-CD-PyTorch] something help (#2)

师兄你好,我是中山大学研一的师弟,我看了师兄的变化检测代码,写的是非常好,我也拿来跑了几次,有一个问题是在数据增强上,我想多加几种图像变化方式却报错,请问师兄在数据增强那个factory上对应的Compose代码该怎么调呢?&nbsp; 麻烦师兄解答。 中山大学&nbsp; 柯晴天

---Original--- From: "Lin Manhui"<notifications@github.com&gt; Date: Fri, Jan 31, 2020 21:45 PM To: "Bobholamovic/FCN-CD-PyTorch"<FCN-CD-PyTorch@noreply.github.com&gt;; Cc: "qingtian-k"<508436565@qq.com&gt;;"Author"<author@noreply.github.com&gt;; Subject: Re: [Bobholamovic/FCN-CD-PyTorch] something help (#2)

Sure, my email is mhlin425@whu.edu.cn

D You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

D You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub<https://github.com/Bobholamovic/FCN-CD-PyTorch/issues/2?email_source=notifications&amp;email_token=AFCKI2KQAZGF725SIZYWCKDRBTRTVA5CNFSM4KOGJDAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELBWVHQ#issuecomment-583232158&gt;, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFCKI2ONH24LLMSQVGOSUGTRBTRTVANCNFSM4KOGJDAA&gt;.

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

― You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Bobholamovic/FCN-CD-PyTorch/issues/2?email_source=notifications&email_token=AFCKI2KFT6DM4Q62AD5TXKDRBTYP7A5CNFSM4KOGJDAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELBZRQI#issuecomment-583243969, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCKI2JAF655FY2UKVMZZUTRBTYP7ANCNFSM4KOGJDAA.