jiyuanfeng / mctrans Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
我是用自己的数据集,使用模型mctrans_vgg32_d5.py,
显示:Traceback (most recent call last):
File "G:/codelearn/papercode329/3MCTrans-master/tools/train.py", line 128, in
main()
File "G:/codelearn/papercode329/3MCTrans-master/tools/train.py", line 103, in main
print(cfg.log_level)
File "g:\pythonproject\swin-zhenghe\mmcv-1.3.1\mmcv\utils\config.py", line 425, in getattr
return getattr(self._cfg_dict, name)
File "g:\pythonproject\swin-zhenghe\mmcv-1.3.1\mmcv\utils\config.py", line 44, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'log_level'
请问有人知道什么问题吗,感谢
手动将log level设置为0
出现错误:
AttributeError: 'ConfigDict' object has no attribute 'data'
我怀疑是配置文件没弄好,有大哥知道嘛
I want to know more about the folding operation in the model, it is said that details can be found in the Appendix, but I cannot find the Appendix. Any idea? Thanks.
+---------------------------+--------+-------+-------+--------+-----------+--------+
| Class | Dice | Acc | IoU | Fscore | Precision | Recall |
+---------------------------+--------+-------+-------+--------+-----------+--------+
| Background | 142.16 | 600.0 | 245.8 | 142.16 | 80.63 | 600.0 |
| Neoplastic | 0.0 | 0.0 | 0.0 | nan | nan | 0.0 |
| Inflammatory | 0.0 | 0.0 | 0.0 | nan | nan | 0.0 |
| Connective | 0.0 | 0.0 | 0.0 | nan | nan | 0.0 |
| Dead | 0.0 | 0.0 | 0.0 | nan | nan | 0.0 |
| Non-Neoplastic Epithelial | 0.0 | 0.0 | 0.0 | nan | nan | 0.0 |
+---------------------------+--------+-------+-------+--------+-----------+--------+
这是我跑完模型它在log中统计的结果,为什么所有结果都是0?
而且我没有发现生成的预测图。
Is there a simple test pipeline to visualize the prediction, or i just need to follow the guidance in mmseg?
But it seems, with a custom model is cant be tested as in guidance.
for example as i rewrite the /envs/mctrans/lib/python3.7/site-packages/mmseg/models/builder.py, in your builder there is no build_segmentor method
Traceback (most recent call last):
File "/home/MCTrans/test/result_visualize_single.py", line 6, in
from mmseg.apis import init_segmentor, show_result_pyplot, inference_segmentor
File "/home/miniconda3/envs/mctrans/lib/python3.7/site-packages/mmseg/apis/init.py", line 2, in
from .inference import inference_segmentor, init_segmentor, show_result_pyplot
File "/home/miniconda3/envs/mctrans/lib/python3.7/site-packages/mmseg/apis/inference.py", line 9, in
from mmseg.models import build_segmentor
ImportError: cannot import name 'build_segmentor' from 'mmseg.models'
Is there a simple test pipeline?
Dear Author
I didn't see the use of simple flipping to enhance the training image in your code
Hi, thank you for your work. But I've noticed some inconsistencies with your paper:
But maybe I misunderstood something? Look forward to your reply.
Hi!
Thanks for your code. I have a question about the Auxillary Loss. What's the gt for Auxillary Loss? Thank you very much!
首先感谢作者的工作!您提供的PanNuke数据集里面有split-images(masks)-npy和split-images(masks),前者是.npy格式,后者是.png格式,请问使用这两种不同格式的数据集进行训练和测试是等价的吗?因为我load了npy格式的,发现其中的数据也是0~255的,和png格式的数据是一样的,是不是代表着使用.png格式的数据可以获得和.npy格式数据的同样效果?感谢!
Dear author:
什么时候公开多GPU训练的代码呢,想学习一下
How can I solve this problems? Thanks you very much!!!
Traceback (most recent call last): File "Z:\py_item\7_MCTrans-master\MCTrans-master\tools\train.py", line 14, in <module> from mctrans.pipline import SegPipline File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\pipline\__init__.py", line 1, in <module> from .segpipline import SegPipline File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\pipline\segpipline.py", line 7, in <module> from mctrans.models import build_model File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\models\__init__.py", line 1, in <module> from .centers import * File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\models\centers\__init__.py", line 1, in <module> from .mctrans import MCTrans File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\models\centers\mctrans.py", line 8, in <module> from ..ops.modules import MSDeformAttn File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\models\ops\modules\__init__.py", line 9, in <module> from .ms_deform_attn import MSDeformAttn File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\models\ops\modules\ms_deform_attn.py", line 21, in <module> from ..functions import MSDeformAttnFunction File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\models\ops\functions\__init__.py", line 9, in <module> from .ms_deform_attn_func import MSDeformAttnFunction File "Z:\py_item\7_MCTrans-master\MCTrans-master\mctrans\models\ops\functions\ms_deform_attn_func.py", line 18, in <module> import MultiScaleDeformableAttention as MSDA ImportError: DLL load failed: 找不到指定的模块。
你好,我在运行程序时,出现了如下错误:
FileNotFoundError: file "/home/yyang17/projects/MCTrans/configs/debug/unet_vgg32_d5_256x256_400ep_pannuke.py" does not exist
在项目里面搜索 unet_vgg32_d5_256x256_400ep_pannuke.py 也没有发现,请问是否有部分模型文件没有上传呢?
Hello, i have a"Single channel image training error" problems。How can I solve that? Could I get your some suggestions? Thank you very much!!!
The MCTrans link given in the readme section is not accessible
你好,我将这个模型用于别的数据集(19类),并更改了配置文件里的类别个数,但似乎并不能直接运行起来,出现了下面的错误:
Traceback (most recent call last):
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/train.py", line 131, in <module>
main()
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/train.py", line 127, in main
SegPipline(cfg, distributed, not args.no_validate).run()
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/pipline/segpipline.py", line 99, in run
self.runner.run(self.data_loaders, self.cfg.workflow, self.cfg.max_epochs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 50, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 30, in run_iter
**kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 75, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/models/segmentors/base.py", line 152, in train_step
losses = self(**data_batch)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func
return old_func(*args, **kwargs)
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/models/segmentors/base.py", line 122, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/models/segmentors/encoder_decoder.py", line 92, in forward_train
loss_aux = self._auxiliary_head_forward(x, seg_label, return_loss=True)
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/models/segmentors/encoder_decoder.py", line 81, in _auxiliary_head_forward
return self.aux_head.forward_train(x, seg_label)
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/models/heads/mctrans_aux_head.py", line 49, in forward_train
outputs = self.ca(inputs_flatten)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/models/trans/transformer.py", line 145, in forward
query = layer(query, src)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/csip-102/CaiJiaXin/MCTrans-master/mctrans/models/trans/transformer.py", line 122, in forward
tgt2 = self.cross_attn(tgt, src, src)[0]
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/activation.py", line 1038, in forward
attn_mask=attn_mask)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 5025, in multi_head_attention_forward
k = k.contiguous().view(-1, bsz * num_heads, head_dim).transpose(0, 1)
RuntimeError: shape '[-1, 152, 16]' is invalid for input of size 2752512
我看到关闭的问题中也有类似问题,但我按照他的修改方式也并不能成功,期待你的解答
hello
can the inference refer to https://github.com/JiYuanFeng/mmsegmentation/blob/master/demo/inference_demo.ipynb
thanks
When can the code be made public?
Hi,
Thanks for your great job, i like your algorithm very much.
i have been trying to reproduce your result, may i ask how big is your gpu memory, i have 16GB, but always "CUDA out of memory."
The implement of NonLocalUNet in this repo is VGG encoder + NonLocal center + UNet decoder, but the official implement is: replacing upsample and downsample with Global Aggregation Block, reduce the layers of UNet and replace the Concatenation with Add.
Refer to https://github.com/divelab/Non-local-U-Nets、https://arxiv.org/abs/1812.04103
Hello, I would like to know the meaning of the specific proxy embedding.
I use the pannuke dataset. But I found an error.
Traceback (most recent call last): File "tools/train.py", line 138, in <module> main() File "tools/train.py", line 135, in main SegPipline(cfg, distributed, not args.no_validate).run() File "/home/aMI_projects/MCTrans-master/mctrans/pipline/segpipline.py", line 99, in run self.runner.run(self.data_loaders, self.cfg.workflow, self.cfg.max_epochs) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run epoch_runner(data_loaders[i], **kwargs) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 50, in train self.run_iter(data_batch, train_mode=True, **kwargs) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 30, in run_iter **kwargs) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 75, in train_step return self.module.train_step(*inputs[0], **kwargs[0]) File "/home/aMI_projects/MCTrans-master/mctrans/models/segmentors/base.py", line 152, in train_step losses = self(**data_batch) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func return old_func(*args, **kwargs) File "/home/aMI_projects/MCTrans-master/mctrans/models/segmentors/base.py", line 122, in forward return self.forward_train(img, img_metas, **kwargs) File "/home/aMI_projects/MCTrans-master/mctrans/models/segmentors/encoder_decoder.py", line 92, in forward_train loss_aux = self._auxiliary_head_forward(x, seg_label, return_loss=True) File "/home/aMI_projects/MCTrans-master/mctrans/models/segmentors/encoder_decoder.py", line 81, in _auxili ary_head_forward return self.aux_head.forward_train(x, seg_label) File "/home/aMI_projects/MCTrans-master/mctrans/models/heads/mctrans_aux_head.py", line 51, in forward_train outputs = self.ca(inputs_flatten) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/aMI_projects/MCTrans-master/mctrans/models/trans/transformer.py", line 149, in forward query = layer(query, src) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/aMI_projects/MCTrans-master/mctrans/models/trans/transformer.py", line 124, in forward tgt2 = self.cross_attn(tgt, src, src)[0] File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/torch/nn/modules/activation.py", line 1045, in forward attn_mask=attn_mask, average_attn_weights=average_attn_weights) File "/home/anaconda3/envs/mctrans/lib/python3.7/site-packages/torch/nn/functional.py", line 5301, in multi_head_attention_forward k = k.contiguous().view(k.shape[0], bsz * num_heads, head_dim).transpose(0, 1) RuntimeError: shape '[32, 48, 16]' is invalid for input of size 22020096
Dear Author
I don't see the use of CA module in mctrans.py. Is the CA module useless?
bash make.sh
是不是需要cuda11?
Scource code cannot be aquired.
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.