Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about infer on JPEG images and Quant table #56

Closed
PhmHiu opened this issue May 8, 2024 · 3 comments
Closed

Question about infer on JPEG images and Quant table #56

PhmHiu opened this issue May 8, 2024 · 3 comments

Comments

@PhmHiu
Copy link

PhmHiu commented May 8, 2024

Hi, I have concerns about two things:

  • Firstly, what is the correct way to infer with the JPEG image. Do I read the dct and quant table from the original jpeg file or I first read it and convert to Y-channel, save that image with 100% quality and read dct, quant table from the saved file?
  • Secondly, the model got error when the value in quant table greater than 63 because the model architecture will only embed value of quant table from 0 to 63. Is it an error in the model or we must clip the value of quant table to this range?

Thank you, hope to hear back from you soon

@qcf-568
Copy link
Owner

qcf-568 commented May 8, 2024

Hello, the answers are as follows:

  1. Read the dct and quant table from the original jpeg file.
  2. This V1 version of DTD only can tackle image compressed with quality>=75, which means all values of the quant table should<=64.

Thank you

@PhmHiu
Copy link
Author

PhmHiu commented May 9, 2024

Thank you very much. I have another small question, can the model work well with scanned documents, or it only works well with image capture from camera

@qcf-568
Copy link
Owner

qcf-568 commented May 9, 2024

This version of DTD mainly works well with image capture from camera, since it relys on block artifact grids to achieve better performance, and the block artifact grids only exist in compressed image. If scaned documents are compressed before tampering (e.g. images in the T-SROIE dataset), this version of DTD can also work well on them.

@PhmHiu PhmHiu closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants