Justin-Tan / generative-compression

TensorFlow Implementation of Generative Adversarial Networks for Extreme Learned Image Compression
MIT License
512 stars 106 forks source link

Questions about encoding #32

Open shellhuang1227 opened 5 years ago

shellhuang1227 commented 5 years ago

Hello, while reading the paper, it proposed "When encoding the channels of w^ to a bit-stream, we use an arithmetic encoder where frequencies are stored for each channel separately and then encode them in a static (non-adaptive) manner (i.e. context model and adaptive arithmetic encoding)." But in your code, the quantized value w^ is concatenated with noise v to form the latent vector z, and then the generator G tries to generate an image x^ = G(z). I did not find the step: encoding the channels of w^ to a bit-stream in context model and adaptive arithmetic encoding. Did you not conside this step? Thank you very much.

Justin-Tan commented 5 years ago

Hey,

It’s from section 4.1 of the paper - concatenation of the representation with noise drawn from a fixed prior to form some latent vector Z.

Cheers, Justin

On Tue, 30 Jul 2019 at 8:13 pm, shellhuang1227 notifications@github.com wrote:

Hello, while reading the paper, it proposed "When encoding the channels of w^ to a bit-stream, we use an arithmetic encoder where frequencies are stored for each channel separately and then encode them in a static (non-adaptive) manner (i.e. context model and adaptive arithmetic encoding)." But in your code, the quantized value w^ is concatenated with noise v to form the latent vector z, and then the generator G tries to generate an image x^ = G(z). I did not find the step: encoding the channels of w^ to a bit-stream in context model and adaptive arithmetic encoding. Did you not conside this step? Thank you very much.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Justin-Tan/generative-compression/issues/32?email_source=notifications&email_token=AGRNY6H66G66JDIPUK3EO23QCAH3LA5CNFSM4IH2WNI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCIIAIA, or mute the thread https://github.com/notifications/unsubscribe-auth/AGRNY6C6R2XJEIHD3PHGUCLQCAH3LANCNFSM4IH2WNIQ .

shellhuang1227 commented 5 years ago

Yeah, I know it’s from section 4.1 of the paper. But "encoding the channels of w^ to a bit-stream in context model and adaptive arithmetic encoding" come from section 5.1 of the paper. However, I did not find it in your code. Thank you very much

Justin-Tan commented 5 years ago

Hi,

Very sorry, misread your question. I didn’t consider those steps in my code. Unfortunately I don’t have much experience with information theory, but that does look interesting to me for the future.

On Wed, 31 Jul 2019 at 4:20 pm, shellhuang1227 notifications@github.com wrote:

Yeah, I know it’s from section 4.1 of the paper. But "encoding the channels of w^ to a bit-stream in context model and adaptive arithmetic encoding" come from section 5.1 of the paper. However, I did not find it in your code. Thank you very much

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Justin-Tan/generative-compression/issues/32?email_source=notifications&email_token=AGRNY6ESF2EWQ7HQVFBVBHLQCEVLNA5CNFSM4IH2WNI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3GG2WA#issuecomment-516713816, or mute the thread https://github.com/notifications/unsubscribe-auth/AGRNY6BUMDKXYXH4WKR4J7TQCEVLNANCNFSM4IH2WNIQ .

shellhuang1227 commented 5 years ago

Yeah, very looking forward to it. By the way, the lack of the step I mentioned above will not influence the overall network's capability and just reduced the compression ratio, right? Thanks for your reply.

Justin-Tan commented 5 years ago

I think it shouldn’t actually affect the network ability and will just improve the compression, but not 100% sure.

On Wed, 31 Jul 2019 at 4:33 pm, shellhuang1227 notifications@github.com wrote:

Yeah, very looking forward to it. By the way, the lack of the step I mentioned above will not influence the overall network's capability and just reduced the compression ratio, right? Thanks for your reply.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Justin-Tan/generative-compression/issues/32?email_source=notifications&email_token=AGRNY6HCBKKX7K54WCB3UKLQCEW35A5CNFSM4IH2WNI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3GHVDY#issuecomment-516717199, or mute the thread https://github.com/notifications/unsubscribe-auth/AGRNY6EJ2JES46NYGOLZ5Q3QCEW35ANCNFSM4IH2WNIQ .

shellhuang1227 commented 5 years ago

OK. Thanks.