YangSun22 / TC-MoA

Task-Customized Mixture of Adapters for General Image Fusion (CVPR 2024)
62 stars 5 forks source link

融合图像异常 #4

Open Afreshbird opened 5 months ago

Afreshbird commented 5 months ago

您好,我使用您提供的权重文件执行 main_predict.py,不论是使用 TC-MoA-Base.pth 还是 TC-MoA-Large.pth 或者是 TC-MoA-Large-AddM3FD.pth,得到的融合图像都如下所示: 01 190038 我尝试把图片保存为灰度,但还是如此: FLIR_00288 怎么才能得到正常的图像?

另外,main_predict.py 文件中存在bug 函数 prepare_model 的函数体应该改为如下形式: ` arch = config["model_type"] if model_select == "Base": models_mae = VIT_MAE_Origin

model = getattr(models_mae, arch)(config).to(config["device"])
checkpoint = torch.load(chkpt_dir)
model.load_state_dict(checkpoint['model'], strict = False)
return model

`

YangSun22 commented 5 months ago

啊我懂了 我存的参数命名和现在的不一样呃啊 我有时间会尽快更新

YangSun22 commented 5 months ago

在我科研过程中的模块命名和现在整理的代码是不一样的,导致命名不一样。参数无法load

Afreshbird commented 5 months ago

在我科研过程中的模块命名和现在整理的代码是不一样的,导致命名不一样。参数无法load

我对程序做了改动,可以加载您提供的权重文件。但图像融合结果异常。是否是权重文件上传错了?

Afreshbird commented 5 months ago

想跟您的方法做一下对比实验,但这样的融合结果显然是不正确的。

YangSun22 commented 5 months ago

是的 我尽量今晚处理一下这个BUG。并且我会直接上传我的融合结果。感谢反馈!

Afreshbird commented 5 months ago

是的 我尽量今晚处理一下这个BUG。并且我会直接上传我的融合结果。感谢反馈!

ok,感谢您的回复!

YangSun22 commented 5 months ago

Done! 我把融合结果和处理老ckp的预测文件上传了。如果还有问题及时反馈。

I've uploaded the fusion results and the prediction file dealing with the old ckp. Keep me posted if there are still problems.

Afreshbird commented 5 months ago

Done! 我把融合结果和处理老ckp的预测文件上传了。如果还有问题及时反馈。

I've uploaded the fusion results and the prediction file dealing with the old ckp. Keep me posted if there are still problems.

Wonderful !

JarvisKevin commented 4 months ago

Could you please tell me where is the "TC-MoA-Base.pth 还是 TC-MoA-Large.pth 或者是 TC-MoA-Large-AddM3FD.pth"? I only find the link of "!wget -nc https://dl.fbaipublicfiles.com/mae/visualize/mae_visualize_vit_large_ganloss.pth" and "!wget -nc https://dl.fbaipublicfiles.com/mae/visualize/mae_visualize_vit_base.pth". Thank you very much! @Afreshbird @YangSun22