Linwei-Chen/FreqFusion

FreqFusionCARAFEFPN缺失

Closed this issue · 15 comments

我想问一下是否没有放入FreqFusionCARAFEFPN这个neck模块,我在mmdetection中没有找到

大佬,ModuleNotFoundError: No module named 'mmcv.ops.carafe',这个是mmcv版本的原因吗

大佬,ModuleNotFoundError: No module named 'mmcv.ops.carafe',这个是mmcv版本的原因吗

You can refer to https://mmcv.readthedocs.io/en/v1.7.0/get_started/installation.html and select the appropriate installation command depending on the type of system, CUDA version, PyTorch version, and MMCV version.

大佬,ModuleNotFoundError: No module named 'mmcv.ops.carafe',这个是mmcv版本的原因吗

很有可能没有安装正确

File "/usr/local/anaconda3/lib/python3.9/site-packages/mmcv/ops/carafe.py", line 142, in forward
ext_module.carafe_forward(
RuntimeError: carafe_forward_impl: implementation for device cpu not found.
请问这是mmcv安装出了问题吗

File "/usr/local/anaconda3/lib/python3.9/site-packages/mmcv/ops/carafe.py", line 142, in forward ext_module.carafe_forward( RuntimeError: carafe_forward_impl: implementation for device cpu not found. 请问这是mmcv安装出了问题吗

看样子你是用CPU跑的?这个库可能需要GPU才能跑通

File "/home/data/Code/00_ObjectDetection/00_OpenMMLab/mmdetv2/mmdetection/mmdet/models/necks/FreqFusion.py", line 180, in _forward
compressed_hr_feat = compressed_hr_feat + compressed_hr_feat - carafe(compressed_hr_feat, mask_hr_init, self.highpass_kernel, self.up_group, 1)
File "/miniconda/envs/mmdet_v228/lib/python3.8/site-packages/mmcv/ops/carafe.py", line 141, in forward
ext_module.carafe_forward(
RuntimeError: expected scalar type Half but found Float

此处在使用mmcv/ops/carafe.py中的这个上采样数据对齐方式时报的标量类型不一致时什么原因?mmcv-full从1.5.0升级到v1.5.3也一样报错。

检查一下是不是开了半精度?强制将输入FreqFusion的feature都x=x.float试试

检查一下是不是开了半精度?强制将输入FreqFusion的feature都x=x.float试试

作者您好!非常感谢您的贡献!请问您的工作可以理解为对 原始hr和lr的特征进行增强,并将hr的进行一个上采样吗?您在实验部分中hr和lr 的channel不同时,汇总不同层次特征时是对低channel特征进行卷积升维再与高channel特征拼接吗?非常感谢您的答复

可以这么简单理解,注意是对小尺寸的lr_feat分辨率提高2倍哈。通道不同的情况可以参考SegNeXt+FreqFusion的实现,可以不用升维,直接拼接即可。

可以这么简单理解,注意是对小尺寸的lr_feat分辨率提高2倍哈。通道不同的情况可以参考SegNeXt+FreqFusion的实现,可以不用升维,直接拼接即可。

非常感谢!

作者你好,我在运行你的代码时出现了没有被注册的错误。
Traceback (most recent call last):
File "tools/train.py", line 247, in
main()
File "tools/train.py", line 212, in main
model = build_detector(
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdet/models/builder.py", line 58, in build_detector
return DETECTORS.build(
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/utils/registry.py", line 237, in build
return self.build_func(*args, **kwargs, registry=self)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
KeyError: "FasterRCNN: 'FreqFusionCARAFEFPN is not in the models registry'"