Giter Site home page Giter Site logo

bsrn's Introduction

BSRN

Blueprint Separable Residual Network for Efficient Image Super-Resolution
Zheyuan Li, Yingqi Liu, Xiangyu Chen, Haoming Cai, Jinjin Gu, Yu Qiao, Chao Dong

BibTex

@InProceedings{Li_2022_CVPR,
    author    = {Li, Zheyuan and Liu, Yingqi and Chen, Xiangyu and Cai, Haoming and Gu, Jinjin and Qiao, Yu and Dong, Chao},
    title     = {Blueprint Separable Residual Network for Efficient Image Super-Resolution},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
    month     = {June},
    year      = {2022},
    pages     = {833-843}
}

Environment

PyTorch >= 1.7
BasicSR >= 1.3.4.9

Installation

pip install -r requirements.txt
python setup.py develop

How To Test

· Refer to ./options/test for the configuration file of the model to be tested, and prepare the testing data and pretrained model.
· The pretrained models are available in ./experiments/pretrained_models/
· Then run the follwing codes (taking net_g_BSRN_x4.pth as an example):

python basicsr/test.py -opt options/test/benchmark_BSRN_x4.yml

The testing results will be saved in the ./results folder.

How To Train

· Refer to ./options/train for the configuration file of the model to train.
· Preparation of training data can refer to this page. All datasets can be downloaded at the official website.
· Note that the default training dataset is based on lmdb, refer to docs in BasicSR to learn how to generate the training datasets.
· The training command is like

CUDA_VISIBLE_DEVICES=0 python basicsr/train.py -opt options/train/train_BSRN_x4.yml
CUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 basicsr/train.py -opt options/train/train_BSRN-S_x4.yml --launcher pytorch

For more training commands and details, please check the docs in BasicSR

Results

The inference results on benchmark datasets are available at Google Drive or Baidu Netdisk (access code: VISU).

Contact

If you have any question, please email [email protected] or join in the Wechat group of BasicSR to discuss with the authors.

bsrn's People

Contributors

xiaom233 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  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  avatar  avatar  avatar  avatar

bsrn's Issues

The highest result

Is your optimal metric trained with the default profile parameters you uploaded?

训练自己数据集

作者你好,我用你的模型训练自己的数据集,迭代到17万次后,后面l_pix一直为nan,并且psnr和ssim从35.50,0.93突然降到7.29和0.13,后面依然如此,除了dataset_enlarge_ratio设置为1,其余没有改动,请问这是怎么回事,又该怎么解决

how to get the high pnsr?

感谢博主优秀的工作,想请问一下训练和在Set5上验证的问题,我在DIV2k数据集上训练 6e5 次 iterations,在Set5上的验证PNSR为30.36,如下图所示,离论文中的32.35还有较大差距,这是哪里出错了吗
image

Multi-adds

How to get the number of Multi-adds and parameters? I use torchstat can not get the value in paper

data_util.py error

line 224

for gt_path,input_path in zip(gt_paths,input_paths):
# basename, ext = osp.splitext(osp.basename(gt_path))
basename_input, ext_input = osp.splitext(osp.basename(input_path))
input_name = f'{filename_tmpl.format(basename_input)}{ext_input}'
input_path = osp.join(input_folder, input_name)
assert input_name in input_paths, f'{input_name} is not in {input_key}_paths.'
gt_path = osp.join(gt_folder, gt_path)
paths.append(dict([(f'{input_key}_path', input_path), (f'{gt_key}_path', gt_path)]))
return paths

need to modify

New Super-Resolution Benchmarks

Hello,

MSU Graphics & Media Lab Video Group has recently launched two new Super-Resolution Benchmarks.

If you are interested in participating, you can add your algorithm following the submission steps:

We would be grateful for your feedback on our work!

Error: python basicsr/test.py -opt options/test/benchmark_BSRN_x4.yml

2023-03-06 09:55:28,820 INFO: Dataset [PairedImageDataset] - Set5 is built.
2023-03-06 09:55:28,820 INFO: Number of test images in Set5: 5
2023-03-06 09:55:28,821 INFO: Dataset [PairedImageDataset] - Set14 is built.
2023-03-06 09:55:28,821 INFO: Number of test images in Set14: 14
Name BSRN is not found, use name: BSRN_basicsr!
Traceback (most recent call last):
File "basicsr/test.py", line 45, in
test_pipeline(root_path)
File "basicsr/test.py", line 35, in test_pipeline
model = build_model(opt)
File "/root/miniconda3/lib/python3.8/site-packages/basicsr/models/init.py", line 26, in build_model
model = MODEL_REGISTRY.get(opt['model_type'])(opt)
File "/root/miniconda3/lib/python3.8/site-packages/basicsr/models/sr_model.py", line 22, in init
self.net_g = build_network(opt['network_g'])
File "/root/miniconda3/lib/python3.8/site-packages/basicsr/archs/init.py", line 22, in build_network
net = ARCH_REGISTRY.get(network_type)(**opt)
File "/root/miniconda3/lib/python3.8/site-packages/basicsr/utils/registry.py", line 70, in get
raise KeyError(f"No object named '{name}' found in '{self._name}' registry!")
KeyError: "No object named 'BSRN' found in 'arch' registry!"

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.