mage
mage copied to clipboard
Is there any script to generate the Fig.2 in the paper?
I want to mask part of the image and then rebuild it, not randomly.
We may release a colab for image editing in the next few months.
We may release a colab for image editing in the next few months.
I try to reproduce Fig.2, but I found the temperature is so sentitive for generating images. So how to set temperature in Fig.2?
The sampled_ids
can be sampled by torch.distributions.categorical.Categorical(logits=logits)
, but it also can be generate by torch.argmax(logits, dim=-1)
, so if I want to reproduce the Fig.2, should I change torch.distributions.categorical.Categorical(logits=logits)
to torch.argmax(logits, dim=-1)
?
by sample. temp=4.5, num_iter=1
# get token prediction
# sample_dist = torch.distributions.categorical.Categorical(logits=logits)
# sampled_ids = sample_dist.sample()
sampled_ids = torch.argmax(logits, dim=-1)
by argmax. temp=4.5, num_iter=1
Yes, the temperature selection is a bit tricky. For iter=1, we use argmax and temp=0.0 if I remember correctly. For iter=6, we use categorical sampling and temp=4.5.
Yes, the temperature selection is a bit tricky. For iter=1, we use argmax and temp=0.0 if I remember correctly. For iter=6, we use categorical sampling and temp=4.5.
I use vit-large to reconstruct masked images in Fig.2. Am I right?
You can use either ViT-B or ViT-L for that. ViT-L will give you slightly visually better results.
I want to mask part of the image and then rebuild it, not randomly.
Hello, may I ask you how to reconstrcut an image with a pretrained MAGE model like the original MAE? Why I get the output image almoset the same with the input image?
I want to mask part of the image and then rebuild it, not randomly.
I also want to reproduce Figure 2. Could you please tell me how you achieved it?
I want to mask part of the image and then rebuild it, not randomly.
I was wondering if you could share the code you used to reproduce it?
I add an inference code, but looks not correct. Here is a input and output for my code.
The inference code is based on gen_img_uncond.py, I followed the process on def gen_image(). The checkpoint I used is magec ViTl. According to the result, would you mind tell me which part may not correct.
The mask ratio is fixed in 0.1.
@LTH14 would you mind send me a inference code? my email is: [email protected]. Thank you very much.
I add an inference code, but looks not correct. Here is a input and output for my code.
![]()
The inference code is based on gen_img_uncond.py, I followed the process on def gen_image(). The checkpoint I used is magec ViTl. According to the result, would you mind tell me which part may not correct.
The mask ratio is fixed in 0.1.
Please don't use MAGE-C for generation task -- the contrastive loss is only for representation learning. For generation, please use the MAGE ViT-L checkpoint (without -C)