plemeri / uacanet Goto Github PK
View Code? Open in Web Editor NEWOfficial PyTorch implementation of UACANet: Uncertainty Augmented Context Attention for Polyp Segmentation (ACMMM 2021)
License: MIT License
Official PyTorch implementation of UACANet: Uncertainty Augmented Context Attention for Polyp Segmentation (ACMMM 2021)
License: MIT License
I tried to reproduce your results following your README instructions. I used the default UACANet-L
config with a batch size of 8 instead of 32.
The mDICE I get on 3 runs on ETIS-LaribPolypDB is 0.52/0.56/0.53 while in the paper you get 0.76
Can you verify this? Why is the lower batch size affecting only this dataset?
Hello! Sir,
I've been looking at the code for your paper(UACANet: Uncertainty Augmented Context Attention for Polyp Segmentation), and it's very well written, especially the yaml configuration, which is very simple and clear! However, when I was looking at layers.py, I encountered a little problem, so far I have not figured it out, I hope you could teach me when you got time, thank you!
here, if I pass kernel_size=1 & padding='same' and according to your code below, I will got a kernel_size=(0,0),I think this is not a valid value of kernel_size?
Hi, is it possible to use this model for multi-classes segmentation training? Thanks.
Hello, Is it convenient to share the SFA code in this article? Suddenly found that the original author deleted this code
In run/Train.py, Line122
if epoch % opt.Train.Checkpoint.checkpoint_epoch == 0: torch.save(model.module.state_dict() if args.device_num > 1 else model.state_dict( ), os.path.join(opt.Train.Checkpoint.checkpoint_dir, 'latest.pth'))
To my understanding, this code fragment save checkpoint by each 20 epochs , this can not ensure the checkpoint saved is the optimal during training.
And in Line 130,
if args.local_rank <= 0: torch.save(model.module.state_dict() if args.device_num > 1 else model.state_dict( ), os.path.join(opt.Train.Checkpoint.checkpoint_dir, 'latest.pth'))
this code just save the weights of last epoch, and it also can not ensure the checkpoint saved is the optimal.
Why don't you save the optimal checkpoint? Would you mind explaining it for me?
Many thanks to you!
Happy New Year!
Is the syncbatchnorm useful to increase accuracy when using multiple GPUs?
Thank you
I run the commad:
python Expr.py --config configs/UACANet-L.yaml
However, the result listed as follows:
The official result of UACANet-L mentioned at README is
dataset meanDic meanIoU wFm Sm meanEm mae maxEm maxDic maxIoU meanSen maxSen meanSpe maxSpe
----------------- --------- --------- ----- ----- -------- ----- ------- -------- -------- --------- -------- --------- --------
CVC-300 0.910 0.849 0.901 0.937 0.977 0.005 0.980 0.913 0.853 0.940 1.000 0.993 0.997
CVC-ClinicDB 0.926 0.880 0.928 0.943 0.974 0.006 0.976 0.929 0.883 0.943 1.000 0.992 0.996
Kvasir 0.912 0.859 0.902 0.917 0.955 0.025 0.958 0.915 0.862 0.923 1.000 0.983 0.987
CVC-ColonDB 0.751 0.678 0.746 0.835 0.875 0.039 0.878 0.753 0.680 0.754 1.000 0.953 0.957
ETIS-LaribPolypDB 0.766 0.689 0.740 0.859 0.903 0.012 0.905 0.769 0.691 0.813 1.000 0.932 0.936
Why is the result I run so bad? I didn't change any configuration file.
Hi~I have some questions about Axial-attention
Why there is no premute operation before view in mode h?
# for mode h
projected_query = self.query_conv(x).premute(0, 1, 3, 2).view(*view).permute(0, 2, 1)
I think premute is necessary. Although the shape of those values are correct to calculate,it has a very different meaning for mode h comparing to mode w. Without premute, the projected_query can't actually collect the columns to the dimension with size Hight
For example:
For mode W, the way of reshape is correct.
Without permute for mode H, it is obviously not what we want:
With permute for mode H,[0, 5, 10, 15] is the column of a.:
When pretrained: True
the pretrained weights in data/backbone_ckpt/res2net50_v1b_26w_4s-3cf99910.pth
are used.
Where do these weights come from? Are they pretrained on colon images by you, or they are pretrained just on ImageNet?
def bce_iou_loss(pred, mask):
weight = 1 + 5 * torch.abs(F.avg_pool2d(mask, kernel_size=31, stride=1, padding=15) - mask)
bce = F.binary_cross_entropy_with_logits(pred, mask, reduction='none')
pred = torch.sigmoid(pred)
inter = pred * mask
union = pred + mask
iou = 1 - (inter + 1) / (union - inter + 1)
weighted_bce = (weight * bce).sum(dim=(2, 3)) / weight.sum(dim=(2, 3))
weighted_iou = (weight * iou).sum(dim=(2, 3)) / weight.sum(dim=(2, 3))
return (weighted_bce + weighted_iou).mean()
I am looking forward to your reply!
What is the structure of this Baseline model? What kind of connection does it have with UACANet?
Could you please tell me how to get the CVC-300,CVC-ColonDB,ETIS 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.