Comments (7)
https://github.com/lucidrains/lightweight-gan/releases/tag/0.14.0 ok done with the --greyscale
flag
from lightweight-gan.
You are definitely right! I started with the assumption of wanting to change from RGB and didn't question it later, thanks
from lightweight-gan.
Just a quick comment: wouldn't it have been simpler to edit the logic the other way around? Rather than keeping "transparent" and replacing RGB with grayscale, you could have kept RGB and replaced "transparent" (4 channels) with "grayscale" (1 channel). In this case, all you would have to do is Ctrl+F "transparent" (32 matches) in https://github.com/lucidrains/lightweight-gan/blob/main/lightweight_gan/lightweight_gan.py and change the logic every time.
Here, you have the expand_greyscale
class, which risks setting the number of channels back to 3:
lightweight-gan/lightweight_gan/lightweight_gan.py
Lines 184 to 208 in 15a1295
which is then called at the end here by transforms.Lambda(expand_greyscale(transparent))
:
lightweight-gan/lightweight_gan/lightweight_gan.py
Lines 222 to 232 in 15a1295
Apart from that, there are the changes below which you have already mentioned:
-
generator:
-
discriminator:
-
image export:
lightweight-gan/lightweight_gan/lightweight_gan.py
Lines 1170 to 1172 in 15a1295
from lightweight-gan.
This would be great to be added as an option. @lucidrains
from lightweight-gan.
@bogdan-ivan sure, i'll add it! what is the corresponding enum string in pillow for greyscale? (like RGBA
is for transparent)
from lightweight-gan.
@bogdan-ivan sure, i'll add it! what is the corresponding enum string in pillow for greyscale? (like
RGBA
is for transparent)
The last time I checked, it was L
.
https://pillow.readthedocs.io/en/stable/handbook/concepts.html#modes
from lightweight-gan.
@lucidrains I think about --num-channels
flag. For example to generation textures which contain several maps (albedo, roughness, specular, normal map). How do you think does possible modify code to work with them? And will it be too hard or easy?
from lightweight-gan.
Related Issues (20)
- Error(s) in loading state_dict for LightweightGAN HOT 2
- Batchnorm layer missing in the discriminator?
- showing results while training ? HOT 2
- G is showing up a negative number. What does that mean?
- Multi GPU utilization problem.
- TypeError: __init__() got an unexpected keyword argument 'hparams' HOT 1
- unable to load save model. please try downgrading the package to the version specified by the saved model HOT 7
- --load_strict=False failing to load model HOT 1
- Can't find "__main__" module (sorry if noob question) HOT 4
- loss implementation differs from paper HOT 1
- Doesn't detect CUDA from Nvidia GPU HOT 1
- Torchvision Assertion error while importing custom data
- Aim installation error HOT 4
- Discriminator Loss converges to 0 while Generator loss pretty high HOT 3
- Dont detects cuda HOT 1
- Using Lightweight GAN as a library
- Projecting generated Images to Latent Space HOT 1
- Executing with a trailing \ in the arguments sets the variable new to the truthy value '\\' and deletes all progress
- CUDA out of memory error while generating interpolations
- Minimum number data training
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 lightweight-gan.