256 - Super resolution GAN (SRGAN) in keras

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • Code generated in the video can be downloaded from here:
    github.com/bns...
    Original paper: arxiv.org/pdf/...
    Dataset from:
    press.liacs.nl/...
    All images resized to 128x128 to represent HR and 32x32 to represent LR.

КОМЕНТАРІ • 64

  • @hrudaytej2133
    @hrudaytej2133 2 роки тому +4

    We were the first ones to implement an SRGAN way back in 2020 as part of our major project where there were no explanation videos like these..... Trust me it was a rough period

  • @nhantran6992
    @nhantran6992 Рік тому +3

    Hi Sreeni, thanks for this wonderfully in depth tutorial! I've trained the GAN based on the same dataset as yours, 128x128 for HR and 32x32 for LR. Is there a way for the model to predict photos of any aspect ratios without having to re-train with new data (3 days of running)?

  • @joafin19
    @joafin19 Рік тому +1

    Thank you Thank you. I ran the code using jupyter notebook. I ran it with different image set. it worked well about 30 ecpochs. I was able to tell SR image generated from low resolution images. The issue I had was that after runing around 25 epochs. I was not able to open jupyter notebook because it generated too may logs so the file size of jupyterlab became too big. I had to disable the loggin by calling tf.keras.utils.disable_interactive_logging() function. It did not crash after that.

  • @rohanpophale3824
    @rohanpophale3824 Рік тому

    Thank you so much it means a lot for me I have been working on it from last 7 days and tried my level best to make my own code I have created too but I failed.
    At last I thought let's give it try for the very last time and boom 💥
    Your this video I saw and I got what I want I hope so right now it's 1 O'clock at night so I will look into it by tomorrow but thankyou so much 🙏🙏🙏

  • @basimazam6944
    @basimazam6944 2 роки тому +1

    Hi, Your videos have been really really helpful. Thank you very much for sharing these with us.

  • @viettruonghoang4879
    @viettruonghoang4879 Рік тому +1

    Hey, Sreeni. I don't have time or hardware to train this model. Can you send me your weights file?. Thank for your work.

  • @lokeshideas4324
    @lokeshideas4324 5 місяців тому

    Hi Sir, Your video is good to understand. Will it work for satellite images? If so, can you make a video on using satellite images, like VHR satellite images, to enhance low-sentinel images?

  • @FRANKONATOR123
    @FRANKONATOR123 2 роки тому +1

    Hey, Sreeni. I had a quick question which is slightly unrelated to this particular video but related to GANs in general. I was wondering how we decide the dimensionality of the latent space. I’d imagine there’s some trade between getting better approximations of the training data vs training time, but I’m not too sure. Thanks!!

  • @bineethavijayan4244
    @bineethavijayan4244 2 роки тому

    Sir, Thanks for making the concepts more understandable. It will be really helpfull if you can create tutorials based on audio files too.

  • @joaoalves8486
    @joaoalves8486 2 роки тому +1

    Hello! Love your work! What book do you recomend to buy that abord deep learning?

  • @ketakisawashe5277
    @ketakisawashe5277 7 місяців тому

    Why haven't you applied the Gaussian filter followed by downsampling of HR images to obtain the LR images? This is done in the given paper

  • @giancapa7
    @giancapa7 Рік тому

    Thanks for your videos! I've seen some of your videos in Super resolution, processing whole slide images and OpenSlide. They have been really enlightening.
    I've been trying SR models (like EDSR) with cv2 in python on svs images (with OpenSlide). I saw in your video 266 how to use the DeepZoomGenerator to be able to read a high resolution image (40x or 20x magnification) by tiles/batches, to then operate over the tiles. But then I don't know how to reconstruct the enhanced image to compare it to the original, since simple adding all the tiles together would be simply too huge. You explicitly mentioned in your 267 video that you weren't going to talk about that there, but did you comment on it in another video?

  • @chitti9974
    @chitti9974 Рік тому

    Mr.Sreeni, Iam working on medical images, to use the features that extracted from vgg model , i should train the vgg model with my medical images and those features i should extract and use it . Iam I right, because ImageNet database doesnot contain any medical images.

  • @Akashphs7217
    @Akashphs7217 4 місяці тому

    Thank you, it's very helpful. can you tell what changes should i do to enlarge 128X128 image to 256 X 256?

  • @valentinfontanger4962
    @valentinfontanger4962 2 роки тому +1

    Hi, if you are experimenting with gans for super resolution, try to add gaussian noise between layers of your discriminator. The results are visually better and it also maximizes the psnr in validation

    • @toufiqmusah6480
      @toufiqmusah6480 10 місяців тому +1

      Great recommendation.
      Do you by any input on the cycleGAN implementation? Will gaussian noise have any kind of effect in that regard?

    • @valentinfontanger4962
      @valentinfontanger4962 10 місяців тому

      I am not very familiar with cycleGAN in particular. But the idea behind adding gaussian noise inside the discriminator is that it prevents the training from collapsing. The idea is that, at the very beginning, the generator generates garbages, which the discriminator can easily identify. If such case, you loose the purpose of antagonist.
      @@toufiqmusah6480
      In short, I believe this should work for any kind of GAN architecture

  • @nishat919
    @nishat919 29 днів тому

    I want to apply srgan method to my custom dataset in colab. I tried using your method but ram crashed everytime and I am not able to get a workable model. Can you please help regarding this matter please?

  • @chitti9974
    @chitti9974 Рік тому

    Mr.Sreeni, Iam working on medical images, to use the features that extracted from vgg model in SRGAN training which you explained in the vedio, should I train the vgg model with my medical images(as ImageNet database doesnot contain any medical images) and then those features should I extract and use it .Pls reply sir

  • @rishabhsaxena3465
    @rishabhsaxena3465 5 місяців тому

    Hi Sreeni, Currently I am working on your code. So I have the same structure All images were resized to 128x128 to represent HR and 32x32 to represent LR but for the tomographic data.
    I don't think it's a problem. I replaced my data with yours and did the same thing.
    When I am going to run the code, got a ValueError
    ValueError: Input 0 of layer "functional_115" is incompatible with the layer: expected shape=(None, 128, 128, 3), found shape=(None, 64, 64, 3)
    Error in the line: gen_features = vgg(gen_img)
    Inside the function: def create_comb(gen_model, disc_model, vgg, lr_ip, hr_ip)
    Can you help me? It will be very helpful
    Thanks in advance

  • @indianengineer5802
    @indianengineer5802 Рік тому

    I have just one tiff image of farm fields taken using satellite. Can I use SRGAN to enhance the image resolution using that one single image.

  • @johnnysmith6876
    @johnnysmith6876 2 роки тому

    Thank you so much sir. Really REALLY grateful. Possible to run us through the SOTA in image super-resolution (EDVR)? Thanks again.

  • @rs9130
    @rs9130 2 роки тому

    how to evaluate the generator model inside training loop. can I model.compile (first model/generator) and do model.evaluate?

  • @ahmadahmad-tl1oo
    @ahmadahmad-tl1oo Рік тому

    I have loaded the database but when I run the code it does not recognize it. Should I put it in the same path as the Python program?
    Thank you

  • @jxw-dg5nq
    @jxw-dg5nq 5 місяців тому

    i am getting a error in line numble 283;
    g_loss, _, _ = gan_model.train_on_batch([lr_imgs, hr_imgs], [real_label, image_features])
    TypeError: iteration over a 0-d array

  • @Mai-he2hv
    @Mai-he2hv 2 роки тому

    Hi Sreeni, what are your thoughts on ConvNext paper, and do you see any application to u-net

  • @eliememel2680
    @eliememel2680 28 днів тому

    please what size of ram hae you for training this model ?

  • @cplusplus-python
    @cplusplus-python 2 роки тому

    Impressive work! Thanks.

  • @nhantran6992
    @nhantran6992 Рік тому

    Hi Sreeni, I've studied your code and noticed a possible problem. The paper you referenced takes BGR images as training and testing data. Hence, the CNN network may be optimised for BGR data? In your code, you converted BGR to RGB.

    • @DigitalSreeni
      @DigitalSreeni  Рік тому +1

      It doesn't matter if the order is BGR or RGB or even in some other color space altogether - as long as you train and predict on data organized the same way.

  • @hussaintanzim6958
    @hussaintanzim6958 Рік тому

    Hello sir,
    As always your videos are amazing, knowledgeable, and mindblowing!
    When I generate a single super-resolution image the output is fine, but when I try creating a loop and save the images, I am getting an error for the gen_image = gen_image = generator.predict(src_image) line. Can you please help how to generate the SR images in bulk?

  • @ali-ates
    @ali-ates 10 місяців тому

    How to predict any resolution image that bigger than 32x32? Decreasing to 32x32 and predicting isn't useful. And how to resume training with saved .h5 file?

    • @DigitalSreeni
      @DigitalSreeni  10 місяців тому

      You need to train the model on images at your desired resolution, unfortunately.

  • @dominicsavio7245
    @dominicsavio7245 2 роки тому

    How to display the output mage in OpenCV and save it. Whenever I tried to save it, I am getting just blank dark image. How to do that

  • @rameeshagull2070
    @rameeshagull2070 2 роки тому

    @DigitalSreeni can you guide please how can we use hr images of size 512 x 512.
    Thankyou.

  • @lewismackay7612
    @lewismackay7612 2 роки тому

    Is it possible to simply use a pretrained model and apply it to new individual images instead? Not sure why I should redo training with these thousands of images when I can save time by using a pretrained model.

    • @DigitalSreeni
      @DigitalSreeni  2 роки тому

      If pretrained model works for you then no need to train it again. You need to train a model using your own data in case the pretrained model is not available or does not work well.

  • @ioantocitu8474
    @ioantocitu8474 2 роки тому

    Thank you so much for the video, can you please do person re-Id in the future?

  • @mohammadmakki2103
    @mohammadmakki2103 2 роки тому

    Hey, I'm a huge fan of your content I even tell my friends about you and to support and follow you. . . Anyway I've noticed that you don't have a video about network pruning and quantization it would be great if you could explain those concepts and apply it in a real world example as well.

    • @DigitalSreeni
      @DigitalSreeni  2 роки тому

      Added to my list. Thanks for the suggestion and of course thanks for telling your friends about my channel :)

  • @kingson5437
    @kingson5437 Рік тому

    When i try with epoch 20 when it reach epoch 5 it shows buffer error

  • @boazmwubahimana7129
    @boazmwubahimana7129 Рік тому

    Dear Sir, I am meeting with this error : ImportError: cannot import name 'leakyReLU' from 'keras.layers' (C:\Users\BOAZ\miniconda3\lib\site-packages\keras\layers\__init__.py)

  • @HasnainAli-oo2ze
    @HasnainAli-oo2ze Рік тому

    Hey Sreeni, Please also make a video for ESRGAN in Keras

  • @liorboim
    @liorboim Рік тому

    Why in the comb model do you give hr_ip ?

  • @CabrioDriving
    @CabrioDriving 2 роки тому

    Great stuff!

  • @cavitirk6093
    @cavitirk6093 Місяць тому

    Teşekkür ederim. Türkçe altyazılı olsaydı çok iyi olurdu

  • @irfantariq2009
    @irfantariq2009 2 роки тому

    Sir, can you make a video how we can process the LIDC-IDRI Lung cancer dataset.

  • @nearobserver29
    @nearobserver29 Рік тому

    can anyone provide the code link,the link given in the description has 100 of files,i cant understand it

  • @innovative24
    @innovative24 9 місяців тому

    Thanks❤🌺🌸

  • @omerates6621
    @omerates6621 2 роки тому

    Hi Thank you for the video it was so good ,Can we use GAN for anomaly detection in images?

    • @DigitalSreeni
      @DigitalSreeni  2 роки тому

      I recently did some anomaly detection videos, please check them out. GANs may be used for that purpose but I haven't tried them myself.

  • @baleashvarkasiviswanathan7090
    @baleashvarkasiviswanathan7090 2 роки тому

    what is the tensorflow version ??

  • @Marva123
    @Marva123 2 роки тому

    I had to change the high resolution image array name from img_array -> hr_img_array. I was getting a (-215) error, I think there was a name conflict. Once I did the name change everything worked fine

  • @gsrvkd
    @gsrvkd 7 місяців тому

    Thanks!

  • @channelforstream6196
    @channelforstream6196 2 роки тому

    Haha now I can say enhance and it actually will work

  • @hritiksingh8268
    @hritiksingh8268 2 роки тому

    You were wearing a very controversial t-shirt

  • @nilanjansaha5063
    @nilanjansaha5063 Рік тому

    i am getting this error in line number 162
    OpenCV(4.6.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
    can any one make it clear?

    • @DigitalSreeni
      @DigitalSreeni  Рік тому

      Looks like you are pointing to an empty array - make sure you are properly reading your images.