Giter VIP home page Giter VIP logo

Comments (3)

andreistirb avatar andreistirb commented on May 22, 2024

I think you should also modify the architecture of the network in RRDBNet_arch.py in order to upscale the necessary amount. Hope it helps

from mmagic.

yangyingni avatar yangyingni commented on May 22, 2024

I am training an SRGAN model with 8x upscaling factor using an LQGT dataset. However the generator only upscales by a 4x factor.

Here is my config

  use_tb_logger: True
  model: srgan
  distortion: sr
  scale: 8
  gpu_ids: [0, 1, 2, 3]
  datasets:[
    train:[
      name: DIV2K
      mode: LQGT
      dataroot_LQ: path/to/my/data2.lmdb
      dataroot_GT: path/to/my/data.lmdb
      use_shuffle: True
      n_workers: 6
      batch_size: 32
      GT_size: 128
      use_flip: True
      use_rot: True
      color: RGB
      phase: train
      scale: 8
      data_type: lmdb
    ]
    val:[
      name: DIV2K
      mode: LQGT
      dataroot_LQ: another/path.lmdb
      dataroot_GT: path/to/data.lmdb
      phase: val
      scale: 8
      data_type: lmdb
    ]
  ]
  network_G:[
    which_model_G: RRDBNet
    in_nc: 3
    out_nc: 3
    nf: 64
    nb: 16
    upscale: 8
    scale: 8
  ]
  network_D:[
    which_model_D: discriminator_vgg_128
    in_nc: 3
    nf: 64
  ]
  path:[
    pretrain_model_G: network_configs/RRDB_PSNR_x4.pth
    strict_load: False
    resume_state: None
    experiments_root: /home/centos/init-scripts/mmsr-tissue-control/experiment
    root: /home/centos/init-scripts
    models: /home/centos/init-scripts/mmsr-tissue-control/experiment/models
    training_state: /home/centos/init-scripts/mmsr-tissue-control/experiment/training_state
    log: /home/centos/init-scripts/mmsr-tissue-control/experiment
    val_images: /home/centos/init-scripts/mmsr-tissue-control/experiment/val_images
  ]
  train:[
    lr_G: 0.0001
    weight_decay_G: 0
    beta1_G: 0.9
    beta2_G: 0.99
    lr_D: 0.0001
    weight_decay_D: 0
    beta1_D: 0.9
    beta2_D: 0.99
    lr_scheme: MultiStepLR
    niter: 400000
    warmup_iter: -1
    lr_steps: [50000, 100000, 200000, 300000]
    lr_gamma: 0.5
    pixel_criterion: l1
    pixel_weight: 0.01
    feature_criterion: l1
    feature_weight: 1
    gan_type: gan
    gan_weight: 0.005
    D_update_ratio: 1
    D_init_iters: 0
    manual_seed: 10
    val_freq: 5000.0
  ]
  logger:[
    print_freq: 100
    save_checkpoint_freq: 4000.0
  ]
  is_train: True
  dist: False

I added the following code to LQGT_dataset.py under SRGANModel.optimize_paramters: (starting at L140)

self.fake_H=self.netG(self.var_L)
print(self.var_L.shape)
print(self.fake_H.shape)

This yields the following output at train time

torch.Size([32, 3, 16, 16])
torch.Size([32, 3, 64, 64])

Is there a fix? Can someone help me shed light on this problem?

Have you dealt with it and what's the size of your hr pictures

from mmagic.

xinntao avatar xinntao commented on May 22, 2024

Thanks for using MMSR.
We will upgrade MMSR to MMEditing (in the same repo), which consists of SR, inpainting, matting and generation tasks.
And MMSR will be deprecated and no longer exist.
Your suggestions will be updated in MMEditing.

from mmagic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.