Comments (4)
Can you show me your code for reconstruction?I also meet this problem that reconstruction results of the ViT-VQGAN on ImageNet are very terrible.
from enhancing-transformers.
config = OmegaConf.load('configs/imagenet_vitvq_small.yaml')
model = initialize_from_config(config.model)
model.init_from_ckpt('/home/marcelo/Downloads/imagenet_vitvq_small.ckpt')
def preprocess(img):
s = min(img.size)
if s < 256:
raise ValueError(f'min dim for image {s} < 256')
r = 1024 / s
s = (round(r * img.size[1]), round(r * img.size[0]))
img = TF.resize(img, s, interpolation=PIL.Image.LANCZOS)
img = TF.center_crop(img, output_size=2 * [256])
img = torch.unsqueeze(T.ToTensor()(img), 0)
return img
original=Image.open('/home/marcelo/Downloads/212861459-e4113b34-622d-4602-afe4-f20e2d79425c.png')
image=preprocess(original)
image = image[:,:3,:,:]
quant, _ = model.encode(image)
dec = model.decode(quant)
from enhancing-transformers.
from enhancing-transformers.
So, after your training, you obtain a better model weights that improve the reconstruction?
from enhancing-transformers.
Related Issues (20)
- Pre-norm and Post-norm HOT 6
- An inplace operation in the forward process HOT 1
- Reconstruction Visualization HOT 2
- stage2 transformer HOT 2
- stage1 pretraining HOT 7
- Model license HOT 4
- stage2 transform HOT 9
- about training loss HOT 1
- The question is done. HOT 1
- ImageNet version.
- Learning rate and scheduler for stage 1 training. HOT 1
- why not used pretrained discriminator
- Incomplete implementation of RQ-VAE
- raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1. HOT 5
- Results HOT 5
- Smaller images HOT 10
- OOM for imagenet_gpt_vitvq_base and a 100M params GPT on A100 40G HOT 3
- Pretrained Stage 2 Transformer for ViT-VQGAN HOT 8
- Training time and number of GPUS HOT 6
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 enhancing-transformers.