zcemycl / matlab-gan Goto Github PK
View Code? Open in Web Editor NEWMATLAB implementations of Generative Adversarial Networks -- from GAN to Pixel2Pixel, CycleGAN
License: MIT License
MATLAB implementations of Generative Adversarial Networks -- from GAN to Pixel2Pixel, CycleGAN
License: MIT License
First, thank you. This is an impressive collection of work you are sharing.
Some of the GANS seem to be missing batch indexing.
Should they have
idx = (i-1)*settings.batch_size+1:i*settings.batch_size;
ABatch=gpdl(trainAshuffle(:,:,:,idx),'SSCB');
BBatch=gpdl(trainBshuffle(:,:,:,idx),'SSCB');
rather than just
ABatch=gpdl(trainAshuffle(:,:,:,i),'SSCB');
BBatch=gpdl(trainBshuffle(:,:,:,i),'SSCB');
?
I have trained cycleGAN for dehazing the fog but I don't know how to test and predict the images. I am trying to test the images which is given in the below link:
https://www.mathworks.com/help/deeplearning/ug/unsupervised-medical-image-denoising-using-cyclegan.html
It would be great if you provide me the code for testing the GAN.
If I am trying to predict I am getting the following error
Error using predict (line 85)
No valid system or dataset was specified.
Error in testing (line 59)
generatedImageHD = predict(GradGBA,imageTestLD);
GradGBA is the weights obtained after training cycleGAN
kindly help me !!!!!!
hey @zcemycl could you tell me what I should do to use only my laptop I don't have GPU so what should I do . is there a way to run the code just for testing purposes on my laptop . Like some code to negate the GPU Usage?
Originally posted by @hurmaeht in #11 (comment)
I run the code(LoadFacadeDatabase.mlx)on the Matlab, and prompted for an error that he index exceeds the number of elements in the array .And LatCode.mat and ImgLib.mat were not found.
Hello, I wanted to ask how I can format my own dataset to be like the MINST dataset for MATLAB. I want to use the CGAN for my own dataset of coin images but I don't know how to format those images to work with this code. could you please help?
Hello again,
in line 108-110 of your AAE.m file the latent space is build by:
latent_fake = dly(1:settings.latent_dim,:)+...
dly(settings.latent_dim+1:2*settings.latent_dim)*...
randn(settings.latent_dim,settings.batch_size);
You are only taking the first pair of standard deviations (109) and multiplicate it with all samples from the standard gaussian (110). This results into a 1 x batch_size vector instead of a latent_dim x batch_size matrix. This vector is then added to the matrix of means (line 108). I think the correct way is:
latent_fake = dly(1:settings.latent_dim,:)+...
dly(settings.latent_dim+1:2*settings.latent_dim,:) .*...
randn(settings.latent_dim,settings.batch_size);
Greetings
Nico
Hello, I wanted to use the CycleGAN but it keeps saying that the CUDA Driver is unable to load and that the GPU Driver needs to be updated or reinstalled. I checked my laptop's GPU and it is Intel(R) UHD Graphics 620. I am slightly confused as to how to make it work if I don't have nvcuda.dll installed. I even tried installing nvcuda.dll but that also didn't seem to work. Please help me out here. How do I make this work if I don't have a GPU. or how to install a GPU on my computer to make this work.
First of all, thanks for the codes.
I think that the upsampling part of the Generator of the Pix2Pix code has a couple of issues. The order of the batchnorm and relu are permuted, and the u1 layer has no relu layer defined.
I have tested it with the "right" order and it works much better. Here is the code (with the changes in bold):
u1=dltranspconv(d7,params.TCW1,params.TCb1,'Stride',2,'Cropping','same');
u1=batchnormwrap(u1,params,st,7);
u1=relu(u1);
u1=cat(3,u1,d6);
exstattran = 'u%d = dltranspconv(u%d,params.TCW%d,params.TCb%d,"Stride",2,"Cropping","same");';
exstatrelu = 'u%d = relu(u%d);';
exstatbatch2='[u%d,st] = batchnormwrap(u%d,params,st,%d);';
exstatcat = 'u%d=cat(3,u%d,d%d);';
for i = 2:7
eval(sprintf(exstattran,i,i-1,i,i));
if i ~= 7
eval(sprintf(exstatbatch2,i,i,6+i));
eval(sprintf(exstatrelu,i,i));
eval(sprintf(exstatcat,i,i,7-i));
end
end
dly = tanh(u7);
end
Would you consider adding data augmentation and random grouping?
Can A CGAN be used to generate images for data? What is the specific name of the generated neural network? How do you save a trained network?
Hello.
Thanks for these nice codes.
Normally we do have checkpoints and model to save to a file.
Hello,
Iam currently implementing an AAE and found your great work!
However, is it possible that you forgot to add the part where the Encoder/Generator is retrained? Currently the Encoder/Generator weights are only updated once with the reconstruction error from the Encoder-Decoder Part.
Hello,thanks for your code. Although the function gpdl store the array on GPU, the code doesn’t run on the GPU.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.