Comments (9)
I have implemented the visualization code here, can I submit a merge request?
from mae-pytorch.
Hi, I was wondering how to perform inference and run the full encoder-decoder network on a complete, unmasked image? In other words, after it is trained, how would I call the model such that it encodes a complete image with no masks, and then reconstructs the original image using the decoder?
from mae-pytorch.
Unfortunately, our current visualization code also has some bugs, I will try to solve it!
from mae-pytorch.
Of course. Thank you for your contributions.
And can you provide some visualization results here?
from mae-pytorch.
Of course, can you provide pre-trained models and test images? Because the current model is mainly based on a custom datset.
from mae-pytorch.
I have uploaded the weight to google drive, please see latest readme.txt.
from mae-pytorch.
Hello, @avitrost , maybe there are some bugs now when the mask
is always 0.
But if you really want to observe the performance when MAE is used as a pure auto-encoder, you should have a change:
For the encoder:
you can directly let x_vis=x
in this line.
And for the inputs to decoder:
x_vis = self.encoder_to_decoder(x_vis) # [B, N_vis, C_d]
B, N, C = x_vis.shape
expand_pos_embed = self.pos_embed.expand(B, -1, -1).type_as(x).to(x.device).clone().detach()
pos_emd_vis = expand_pos_embed[~mask].reshape(B, -1, C)
pos_emd_mask = expand_pos_embed[mask].reshape(B, -1, C)
x_full = torch.cat([x_vis + pos_emd_vis, self.mask_token + pos_emd_mask], dim=1)
x = self.decoder(x_full, pos_emd_mask.shape[1]) # [B, N_mask, 3 * 16 * 16]
It needs to be changed to:
x_vis = self.encoder_to_decoder(x_vis) # [B, N, C_d]
expand_pos_embed = self.pos_embed.expand(B, -1, -1).type_as(x).to(x.device).clone().detach()
x = self.decoder(x_vis+expand_pos_embed , x_vis.shape[1]) # [B, N, 3 * 16 * 16]
Maybe there will be some other bugs, you can have a debug.
Hope this can help you!
from mae-pytorch.
expand_pos_embed = self.pos_embed
Thank you for your contribution! I have a question about this change. Why this change does not update in the latest code?
from mae-pytorch.
Hello, I would like to ask if the weight file loaded visually is the pre-trained weight file or the fine-tuned weight file? Error when I load the fine-tuned weight file:
from mae-pytorch.
Related Issues (20)
- pil_loader slowly
- typo error local-rank HOT 1
- TypeError: __init__() got an unexpected keyword argument 'pretrained_cfg'
- Do I need to specify the value of mask_ratio before finetune?
- training with 400 epoch has IndexError when training at the last iteration
- Which dataset is used for the released pretrained model?
- A warning when pretraining HOT 2
- Pretrained weight of vit-S
- Patch size for pretraining
- learning rate curve
- Visualize Problems HOT 2
- How to resume from the checkpoint?
- SimMIM test
- I wonder if you plan to release the mask prediction visualization code?
- RuntimeError: Given normalized_shape=[768], expected input with shape [*, 768], but got input of size[12]
- Visual loading model error HOT 6
- How to implement Layer-wise learning rate decay on ResNet?
- Error reported in code finetune, AttributeError: 'VisionTransformer' object has no attribute 'get_num_layers'.
- The import accimage cannot be parsed
- Is Mixup necessary for MAE fine-tuning?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mae-pytorch.