GuoLanqing / ShadowFormer

ShadowFormer (AAAI2023), Pytorch implementation
MIT License
129 stars 17 forks source link

Image format impact and support #12

Closed hnrna closed 1 year ago

hnrna commented 1 year ago

Hi, your work seems to be working very well, thank you very much!

However, I encountered some issues with the file format during my attempts, as follows.

  1. Noticed that is_png_file(x) is used in dataset.py for the data to be loaded, does this make the program unable to support file formats other than png? (While the ISTD/ISTD+ dataset uses the png format, the data in SRD and other customizations may be jpg.)

    https://github.com/GuoLanqing/ShadowFormer/blob/a55cf042a1f9371d0e56a1299c245604d6663b6f/dataset.py#L27-L29 https://github.com/GuoLanqing/ShadowFormer/blob/a55cf042a1f9371d0e56a1299c245604d6663b6f/dataset.py#L92-L94

  2. Would consideration be given to adding support for other common image types? Eg: jpg

  3. Would it affect the operation of subsequent programs or the effectiveness of the model if images in other formats are supported only by modifying the loading code?

GuoLanqing commented 1 year ago

Thanks for your suggestion. You can revise the data loading code and it can support other image formats. I will also revise the code later.

hnrna commented 1 year ago

Thank you for your support and answers!

Temporarily implemented loading other types of images by removing if is_png_file(x) in the dataloader, not sure if this modification has other implicit effects on the subsequent model for now.