angeloucn / caranet Goto Github PK
View Code? Open in Web Editor NEWContext Axial Reverse Attention Network for Small Medical Objects Segmentation
Context Axial Reverse Attention Network for Small Medical Objects Segmentation
Hi,
How do you process the data of Brats? Input it into model by slice?May I have your datasets.py and preprocessed data?
I'm looking forward to your replying.
Thanks for your code! But I still can not figure what cfpnet_res2net_v4 ()
is. This code is on line 135 of CaraNet.py.
Hi, I wonder to know how can I use the dice_average.m to compute the relationship between dice and the size of polyps. I'm not familiar with matalab , but dice_average.m seems only has a defined function ,I try to call this function in main.m files, but failed. Besides, I also curious about how did you compute the ratio of polyps , does the x axis 0,1,2,3,4,5,6 means the relative size ?
When I run Test.py file, I am getting the following error:
Traceback (most recent call last): File "Test.py", line 6, in <module> from lib.HarDMSEG import HarDMSEG ModuleNotFoundError: No module named 'lib.HarDMSEG'
How to resolve it?
atten-two uses CPF_3,I think it should be CRP_2.
Hi, sorry to bother. I'm wondering why I got all the Dice with NaN. I'v check the pathes, but still got NaN in each Dice.
cell. The _result.txt is like
"(Dataset:CVC-ClinicDB; Model:PraNet) meanDic:NaN;meanIoU:NaN;wFm:NaN;Sm:NaN;meanEm:NaN;MAE:NaN;maxEm:NaN;maxDice:NaN;maxIoU:NaN;meanSen:NaN;maxSen:NaN;meanSpe:NaN;maxSpe:NaN.
"
Sorry to bother you. May I ask about how to calculate the IoU, precision, accuracy, recall , and DSC of every epoch? Or what variables should be used to calculate these indicators?I mean ,which variables are TN, FN, TP,FP.Sorry to trouble you!
Hi.
view
in mode h
?# for mode h
projected_query = self.query_conv(x).premute(0, 1, 3, 2).view(*view).permute(0, 2, 1)
The output of the partial decoder (https://github.com/AngeLouCN/CaraNet/blob/main/lib/partial_decoder.py#L30) has a linear activation. The output of each of the axial attention modules, which are designed for residual learning, go through a BN-PReLU (https://github.com/AngeLouCN/CaraNet/blob/main/CaraNet.py#L47)
The output (decoder + axial transformer 1, 2, 3, 4) then gets a sigmoid activation to generate class probabilities.
Why modify the original linear output (from the partial decoder) with a nonlinear function that biases positive (PRELU)? Doesn't this mean that you're more likely to saturate the sigmoid by having a large input? Or at the very least result in exploding biases for the partial decoder?
My understanding of residual learning is that it's commonly done with no activation functions prior to the summation to prevent exploding biases (continually adding a positive value to a positive value)
Hi, thank you for sharing your code.
it is really helpful for me
anyway, i have a question.
I tried applying your code to my data. My data label values consist of 0,1 .
When applied to this code, the output is 0-255.
Can you tell me which part needs to be modified to adjust the output value to 0 and 1?
I will wait for your reply. thank you
Hello good sir,
i am currently using your architecture as basis for my thesis work and while training the module i wondered about the axial attention module. you utilize a gamma value by setting it this way: self.gamma = nn.Parameter(torch.zeros(1)).
Afterwards you multiply the result of´the axial attention with the gamma value: self.gamma * out and then apply the residual connection of x : out = self.gamma * out + x.
Does this not mean you don't even utilize axial attention in any way by setting the output of axial attention to zero ? and only using the residual output ?
Is this a different version of the code or am i missing something.
I would be very thankful if you could elaborate on this.
Hi, thanks for your code! Did you save an optimal model for every dataset about the polyp segmentation?
Thank you for your code first.I can't find the above library.
Hi, thanks for your code!
Can you explain to me why in structure_loss function use weights like this?
weit = 1 + 5*torch.abs(F.avg_pool2d(mask, kernel_size=31, stride=1, padding=15) - mask)
Hi! I am really interested in your proposal and I was wondering if it could fit also bones fracture segmentation tasks. Unfortunately, it seems that it does not perform as expected, with a dice coef of 0.26. Do you have some more insights about the code and what changes may I apply to make your network fit my segmentation problem?
Follow the steps mentioned. I don’t know why the accuracy is not up to the standard. I want to know why
Hi, thanks for ur great work, But I dont see ablation experiments whin ur net, like which part effective the performence more , Do u have done it? I'm very interesting in which modules matters most. thx
hello,I want to ask if dice_average code is correct?
Hi,
I'm studying medical segmentation for my job.
I read your paper and implementation on this repo.
I have questions about your implementation.
In axial reverse attention module, self attention is use;
Lines 20 to 22 in d64c736
I think Query, Key , and Value in attention modules generally seems to be created by Fully Connected Layer (nn.Linear
) , But convolutional layers is used in this network.
for example, ViT repo;
I'm not a specialist in Transformer, so there are some ideas using convolutional layers for extract Q, K, and V.
Please tell me about :
Regarding the use of self-attention. Before the activation function uses sigmoid, do you need to reduce d**-0.5, because Transformer uses softmax, and it is scaled before operation.
Excuse me, mean Dice is greater than 1 when I set --test_path to './TestDataset/Kvasir' './TestDataset/CVC-ColonDB' and './TestDataset/ETIS-LaribPolypDB'.I don't know why that is.
Hello, I am very sorry to have occupied your study time. I have a question to ask you! The graphics card of my desktop computer is 3090, I downloaded the source code on your homepage (Github), and conducted several experiments, adding the indexes of mDice and mIOU. After testing and comparing the results of many experiments, I found that for the test dataset Kvasir, the difference of mDice indexes was as high as 1.27 percent. For the other four test sets, the gap may be larger, which is not normal. Why is this? Sorry to trouble you. Sorry again for taking up your time!
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.