question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting better images from DTD using PGAN

See original GitHub issue

I am trying to generate some images using the pre-trained DTD on PGAN but the results are not looking very good. Here is the pseudo-code that I am using as well as the results. Any thought on why the resulting images are not looking good? Thanks in advance

import torch
use_gpu = True if torch.cuda.is_available() else False
model = torch.hub.load('facebookresearch/pytorch_GAN_zoo:hub',
                       'PGAN', model_name='DTD',
                       pretrained=True, useGPU=use_gpu)
num_images = 4
noise, _ = model.buildNoiseData(num_images)
with torch.no_grad():
    generated_images = model.test(noise)

# let's plot these images using torchvision and matplotlib
import matplotlib.pyplot as plt
import torchvision
grid = torchvision.utils.make_grid(generated_images.clamp(min=-1, max=1), scale_each=True, normalize=True)
plt.imshow(grid.permute(1, 2, 0).cpu().numpy())
plt.show()
Screenshot 2020-04-17 at 13 43 31

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Molugancommented, May 22, 2020

In other words, the best way to know if a class gives good enough results is just to try it out 😃

1reaction
Molugancommented, May 22, 2020

Other classes works as well, for example striped will give that kind of results: image

or cracked image

DTD is a really small dataset and thus the results can be very unequal. It’s more like a demo GAN showing that you can get fancy results with few data (the swirly class for example is kind of funny).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generative Adversarial Networks in Digital Pathology and ...
After the initial development of GANs, generative models that synthesize completely new images have become a popular method for generating augmented data. GAN- ......
Read more >
Cross-view image synthesis using geometry-guided ...
We address the problem of generating images across two drastically different views, namely ground (street) and aerial (overhead) views.
Read more >
A Wide Range of Testing Results on an Excellent Lithium-Ion ...
The combination of the additives 2% VC + 1% DTD with this single crystal NMC/artificial graphite chemistry is simply outstanding in storage.
Read more >
Example images from the four texture datasets: DTD, KTH ...
To the best of our knowledge, we are the first to investigate the dependencies among objects in remote sensing scene classification task. Extensive...
Read more >
A Survey of Image Synthesis Methods for Visual Machine ...
In the future, synthetic data will become increasingly more important. Some of the most challenging remaining problems in DL can be tied to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found