erasernut / mtmt Goto Github PK
View Code? Open in Web Editor NEWCode for the CVPR 2020 paper "A Multi-task Mean Teacher for Semi-supervised Shadow Detection"
Code for the CVPR 2020 paper "A Multi-task Mean Teacher for Semi-supervised Shadow Detection"
When I'm training model by using your train.py, There are many errors in your code.
For example, In your codes, dataloaders.la_heart, VNet etc. are not in your Codes.
So, Can you update your train.py code?
I am curious about that if your MT-CNN is a variant of U-Net.
Hi, I try to do some test on your SBU results, but I encountered a problem that the images' name is renamed with 1~638(eg: 1.png). And I can't find a mapping relationship between the index and the original file name, which means that we can't compare your results with the groundtruth. Could you provide a SBU results, which named in the original file name, again please? I am waiting for you early reply! Thanks a lot!
Hello
How are you?
I write asking for help. I have been struggling to run the test.
I do not know where is this file "iter_10000.pth":
snapshot_path = '../model_SBU_EGNet/baselineC64_DSS_unlabelcons/repeat16_edge10.0lr0.005consistency1.0subitizing5.0/iter_10000.pth'
May you help me get the file?
Or how to do this test runnable?
I have download SBU, UCF datasets.
I have download Resnet.
Thanks in advance!
I am interested in your work , and about the implementation, I found your reference paper[43] for prediction use conv3X3 and aslo BatchNorm2d, Relu, and Dropout. and finally use conv1X1 and sigmod function. But on your paper I found "The prediction P red(·) is realized by using three 3×3 convolutional layers, a 1×1 convolutional layer"
so my questions is if you keep the same structure of prediction as the referenced paper?
I can`t find networks.vnet、networks.vnet2d 、networks.FPN 、dataloaders.la_ heart、utils which were imported into train.py in your code package.Can you update your code package?
in my opinion,the mt just make the teacher and student network's outputs as the same as possible,but the same result doesn't mean the result is a correct result,especially when the labeled data is smaller than unlable data
你好!请问哪里可以下载UCF数据集?找了很久没找到..
从论文的Table 2 来看,引入MT后确实给detection 任务带来了提升,但是不太能理解的一点就是给teacher network输入unlabeled data 后,其实这部分的loss计算是来自于unlabeled送入student net来获取的一个伪label,这里的unlabeled 数据没有真实的GT参考,为什么加上M最后可以给basic net带来增益和提升的呢,针对这一点,师兄是怎么理解的呢
Thank you for sharing this impressive model.
Could you please clarify which license applies to the code in this repository?
def build_model(base_model_cfg='resnext101', ema=False):
if not ema:
return TUN_bone(base_model_cfg, *extra_layer(base_model_cfg, ResNeXt101()))
else:
return TUN_bone(base_model_cfg, *extra_layer(base_model_cfg, ResNeXt101()))
怎么感觉不管这里ema的值是什么,返回的都是一个内容呢?
Could you provide the SBU dataset, including the shadow edge data? Thank you.
Look forward to your reply.
Hi, I am new to image segmentation. Your method seems very promising but when I try loading your pretrained weights I get strange results. It does not seem to detect the shadows. I've downloaded the iter10000.pth file and load it using
net = build_model() checkpoint = torch.load('iter_10000.pth',map_location=torch.device('cpu')) net.load_state_dict(checkpoint)
then I run
xxx=net(img_var)[0][0] res = torch.sigmoid(xxx)
However, the masked images it is outputting are off. Please compare the ground truth image, input, and my result. It is doing some sort of segmentation, but it is not accurately finding the shadows. I am sure I am loading the wrong model or doing something wrong in the settings. Do you have any pointers to what I am doing wrong? Thanks very much!
大佬您好,我特别想了解阴影识别的相关内容,偶然间发现您这篇文章,感觉特别棒、特别有深度。但是由于刚接触图像处理,在运行您分享的程序遇到了蛮多问题,比如from dataloaders.ISIC import ISIC报错,找不到resnext_101_32_path = '/media/data/chenzhihao/code/MTMT/backbone_pth/resnext_101_32x4d.pth'文件等,我能拥有您的其他联系方式嘛!很抱歉打扰到您。
hi bro,we think you may upload wrong result on SUB, because we find the SUB result is the same as the SBU_crf result
Hi,
I found that there were not ramp and losses functions in your util file. Could you
upload the two functions in the util file?
[ in trian.py,
from utils import ramps, losses---->cannot find reference 'ramp' in 'imported module util']
在trian.py中,from dataloaders.SBU import SBU, relabel_dataset。然后后面这个relabel_dataset没找到在哪。能发一下吗。非常感谢。
Thanks for your work. I can detect the shadow from an image now, the output of the network is a binary map, but how to remove the shadow region from the original image?
def init(self, primary_indices, secondary_indices, batch_size, secondary_batch_size):
self.primary_indices = primary_indices
self.secondary_indices = secondary_indices
self.secondary_batch_size = secondary_batch_size
self.primary_batch_size = batch_size - secondary_batch_size
#print(len(self.secondary_indices))
#print(len(self.primary_indices))
#print(self.primary_batch_size)
#print(self.secondary_batch_size)
assert len(self.primary_indices) >= self.primary_batch_size > 0
assert len(self.secondary_indices) >= self.secondary_batch_size > 0
I use the trained model you provided in BaiduNetDisk (iter_10000.pth)
It seems your model doesn't match the checkpoint, so that the following error occurs:
RuntimeError: Error(s) in loading state_dict for TUN_bone:
Unexpected key(s) in state_dict: "merge1.number_per_fc.weight", "merge1.number_per_fc.bias".
I use the model you provide to test on your SBU test dataset, and I get the result “Test ber results: 3.75”, which is larger than the result "ber:3.15" in your paper. I think maybe something is wrong but I dont know where. Could you provide some advice.
If more unlabeled data is used, will the performance be improved?
Hi! Could you provide your unlabeled data? Your unlabled data contains 3424 images, among which there are 979 images which are not available for us. Is it possible for you to release these unlabled data? It would be grateful if you could release the whole unlabled dataset you used in your program! Thanks a lot!
Hi, would it be possible to upload the trained model on google drive, like you did with the detection results? I can't create a baidu account without a chinese phone number.
Hello,
Here again, asking for guideness.
I tried running the test, but I get this message. I have tried figure it out. But I do not understand.
I have tested the line #48. Because I am testing the SBU dataset. By the way, I am using cpu, because I do not have GPU.
I hope you could help me,
Thanks in Advance
Sergio
I can't find the file named infer.py
I wander if you will upload your training code?
In your paper, the MT-CNN inculde the shadow count regression,and when computing consistency loss,sc is aslo included, however, in your model and train.py, I don't find the implementation of sc regression and its loss. Could you provide the code
about how you implement this? Thanks a lot.
I couldn't find UCF datasets. The link provided authors only have 110 images, but the original UCF dataset have 245 images.
Who can help me? If you have the link, please send to my email, [email protected]
Thanks!
Hi, there. Thank you for this project. I got a question about UCF dataset. As mentioned in your paper in section 4.1 that "The UCF dataset consists of 145 training images and 76 testing images, covering outdoor scenes;", If I understood correctly, the number of testing images should be 76. However, in the UCF dataset provided, it contains 110 images which is inconsistent with 76. I also checked other paper and found most works' provided UCF detection results had 76 images either. I don't know where is the problem. Thank you very much.
Hi, thanks for your work and code. There are some bugs when I runing your code.
AttributeError: 'SBU' object has no attribute 'multi_task'
in train.py: db_train = SBU(root=train_data_path, joint_transform=joint_transform, transform=img_transform, target_transform=target_transform, mod='union', multi_task=True, edge=True)
however, in SBU.py: def init(self, root, joint_transform=None, transform=None, target_transform=None, mod='union', subitizing=False, subitizing_threshold=8, subitizing_min_size_per=0.005, edge=False):
TypeError: call() takes 3 positional arguments but 4 were given in SBU.py at line 108
img, target, edge = self.joint_transform(img, target, edge)
however, in joint_transform.py, it is defined as:
def call(self, img, mask):
assert img.size == mask.size
for t in self.transforms:
img, mask = t(img, mask)
return img, mask
img, target, edge = self.joint_transform(img, target, edge)
TypeError: call() takes 3 positional arguments but 4 were given
First of all thanks for sharing your code.
However, I can't reproduce your result in your paper as BER value 3.15. Actually, I am puzzled that in your test_MT_util.py, codes for calculating the BER result were commented. More importantly, if they were useful, they only calculated BER value of only one image. This is somehow wired.
Can you pls upload the entire code for inference to get the desired BER values ?
Thank you very much.
Hi,
I found that there were not ramp and losses functions in your util file. Could you
upload the two functions in the util file?
[ in trian.py,
from utils import ramps, losses---->cannot find reference 'ramp' in 'imported module util']
def init(self, primary_indices, secondary_indices, batch_size, secondary_batch_size):
self.primary_indices = primary_indices
self.secondary_indices = secondary_indices
self.secondary_batch_size = secondary_batch_size
self.primary_batch_size = batch_size - secondary_batch_size
#print(len(self.secondary_indices))
#print(len(self.primary_indices))
#print(self.primary_batch_size)
#print(self.secondary_batch_size)
assert len(self.primary_indices) >= self.primary_batch_size > 0
assert len(self.secondary_indices) >= self.secondary_batch_size > 0
Hi,When I ran the experiments on the SBU dataset, the error occurred: FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'C:/gitclone/MTMT/SBU/SBUTrain4KRecoveredSmall\EdgeMasks'.
Could you provide me with the EdgeMasks file of SBU dataset?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.