Justin-Tan / high-fidelity-generative-compression

Pytorch implementation of High-Fidelity Generative Image Compression + Routines for neural image compression
Apache License 2.0
411 stars 77 forks source link

[question] How to load hific iamge directly? #22

Open cczutang opened 3 years ago

cczutang commented 3 years ago

Do we need a decoder to parse the hific image?

Justin-Tan commented 3 years ago

Yes, images are encoded in .hific format - to decode this back to an image you need to first:

  1. Decode the bitstream to the latent representation using a standard entropy (here we use ANS).
  2. Pass the latent representation through the NN decoder/generator - this is the bottleneck.

Using compress.py will do both for you automatically provided you pass in the right flags. Check the usage guide for more info about this.