SunnyHaze / IML-ViT

Official repository of paper “IML-ViT: Benchmarking Image manipulation localization by Vision Transformer”
MIT License
184 stars 23 forks source link

Incorrect Mask prediction when convert to ONNX #29

Closed NguyenHongSon1103 closed 1 month ago

NguyenHongSon1103 commented 1 month ago

First of all, thank you for your research. Have you try to convert IML-ViT model to onnx format ? I found that in the source code of MAE model (file window_attention_ViT.py), some function include pure python code which cause TracerWarning (line 37, 39, 51, 52, 53, ...) It make the value of that variables become constant, lead to inccorect result. If you or someone can convert this model to onnx format successfully, please help. Thank you.

NguyenHongSon1103 commented 1 month ago

Its my mistake that I not do sigmoid to the mask, although warning still exists but the result is correct. So I close issue.

SunnyHaze commented 1 month ago

Thank your attention to our work. I am also glad to hear that your project is finally working well. Honestly speaking, we haven't tried to implement it on ONNX. Thus, there may not be much we can assist you with from the authors. However, placing an issue here and seeking assistance from the open-source community is a good idea anyway.

Good luck!