Code Monkey home page Code Monkey logo

Comments (5)

NickDeBeenSAE avatar NickDeBeenSAE commented on June 18, 2024 1

Oh, well, ok then, I'll try this with my own version of the code.

Thank you.

from trainner.

NickDeBeenSAE avatar NickDeBeenSAE commented on June 18, 2024

Uuuuuuuuuhhhhhhh, pardon me?

You lost me.

from trainner.

NickDeBeenSAE avatar NickDeBeenSAE commented on June 18, 2024
python3 train.py -opt train_sr.yml
export CUDA_VISIBLE_DEVICES=0
23-02-03 00:44:55.135 - INFO:   name: 001_sr_template
  use_tb_logger: True
  model: sr
  scale: 4
  gpu_ids: [0]
  use_amp: True
  use_swa: False
  use_cem: False
  use_atg: False
  datasets:[
    train:[
      name: DIV2K
      mode: aligned
      dataroot_HR: ['../datasets/train/hr1', '../datasets/train/hr2', '../datasets/train/hr3']
      dataroot_LR: ['../datasets/train/lr1', '../datasets/train/lr2']
      subset_file: None
      use_shuffle: True
      znorm: False
      n_workers: 4
      batch_size: 8
      virtual_batch_size: 8
      preprocess: crop
      crop_size: 128
      image_channels: 3
      use_flip: True
      use_rot: True
      use_hrrot: False
      phase: train
      scale: 4
      data_type: img
      aug_configs:[
        lr_downscale_types:[
          resize:[
            resize_prob:[
              down: 1.0
            ]
            resize_range_up: [1, 1.5]
            resize_range_down: [0.15, 1]
            down_up_min: 0.5
          ]
        ]
      ]
      shuffle_degradations: False
      lr_downscale: True
      lr_downscale_types: [773, 777]
      resize_strat: pre
    ]
    val:[
      name: val_set14_part
      mode: aligned
      dataroot_B: ../datasets/val/hr
      dataroot_A: ../datasets/val/lr
      znorm: False
      lr_downscale: False
      lr_downscale_types: [773, 777]
      phase: val
      scale: 4
      data_type: img
      resize_strat: pre
    ]
  ]
  path:[
    root: ..
    pretrain_model_G: ../experiments/pretrained_models/RRDB_PSNR_x4.pth
    experiments_root: ../experiments/001_sr_template
    models: ../experiments/001_sr_template/models
    training_state: ../experiments/001_sr_template/training_state
    log: ../experiments/001_sr_template
    val_images: ../experiments/001_sr_template/val_images
  ]
  train:[
    optim_G: adam
    optim_D: adam
    lr_scheme: MultiStepLR
    lr_gamma: 0.5
    swa_lr: 0.0001
    swa_anneal_epochs: 10
    swa_anneal_strategy: cos
    pixel_criterion: l1
    pixel_weight: 0.01
    feature_criterion: l1
    feature_weight: 1
    gan_type: vanilla
    gan_weight: 0.005
    manual_seed: 0
    niter: 500000.0
    val_freq: 5000.0
    metrics: psnr,ssim,lpips
    grad_clip: norm
    grad_clip_value: 0.1
    overwrite_val_imgs: None
    val_comparison: None
    lr_steps: [50000, 100000, 200000, 300000]
    swa_start_iter: 375000
    atg_start_iter: 415000
  ]
  logger:[
    print_freq: 200
    save_checkpoint_freq: 5000.0
    overwrite_chkp: False
  ]
  is_train: True
  network_G:[
    strict: False
    type: rrdb_net
    norm_type: None
    mode: CNA
    nf: 64
    nb: 23
    nr: 3
    in_nc: 3
    out_nc: 3
    gc: 32
    convtype: Conv2D
    act_type: leakyrelu
    gaussian_noise: True
    plus: False
    finalact: None
    upscale: 4
    upsample_mode: upconv
  ]
  network_D:[
    strict: True
    type: discriminator_vgg
    in_nc: 3
    base_nf: 64
    norm_type: batch
    mode: CNA
    act_type: leakyrelu
    convtype: Conv2D
    arch: ESRGAN
    size: 128
  ]

23-02-03 00:44:55.421 - INFO: Random seed: 0
Traceback (most recent call last):
  File "/home/nickdbts2022/Desktop/traiNNer/codes/train.py", line 500, in <module>
    main()
  File "/home/nickdbts2022/Desktop/traiNNer/codes/train.py", line 487, in main
    dataloaders, data_params = get_dataloaders(opt)
  File "/home/nickdbts2022/Desktop/traiNNer/codes/train.py", line 134, in get_dataloaders
    dataset = create_dataset(dataset_opt)
  File "/home/nickdbts2022/Desktop/traiNNer/codes/data/__init__.py", line 79, in create_dataset
    dataset = D(dataset_opt)
  File "/home/nickdbts2022/Desktop/traiNNer/codes/data/aligned_dataset.py", line 41, in __init__
    self.A_paths, self.B_paths = get_dataroots_paths(self.opt, strict=False, keys_ds=self.keys_ds)
  File "/home/nickdbts2022/Desktop/traiNNer/codes/data/base_dataset.py", line 235, in get_dataroots_paths
    paths_A, paths_B = read_dataroots(opt, keys_ds=keys_ds)
  File "/home/nickdbts2022/Desktop/traiNNer/codes/data/base_dataset.py", line 171, in read_dataroots
    paths_A = process_img_paths(A_images_paths, opt['data_type'])
  File "/home/nickdbts2022/Desktop/traiNNer/codes/data/base_dataset.py", line 61, in process_img_paths
    paths = get_image_paths(data_type, path, max_dataset_size)
  File "/home/nickdbts2022/Desktop/traiNNer/codes/dataops/common.py", line 82, in get_image_paths
    paths = sorted(_get_paths_from_images(dataroot, max_dataset_size=max_dataset_size))
  File "/home/nickdbts2022/Desktop/traiNNer/codes/dataops/common.py", line 36, in _get_paths_from_images
    assert os.path.isdir(path), '{:s} is not a valid directory'.format(path)
AssertionError: ../datasets/train/lr1 is not a valid directory

from trainner.

NickDeBeenSAE avatar NickDeBeenSAE commented on June 18, 2024

I am lost, would someone help please? This is put politely as its the first time I am working with modelling code.

from trainner.

victorca25 avatar victorca25 commented on June 18, 2024

Hello!

These lines:

      dataroot_HR: ['../datasets/train/hr1', '../datasets/train/hr2', '../datasets/train/hr3']
      dataroot_LR: ['../datasets/train/lr1', '../datasets/train/lr2']

Are only an example, you should put here the paths to your image datasets for training (https://github.com/victorca25/traiNNer#training, https://github.com/victorca25/traiNNer/blob/master/docs/howtotrain.md#normal-single-image-super-resolution-esrgan-srgan-pan-etc-models).

Something similar will happen with:

      dataroot_B: ../datasets/val/hr
      dataroot_A: ../datasets/val/lr

and:

    pretrain_model_G: ../experiments/pretrained_models/RRDB_PSNR_x4.pth

The required files will have to exist in the path for them to be loaded correctly.

from trainner.

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.