Royalvice / DocDiff

ACM Multimedia 2023: DocDiff: Document Enhancement via Residual Diffusion Models. Also contains 1597 red seals in Chinese scenes, along with their corresponding binary masks.
https://www.aibupt.com/
MIT License
196 stars 21 forks source link

Issue with inference #30

Open inamdarmihir opened 1 month ago

inamdarmihir commented 1 month ago

Hi, can you help me out with the inference code for super resolution of my test images, I am trying to implement your inference.py in Colab, will it work there, any particular comments or suggestions to implement this? @Royalvice @eltociear Thanks.

Royalvice commented 1 month ago

Hi, you need to replace the network structure of DocDiff with some classical super-resolution network structures (such as adding more upsampling modules or attention modules), and then train it on your own document dataset.

inamdarmihir commented 1 month ago

Hi, I just wish to use it for deblurring or regeneration on (5-10) few test examples only at inference, I don't wish to retrain the network completely. Is that possible? Thanks and Regards, Mihir Inamdar

On Mon, Jun 3, 2024 at 1:34 PM Zongyuan Yang @.***> wrote:

Hi, you need to replace the network structure of DocDiff with some classical super-resolution network structures (such as adding more upsampling modules or attention modules), and then train it on your own document dataset.

— Reply to this email directly, view it on GitHub https://github.com/Royalvice/DocDiff/issues/30#issuecomment-2144534032, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJME6RKPD5JPKFTU6RBHGH3ZFQPRVAVCNFSM6AAAAABISLXNLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBUGUZTIMBTGI . You are receiving this because you authored the thread.Message ID: @.***>

Royalvice commented 1 month ago

If possible, could you share some samples?

inamdarmihir commented 1 month ago

Hi,

If you could run this with these example images(attached below one you can save in the demo folder of the cloned repo, as gt_image, and other as the input_image which is low_res) in colab, and check if it works and the final cell I wish to save the super res. image.

I am using the DocDiff_inference.ipynb https://drive.google.com/file/d/1LrdeUANyaWmSzbL9gDvOz8rwbwT4tPZ-/view?usp=sharing file which is shared in the repo with some edits. Please do check, and let me know as soon as possible.

Thank you Regards, Mihir Inamdar

On Mon, Jun 3, 2024 at 1:45 PM Zongyuan Yang @.***> wrote:

If possible, could you share some samples?

— Reply to this email directly, view it on GitHub https://github.com/Royalvice/DocDiff/issues/30#issuecomment-2144557249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJME6ROUHCMKGDIUG7RMICDZFQQYXAVCNFSM6AAAAABISLXNLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBUGU2TOMRUHE . You are receiving this because you authored the thread.Message ID: @.***>