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
Y,Cb,Cr channels of the image? #18
Comments
Hi Asif,
Thanks for your interest.
Converting RGB to YCbCr is part of JPEG compression. It claims human eyes
are more sensitive to Green color, thus compression in YCbCr space better
reserves information in green color (when you enlarge epsilon, you can
observe more green stuff reserves)
Hope it helps.
Ranjie Duan
Asif Hanif ***@***.***> 于2022年11月26日周六 03:20写道:
… Hi @RjDuan <https://github.com/RjDuan>
Thank you for your work.
While creating components in following code, RGB channels of the images
are being treated as YCbCr channels. If this observation is correct, could
you please let me the reason behind re-naming RGB channels to YCbCr
channels. Or someone should actually convert an image from RGB to YCbCr
color space.
https://github.com/RjDuan/AdvDrop/blob/35ceeb0e1c4b258bf3995302fbce9f13b39860f0/infod_sample.py#L72
Thank you.
—
Reply to this email directly, view it on GitHub
<#18>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKEPNZZGZVTGXAZR7U2MXCLWKEGQHANCNFSM6AAAAAASLSD5QY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you for the response. I get your point about significance of YCbCr color space. My question is about the lines of code that are converting RGB to YCbCr color space. As far as I can see, RGB channels of the input images are not being converted to YCbCr in the code. Rather RGB channels are simply being considered YCbCr channels. Could you let me know the part of the code in the repo which is actually converting input batch of images from RGB to YCbCr color space in forward() of InfoDrop class. Thank you. |
Oh, sorry, I forgot I had commented out this part of code = = .
The code is in compression.py (def rgb_to_ycbcr(image)).
As with increasing of epsilon, I found the green blocks left are more
perceptible, so I commented out the transfer between rgb to YCbCr.
When the epsilon is small, there is no big difference.
You can try it by feeding images into def rgb_to_ycbcr() and then
performing the attack.
This part has no influence on the success rate, but impacts the
stealthiness of the generated adv. examples.
Hope it helps.
Asif Hanif ***@***.***> 于2022年11月26日周六 18:57写道:
… Thank you for the response. I get your point about significance of YCbCr
color space.
My question is about the lines of code that are converting RGB to YCbCr
color space. As far as I can see, RGB channels of the input images are not
being converted to YCbCr in the code. Rather RGB channels are simply being
considered YCbCr channels. Could you let me know the part of the code in
the repo which is actually converting image from RGB to YCbCr color space.
Thank you.
—
Reply to this email directly, view it on GitHub
<#18 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKEPNZ4J4ZX7NYIOTWHNSZLWKHUJPANCNFSM6AAAAAASLSD5QY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks @RjDuan for clarification. |
Hi @RjDuan
Thank you for your work.
While creating
components
in following code, RGB channels of the images are being treated as YCbCr channels. If this observation is correct, could you please let me the reason behind re-naming RGB channels to YCbCr channels. Or someone should actually convert an image from RGB to YCbCr color space.AdvDrop/infod_sample.py
Line 72 in 35ceeb0
Thank you.
The text was updated successfully, but these errors were encountered: