GithubHelp home page GithubHelp logo

hilab-git / ca-net Goto Github PK

View Code? Open in Web Editor NEW
167.0 167.0 39.0 38.15 MB

Code for Comprehensive Attention Convolutional Neural Networks for Explainable Medical Image Segmentation.

Python 100.00%
attention-mechanism

ca-net's People

Contributors

joegue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ca-net's Issues

main.py can't run

Traceback (most recent call last):
File "main.py", line 470, in
main(args)
File "main.py", line 305, in main
model = Test_Model[args.id](args, args.num_input, args.num_classes)
File "/home/SA/ljc/ca/CA-Net-master/Models/networks/network.py", line 28, in init
self.conv1 = conv_block(self.in_channels, filters[0])
File "/home/SA/ljc/ca/CA-Net-master/Models/layers/modules.py", line 21, in init
nn.Conv2d(ch_in, ch_out, kernel_size=3, stride=1, padding=1, bias=True),
File "/home/SA/anaconda3/envs/ljctorchpy3.6/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 332, in init
False, _pair(0), groups, bias, padding_mode)
File "/home/SA/anaconda3/envs/ljctorchpy3.6/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 22, in init
if in_channels % groups != 0:
TypeError: unsupported operand type(s) for %: 'Namespace' and 'int'
i have tried a lot versions pytorch,1.4.0/1.7.0/1.10.0, but don't work
do you konw how to fix it, thx!

RuntimeError

运行validation.py时,发生报错RuntimeError: The first supplied array does not contain any binary object,该怎么解决呢,谢谢!

Problem with the use of the dropout layer

In your code, drop_out=True

self.up4 = SE_Conv_Block(filters[4], filters[3], drop_out=True)

self.conv4 = conv_block(filters[2], filters[3], drop_out=True)

self.center = conv_block(filters[3], filters[4], drop_out=True)

if self.dropout:
out = nn.Dropout2d(0.5)(out)

I think this line of code will affect the results when testing. Because you init the dropout layer in forward function, the model.eval() can not change the status of this layer.

You can test it with the following code

import torch
from torch import nn
import numpy as np

class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.out = nn.Dropout2d(0.5)

    def forward(self, x):
        out = nn.Dropout2d(0.5)(x)
        # out = self.out(x)
        return out

if __name__ == '__main__':
    model = Net()
    model.eval()
    input_npy = np.array([[1.0, 2.0], [3.0, 4.0]])
    input_tensor = torch.from_numpy(input_npy)
    output = model(input_tensor)
    print(output)

If I didn't understand your code correctly, sorry in advance

table1 results

Dear author:
如何得到表1的结果呢,想学习一下

Skin Lesion Segmentation

In the paper, it's written that the images are randomly divided into three subsets for training, validating and testing, respectively.
While in this repo, authors perform 5-folds cross-validation.
So, which one is the true setting presented in the paper?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.