christopher-beckham / hologan-pytorch

Non-official + minimal reimplementation of HoloGAN by Nguyen-Phuoc, et al: https://arxiv.org/abs/1904.01326
BSD 3-Clause "New" or "Revised" License
65 stars 7 forks source link

How to change the results image pixel? #4

Closed andyandytony closed 4 years ago

christopher-beckham commented 4 years ago

???

andyandytony commented 4 years ago

1587696623736

for example this image cars are too small and how to change the each pixels. Inked1587696623736_LI

andyandytony commented 4 years ago

and i know how to change column amd row numbers. but each pixels are same

christopher-beckham commented 4 years ago

Do you mean, how to change the resolution of the image? If so you'll need to modify the transform in your specific Dataset class as well as modify the architecture in holonet.py to be able to generate that resolution image by adding extra, say, strided transposed convolutions (and potentially also add another strided resblock to the discriminator). Neither the generator nor discriminator have arguments that let you set the desired image resolution, though I could easily make that possible in the next commit (I have planned to fix some things).

If you mean just changing the resolution of the saved images, you can use something like torch.nn.functional.interpolate(imgs, scale_factor) on the tensor of images before save_image is called: https://pytorch.org/docs/stable/nn.functional.html#interpolate

christopher-beckham commented 4 years ago

I will be committing some new code soon which should improve any experiments that are run (addressing the issue with the identity loss I mention in the readme). It already looks like you are getting decent car rotations (though maybe it is worth tuning the min and max angles for the y axis if you haven't already).

andyandytony commented 4 years ago

thank you a lots~~