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

How I can get the compressed image only when save image ? , (not the original image and the compressed image) #25

Closed
amrk723 opened this issue Jun 16, 2021 · 2 comments
Assignees

Comments

@amrk723
Copy link

amrk723 commented Jun 16, 2021

No description provided.

@alexandru-dinu
Copy link
Owner

Related to #19.

@alexandru-dinu
Copy link
Owner

Hello, @amrk723

I have pushed some changes (ff75a69).

Now you can run

python test.py --config ../configs/test.yaml

and in the experiment folder there will be dumped a file named enc_<batch_idx>.pt -- this is the encoded tensor.

Also, there's now model.encode(x) and model.decode(x), so you can reconstruct the image by doing:

enc = torch.load('enc.pt')
dec = model.decode(enc)

This is work in progress, I will merge on master when I'm comfortable with how things look.

Thanks!

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