Giter Site home page Giter Site logo

mffn_cod's People

Contributors

dwardzheng avatar xcvil 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

Watchers

 avatar  avatar

mffn_cod's Issues

about train

Hello, I am very interested in this job. I tried to download the code deployment environment and train the model. I found the following errors:
image
I wonder if an error was reported due to incomplete code (indeed, the pi attribute was not found in pytorch)

关于CAMV模块的疑问

您好,感谢您杰出的工作。我想请问一下在CAMV模块中attn_md经过tl.tenalg.mode_dot()函数计算之后是不是得到(B, 1, mm_size, mm_size)的attention map,以及为什么要使用torch.softmax(dim=1),这似乎将attn_md变成了全为1.的tensor?

PR curves and F-measure curves

Nice work, but I have a question while reading, how did you make your PR curves and F-measure curves, looking forward to your reply!

语法问题请教

pipeline.scheduler.py中,
image

There is an error.How to understand and resolve this sentence?
if half_cycle := cfg.get("half_cycle"):
half_cycle -= 1

Can I ask that how long did it take you to train the model

I tried to run the code on a single RTX 1080Ti with batch_size set to 4, and found that it will take about 60 hours to complete the training. It appears to be too long.
6cd69655c82c82e7d5f96823d443342

So I want to ask that how long did it take you to train the model, and what device did you use. Hope to see more details.

Testing Issue.

Firstly, thank you for your great work!

However, I encountered some problems while running test.sh.

At first, the error shows that in /root/MFFN_COD/dataset/MultiView_cod.py something went wrong:

Traceback (most recent call last):
  File "test.py", line 146, in <module>
    main()
  File "test.py", line 142, in main
    testing(model=model, cfg=cfg)
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "test.py", line 118, in testing
    seg_results = test_once(
  File "test.py", line 78, in test_once
    for batch_id, batch in pgr_bar:
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 652, in __next__
    data = self._next_data()
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1347, in _next_data
    return self._process_data(data)
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1373, in _process_data
    data.reraise()
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
    raise exception
NameError: Caught NameError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
    data = fetcher.fetch(index)
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/MFFN_COD/dataset/MultiView_cod.py", line 49, in __getitem__
    "image_c1": image_c_1,
NameError: name 'image_c_1' is not defined

Then I edited this file and make some changes:
line47 from

return dict(
    data={
        "image_c1": image_c_1,
        "image_o": image_o,
        "image_c2": image_c_2,
        "image_a1": image_a_1,
        "image_a2": image_a_2,
    },

to

return dict(
    data={
        "image_c1": image_0_5,
        "image_o": image_1_0,
        "image_c2": image_1_5,
        "image_a1": image_a_1,
        "image_a2": image_a_2,
    },

Then after running again, another problem showed up in /root/MFFN_COD/methods/MFFN/MFFN.py:

Traceback (most recent call last):
  File "test.py", line 146, in <module>
    main()
  File "test.py", line 142, in main
    testing(model=model, cfg=cfg)
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "test.py", line 118, in testing
    seg_results = test_once(
  File "test.py", line 85, in test_once
    logits = model(data=batch_images)
  File "/usr/local/miniconda3/envs/MFF/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/MFFN_COD/methods/module/base_model.py", line 17, in forward
    results = self.test_forward(*args, **kwargs)
  File "/root/MFFN_COD/methods/MFFN/MFFN.py", line 416, in test_forward
    output = self.body(
TypeError: body() got an unexpected keyword argument 'l_scale'
terminate called without an active exception

Then I edited the code as shown below:
line415 from

    def test_forward(self, data, **kwargs):
        output = self.body(
            l_scale=data["image_c1"],
            o_scale=data["image_o"],
            s_scale=data["image_c2"],
            a1_scale=data["image_a1"],
            a2_scale=data["image_a2"],
        )
        return output["seg"]

to

    def test_forward(self, data, **kwargs):
        output = self.body(
            c1_scale=data["image_c1"],
            o_scale=data["image_o"],
            c2_scale=data["image_c2"],
            a1_scale=data["image_a1"],
            a2_scale=data["image_a2"],
        )
        return output["seg"]

Then the code works. However, the output of the evaluation process become a pure grey image with no predicted mask in it. I wonder what is wrong with my actions. Newbee to the field, look up to your great project.
Looking forward to your reply! THX

Can't download the pretrained model ResNet50

When I'm trying to run the code, it shows that I have to download the pretrained model:
image
Then I got an error:
image
And I can't download it from the link directly. How can I solve this problem?

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.