Giter Site home page Giter Site logo

cae's People

Contributors

alexandru-dinu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cae's Issues

How can I obtain the image encoding?

Hello. When I run the test.py, the only thing I can obtain is the decoded image. However, I am interested in knowing the compression ratio. Could you please provide instructions on how to obtain the image encoding? Thank you.

Entropy coding?

thanks for open sourcing your code. But I was wondering where is the part about entropy coding (as used in the paper). How were you able to achieve the low compression ratios without entropy coding?

thanks!

Easy manip of latent representation

Easily store the latent representation of the image into a custom file format:

<HEADER | ?? bytes>: number of H patches, number of W patches, patch size
<flatten_patch_i_j>

Can you resolve the plaid pattern in images?

Hello and thank you for sharing your good repository.
With attention, I can see a plaid pattern in reconstructed images which I believe is the result of patching the image (The border of reconstructed patches has a little less quality). Do you know any way to resolve that (maybe overlapping patches (which may increase the compression size))?

Refactoring

  • migrate to latest PyTorch
  • ditch tensorboardX
  • use pathlib

About result

@alexandru-dinu
Can i ask you if the test result of your trained model reach PSNR of 37 ,SSIM of 0.96 , MS-SSIM of 0.98 at 2bpp as mentioned in the paper “LOSSY IMAGE COMPRESSION WITH COMPRESSIVE AUTOENCODERS”?

where is the training dataset?

I can't find the training dataset refered in the paper .Could you tell me the dataset which you used to train this model? Thank you so much if you can help me .

the range of values of the matrix exc_x

with torch.no_grad():
r = torch.rand(ec3.shape).cuda()
p = (1 + ec3) / 2
eps = torch.zeros(ec3.shape).cuda()
eps[r <= p] = (1 - ec3)[r <= p]
eps[r > p] = (-ec3 - 1)[r > p]
# encoded tensor
self.enc_x = 0.5 * (ec3 + eps + 1) # (-1|1) -> (0|1)
y = self.enc_x * 2.0 - 1 # (0|1) -> (-1|1)

It is easy to known
ec3 ∈ (-1,1)
r ∈ (0,1)
p ∈ (0,1)
Then ,(1 - ec3) ∈ (0,2) , (-ec3 - 1) ∈ (-2,0) . Thus , in my opinion,the range of values of the matrix eps should be (-2,2) and (ec3 + eps ) ∉(-1,1).Am I wrong?

Use encoder and decoder separately in different files

Hi, I am wondering how I can use the encoder and decoder separately? I managed to save the latent representations of the single patches. Now in a second step (in another file) I would like to reconstruct the patches again so that I get the complete image again. Using model.decode() worked fine on the single encoded patches. But I did not manage to reconstruct a complete image.
Is there a simple step how I can fix that?
I would very much appreciate your input on that :)

train problem

RuntimeError: invalid argument 1: must be strictly positive at /pytorch/torch/lib/TH/generic/THTensorMath.c:2247

ValueError: not enough values to unpack (expected 3, got 2)

Traceback (most recent call last):
File "train.py", line 94, in
train(args)
File "train.py", line 36, in train
for bi, (img, patches, _) in enumerate(dataloader):
File "/home/tq/anaconda3/envs/p3.6torch0.4.1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 314, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/tq/anaconda3/envs/p3.6torch0.4.1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 314, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/tq/nets/cae/image_folder.py", line 20, in getitem
h, w, c = img.shape[:3] #delete [:3]
ValueError: not enough values to unpack (expected 3, got 2)

Model Architecture related question

Hi @alexandru-dinu
thank you for sharing your work on Lucas et. al. paper. I have the following questions:

  1. Did u implement the quantization + Entropy coding (as mentioned in the paper)? I do not see this in the code. In neural network based compression model, these 2 layers are the novelty. If they are absent how is your model able to compress images?
  2. How is it possible to arrive at a bpp when training these models (in paper they use 3-bit rates 0.25, 0.372 and 0.5).

thanks.

How Long does It Take to Train Your Model

I saw from ur readme doc that you take ~100k images for training. I would like to know more abt the training details, such as:

  1. What is the resolution of the training images?
  2. What GPU device you use on training?
  3. How long did you take to train ur model?

Thank you,
Alex

Is the loss function correct?

Thanks for sharing. But I believe the loss function used in the paper "Lossy Image Compression with Compressive Autoencoders" is supposed to be Rate-distortion, why is MSE loss used instead?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.