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

Slight color(chroma) brightness change #13

Open
Lee-lithium opened this issue Apr 25, 2022 · 2 comments
Open

Slight color(chroma) brightness change #13

Lee-lithium opened this issue Apr 25, 2022 · 2 comments

Comments

@Lee-lithium
Copy link

Hello @jiaxi-jiang, Sorry to bother you,

I test some non-photo content jpeg(2d drawing),
high FBCNN QF can preserve detail and noise,
but I notice some area have slight color(chroma) brightness change.

In this case, FBCNN QF 70 have slight brightness change on dark red area(red circle),
could you teach me how to improve color accurate for non-photo content?

original image (jpeg q75 420),
153967648-8051d8d9-38ec-4e2a-a4d7-fd0cd3e81c4d

png 8 bit depth (FBCNN QF 70)
153967648-8051d8d9-38ec-4e2a-a4d7-fd0cd3e81c4d_qf_70_red

Other sample(QF 30,50,70)

sample.zip

@jiaxi-jiang
Copy link
Owner

Hello, thanks for the proposed issue! From my observation, the brightness change is hard to distinguish, maybe just because the restored image is cleaner so looks different. On the other hand, blind jpeg image restoration is inherently an inverse problem, which means that for the same content in a compressed image, it can come from different uncompressed image by setting different quality factors. To eliminate this ambiguity, we learn prior knowledge from training data, but there must be difference of data distribution between training and testing images. So if you want to have better results on anime images, the best way is to directly train or finetune the model with anime images (I only use DIV2K and Flickr2K as training data). Besides, anime images usually don't contain much high-frequency information, so it should be enough to use my pre-trained model with very small qf to remove artifacts.

@Lee-lithium
Copy link
Author

Thank you for your reply :)

maybe just because the restored image is cleaner so looks different.

That make sense, I think jpeg chroma subsampling(420) and jpeg q75,
create a lot of tiny chroma artifacts in this dark red area,
and jpeg ycbcr also have some issue for red color.

In my test, I think FBCNN QF 80~90 can let that dark red area restore better,
and current pre-trained model is really good for different content,

I plan implement input jpeg decode to uint16 and convert to float32 tensor,
result float32 convert uint16, and output png 16 bit depth,
maybe use high precision and reduce precision loss can let result better.

I think use libjxl Butteraugli 3-norm finetune model,
probably can improve FBCNN chroma performance.

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