Code Monkey home page Code Monkey logo

yuki-11 / cssr Goto Github PK

View Code? Open in Web Editor NEW
72.0 2.0 7.0 261.73 MB

Crack Segmentation for Low-Resolution Images using Joint Learning with Super-Resolution (CSSR) was accepted to international conference on MVA2021 (oral), and selected for the Best Practical Paper Award.

License: MIT License

Python 100.00%
super-resolution semantic-segmentation deep-learning machine-learning joint-learning crack-detection mva python3 pytorch crack-segmentation

cssr's Introduction

Crack Segmentation for Low-Resolution Images using Joint Learning with Super-Resolution (CSSR)

🚀 CSBSR [IEEE TIM'23], an advanced version of CSSR, has been released! Click here for details! 🚀

PWC PWC

Our Framework

News

  • May 1, 2024 -> CSBSR[Y. Kondo and N. Ukita IEEE TIM'23], an advanced version of CSSR, has been released! Click here for details!
  • July 27, 2021 -> We received the Best Practical Paper Award 🏆 at MVA 2021!

What's this?

We have proposed a method for high-resolution crack segmentation for low-resolution images. This approach enables automatic detection of cracks even when the image resolution of the crack area is reduced due to an environment in which the area where cracks may occur must be photographed from a distance (e.g., An environment in which a drone that targets a high-altitude chimney wall must take a distance in order to fly safely.). The proposed method is composed of the following two approaches.

  1. Deep learning based super resolution to increase the resolution of low-resolution images. This super-resolution image enables delicate crack segmentation. In addition, we proposed CSSR (Crack Segmentation with Super Resolution) using end-to-end joint learning to optimize the super-resolution for the crack segmentation process.

  2. In order to optimize the deep learning model for segmentation, we proposed a loss function Boundary Combo loss that simultaneously optimizes the global and local structures of cracks. This loss function enables both detection of thin and difficult-to-detect cracks and detection of fine crack boundaries.

The experimental results show that the proposed method is superior to the conventional method, and quantitatively*1 and qualitatively, the segmentation is as precise as when using high-resolution images.

*1; In terms of IoU, the proposed method achieves 97.3% of the IoU of the high-resolution image input.

Dependencies

  • Python >= 3.6
  • PyTorch >= 1.8
  • numpy >= 1.19

Usage

  1. Clone the repository:

    git clone https://github.com/Yuki-11/CSSR.git
  2. Download khanhha dataset:

    cd $CSSR_ROOT
    mkdir datasets
    cd datasets
    curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1xrOqv0-3uMHjZyEUrerOYiYXW_E8SUMP" > /dev/null
    CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"  
    curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1xrOqv0-3uMHjZyEUrerOYiYXW_E8SUMP" -o temp_dataset.zip
    unzip temp_dataset.zip
    rm temp_dataset.zip
  3. Download trained models:

    cd $CSSR_ROOT
    mkdir output

    You can download trained models here. Then, place the unzipped directory of the models you want to use under <$CSSR_ROOT/output/>.

  4. Install packages:

    cd $CSSR_ROOT
    pip install -r requirement.txt
  5. Training:

    cd $CSSR_ROOT
    python train.py --config_file <CONFIG FILE>

    If you want to resume learning, you can do it with the following command.

    cd $CSSR_ROOT
    python train.py --config_file output/<OUTPUT DIRECTORY (OUTPUT_DIR at config.yaml)>/config.yaml --resume_iter <Saved iteration number>
  6. Test:

    cd $CSSR_ROOT
    python test.py output/<OUTPUT DIRECTORY (OUTPUT_DIR at config.yaml)> <iteration number> 

Citations

If you find this work useful, please consider citing it.

@inproceedings{CSSR2021,
  title={Crack Segmentation for Low-Resolution Images using Joint Learning with Super-Resolution},
  author={Kondo, Yuki and Ukita, Norimichi},
  booktitle={International Conference on Machine Vision Applications (MVA)},
  year={2021}
}

cssr's People

Contributors

yuki-11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cssr's Issues

About saving results

Hi.
I'm trying to retrain the SS_SR, but during training and after it I won't get the results saved nowhere.
I'm using the cfg parameter in the yaml file "OUTPUT_DIR", and the --output_dirname parameter.

There is a bug somewhere on this branch or I'm doing something wrong?

On Colab:
!python train.py --config_file "./config/exp2/config_CSSR_SR-SS.yaml" --num_workers 2 --num_gpus 1 --output_dirname "/content/CSSR/output/" --save_step 250

Test Runtime error: Missing key in state_dict

Description

When performing the test with standard configurazione I got an error of missing keys in the model configuration

Error

Configration file is loaded from output/CSSR_SS-SR/config.yaml
Running with config:
BASE_NET: weights/vgg16_reducedfc.pth
DATASET:
  TEST_IMAGE_DIR: datasets/crack_segmentation_dataset/test/images
  TEST_MASK_DIR: datasets/crack_segmentation_dataset/test/masks
  TRAIN_IMAGE_DIR: datasets/crack_segmentation_dataset/train/images
  TRAIN_MASK_DIR: datasets/crack_segmentation_dataset/train/masks
DEVICE: cuda
INPUT:
  IMAGE_SIZE: [448, 448]
  MEAN: [0.4741, 0.4937, 0.5048]
  STD: [0.1621, 0.1532, 0.1523]
MODEL:
  DETECTOR_DBPN_NUM_STAGES: 4
  DETECTOR_TYPE: u-net16
  JOINT_LEARNING: True
  NUM_CLASSES: 1
  NUM_STAGES: 6
  OPTIMIZER: Adam
  SCALE_FACTOR: 4
  SR: DBPN
  SR_SEG_INV: True
  UP_SAMPLE_METHOD: pixel_shuffle
OUTPUT_DIR: output/CSSR_SS-SR/eval_AIU/iter_100000
SEED: 123
SOLVER:
  ALPHA_MIN: 0.01
  BATCH_SIZE: 6
  BCELOSS_WEIGHT: [1, 1]
  BOUNDARY_DEC_RATIO: 1.0
  DECREASE_RATIO: 1.0
  GAMMA: 0.1
  LR: 1e-05
  LR_STEPS: []
  MAX_ITER: 100000
  NORM_SR_OUTPUT: instance
  SEG_LOSS_FUNC: BoundaryCombo
  SEG_PRETRAIN_ITER: 0
  SR_LOSS_FUNC: L1
  SR_PRETRAIN_ITER: 0
  SYNC_BATCHNORM: True
  TASK_LOSS_WEIGHT: 0.3
  TRAIN_DATASET_RATIO: 0.95
  WARMUP_FACTOR: 1.0
  WARMUP_ITERS: 5000
  WB_AND_D_WEIGHT: [1, 1]
Building model...
/usr/local/lib/python3.7/dist-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be removed in 0.15, "
/usr/local/lib/python3.7/dist-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=VGG16_Weights.IMAGENET1K_V1`. You can also use `weights=VGG16_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
SR pretrained model was loaded from weights/sr_pretrain_x4_stage6.pth
------------Model Architecture-------------

<Network SS>
UNet16(
  (pool): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
  (encoder): Sequential(
    (0): Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (3): ReLU(inplace=True)
    (4): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
    (5): Conv2d(64, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (6): ReLU(inplace=True)
    (7): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (8): ReLU(inplace=True)
    (9): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
    (10): Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (11): ReLU(inplace=True)
    (12): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (13): ReLU(inplace=True)
    (14): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (15): ReLU(inplace=True)
    (16): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
    (17): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (18): ReLU(inplace=True)
    (19): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (20): ReLU(inplace=True)
    (21): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (22): ReLU(inplace=True)
    (23): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
    (24): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (25): ReLU(inplace=True)
    (26): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (27): ReLU(inplace=True)
    (28): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (29): ReLU(inplace=True)
    (30): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
  )
  (relu): ReLU(inplace=True)
  (conv1): Sequential(
    (0): Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (3): ReLU(inplace=True)
  )
  (conv2): Sequential(
    (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (3): ReLU(inplace=True)
  )
  (conv3): Sequential(
    (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (3): ReLU(inplace=True)
    (4): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (5): ReLU(inplace=True)
  )
  (conv4): Sequential(
    (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (3): ReLU(inplace=True)
    (4): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (5): ReLU(inplace=True)
  )
  (conv5): Sequential(
    (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (3): ReLU(inplace=True)
    (4): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (5): ReLU(inplace=True)
  )
  (center): DecoderBlockV2(
    (block): Sequential(
      (0): ConvRelu(
        (conv): Conv2d(512, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (activation): ReLU(inplace=True)
      )
      (1): PixelShuffle(upscale_factor=2)
      (2): ReLU(inplace=True)
    )
  )
  (dec4): DecoderBlockV2(
    (block): Sequential(
      (0): ConvRelu(
        (conv): Conv2d(768, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (activation): ReLU(inplace=True)
      )
      (1): PixelShuffle(upscale_factor=2)
      (2): ReLU(inplace=True)
    )
  )
  (dec3): DecoderBlockV2(
    (block): Sequential(
      (0): ConvRelu(
        (conv): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (activation): ReLU(inplace=True)
      )
      (1): PixelShuffle(upscale_factor=2)
      (2): ReLU(inplace=True)
    )
  )
  (dec2): DecoderBlockV2(
    (block): Sequential(
      (0): ConvRelu(
        (conv): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (activation): ReLU(inplace=True)
      )
      (1): PixelShuffle(upscale_factor=2)
      (2): ReLU(inplace=True)
    )
  )
  (dec1): ConvRelu(
    (conv): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (activation): ReLU(inplace=True)
  )
  (final): Conv2d(32, 1, kernel_size=(1, 1), stride=(1, 1))
  (sigmoid): Sigmoid()
)

<Network SR>
Net_6(
  (feat0): ConvBlock(
    (conv): Conv2d(1, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (act): PReLU(num_parameters=1)
  )
  (feat1): ConvBlock(
    (conv): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1))
    (act): PReLU(num_parameters=1)
  )
  (up1): UpBlock(
    (up_conv1): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv2): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv3): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (down1): DownBlock(
    (down_conv1): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv2): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv3): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (up2): UpBlock(
    (up_conv1): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv2): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv3): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (down2): D_DownBlock(
    (conv): ConvBlock(
      (conv): Conv2d(128, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (down_conv1): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv2): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv3): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (up3): D_UpBlock(
    (conv): ConvBlock(
      (conv): Conv2d(128, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (up_conv1): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv2): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv3): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (down3): D_DownBlock(
    (conv): ConvBlock(
      (conv): Conv2d(192, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (down_conv1): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv2): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv3): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (up4): D_UpBlock(
    (conv): ConvBlock(
      (conv): Conv2d(192, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (up_conv1): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv2): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv3): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (down4): D_DownBlock(
    (conv): ConvBlock(
      (conv): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (down_conv1): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv2): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv3): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (up5): D_UpBlock(
    (conv): ConvBlock(
      (conv): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (up_conv1): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv2): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv3): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (down5): D_DownBlock(
    (conv): ConvBlock(
      (conv): Conv2d(320, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (down_conv1): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv2): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (down_conv3): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (up6): D_UpBlock(
    (conv): ConvBlock(
      (conv): Conv2d(320, 64, kernel_size=(1, 1), stride=(1, 1))
      (act): PReLU(num_parameters=1)
    )
    (up_conv1): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv2): ConvBlock(
      (conv): Conv2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
    (up_conv3): DeconvBlock(
      (deconv): ConvTranspose2d(64, 64, kernel_size=(8, 8), stride=(4, 4), padding=(2, 2))
      (act): PReLU(num_parameters=1)
    )
  )
  (output_conv): ConvBlock(
    (conv): Conv2d(384, 1, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  )
)
Traceback (most recent call last):
  File "test.py", line 96, in <module>
    main()
  File "test.py", line 91, in main
    test(args, cfg)
  File "test.py", line 28, in test
    model.load_state_dict(fix_model_state_dict(torch.load(args.trained_model, map_location=lambda storage, loc:storage)))
  File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1605, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for InvModel:
	Missing key(s) in state_dict: "sr_model.feat0.conv.weight", "sr_model.feat0.conv.bias", "sr_model.feat0.act.weight", "sr_model.output_conv.conv.weight", "sr_model.output_conv.conv.bias". 
	Unexpected key(s) in state_dict: "sr_model.feat0_1ch.conv.weight", "sr_model.feat0_1ch.conv.bias", "sr_model.feat0_1ch.act.weight", "sr_model.output_conv_1ch.conv.weight", "sr_model.output_conv_1ch.conv.bias". 

To Reproduce

!python test.py "output/CSSR_SS-SR/" 100000

Enviromet

Google Colab GPU

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.