basicsr_rain
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (3.1%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: rabbit-313
- License: apache-2.0
- Language: Python
- Default Branch: master
- Size: 1.36 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
降水量データの超解像
このレポジトリは以下のレポジトリをフォークして作成しました.以下のレポジトリのREADMEを参照してください。
How to
環境構築
- このレポジトリ自身がモジュールであるので,各自の環境にinstallしてください
bash
cd BasicSR_Rain
pip install -e .
訓練の実行
- データセットの準備
高解像度画像と低解像度画像のペアを用意し,それぞれ異なるディレクトリに保存してください.ディレクトリ構造の例は以下の通りです. ``` dataset ├── HR │ ├── train │ │ ├── 0001.npy │ │ ├── 0002.npy │ │ └── ... │ └── val │ ├── 0001.npy │ ├── 0002.npy │ └── ... └── LR ├── train │ ├── 0001.npy │ ├── 0002.npy │ └── ... └── val ├── 0001.npy ├── 0002.npy └── ...
``
/data02/rito/workspace/SR/itoru/Data` にデータセットを保存していますので確認ください
- yamlファイルの作成
- 超解像モデルのパラメータ・データセット・損失関数・最適化手法などの設定を行うためのyamlファイルの作成を行ってください.
BasicSR_Rain/optins/train/SwinIR/train_SwinIR_SRx4_scratch.ymlに設定ファイルを保存していますので確認ください- 以下に設定ファイルの例を示します. ```yaml # general settings name: trainSwinIRSRx4scratchraind4PDF modeltype: SwinIRModel scale: 4 numgpu: auto manualseed: 0
# dataset and data loader settings datasets: train: name: Rain-Train type: PairedRainDataset datarootgt: ../../Data/HR/d4PDF/train datarootlq: ../../Data/LR/d4PDF/train filenametmpl: '{}' iobackend: type: disk
gt_size: 64
use_hflip: true
use_rot: true
# data loader
num_worker_per_gpu: 6
batch_size_per_gpu: 32
dataset_enlarge_ratio: 1
prefetch_mode: ~
normalize:
upper_bound: 20
```
- 訓練の実行
- BasicSR_Rain/basicsr/train.py のオプションに上記のyamlファイルを指定して訓練を実行してください.
- 以下に訓練の実行例を示します.
bash python3 train.py -opt ../options/train/SwinIR/train_SwinIR_SRx4_scratch.yml
上記の手順で訓練を実行すると,BasicSRRain/experiments/以下に訓練結果が保存されます. - modelsディレクトリ:モデルの重み - trainingstatusディレクトリ:ステータスが保存されます.(訓練のステータスを利用して途中から訓練を再開することも可能です.)
テストの実行
- テストデータの準備
訓練データと同様に高解像度画像と低解像度画像のペアを用意してください.
yamlファイルの作成
テスト時の設定を行うためのyamlファイルの作成を行ってください.
BasicSR_Rain/optins/test/SwinIR/test_swinir_x4.ymlに設定ファイルを保存していますので確認くださいこのファイルに学習したモデルの重みを指定してください.
以下に設定ファイルの例を示します. ```yaml name: testSwinIRSRx4scratchraind4PDF modeltype: SwinIRModel scale: 4 numgpu: auto manualseed: 0
# dataset and data loader settings datasets: test1: name: Rain-Train type: PairedRainDataset datarootgt: ../../Data/HR/d4PDF/val datarootlq: ../../Data/LR/d4PDF/val filenametmpl: '{}' io_backend: type: disk
normalize:
upper_bound: 1
# network structures networkg: type: SwinIR upscale: 4 inchans: 1 imgsize: 16 windowsize: 8 imgrange: 1. depths: [6, 6, 6, 6, 6, 6] embeddim: 180 numheads: [6, 6, 6, 6, 6, 6] mlpratio: 2 upsampler: 'pixelshuffle' resi_connection: '1conv' ```
- テストの実行
- BasicSR_Rain/basicsr/test.py のオプションに上記のyamlファイルを指定してテストを実行してください.
- 以下にテストの実行例を示します.
bash python3 test.py -opt ../options/test/SwinIR/test_swinir_x4.yml上記の手順でテストを実行すると,BasicSR_Rain/results/以下にテスト結果が保存されます. - visualizationディレクトリ:高解像度画像・低解像度画像・超解像画像の可視化画像
- sr_npyディレクトリ:超解像画像のnumpyファイル
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this project, please cite it as below."
title: "BasicSR: Open Source Image and Video Restoration Toolbox"
version: 1.3.5
date-released: 2022-02-16
url: "https://github.com/XPixelGroup/BasicSR"
license: Apache-2.0
authors:
- family-names: Wang
given-names: Xintao
- family-names: Xie
given-names: Liangbin
- family-names: Yu
given-names: Ke
- family-names: Chan
given-names: Kelvin C.K.
- family-names: Loy
given-names: Chen Change
- family-names: Dong
given-names: Chao
GitHub Events
Total
- Push event: 4
- Create event: 2
Last Year
- Push event: 4
- Create event: 2
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Pillow *
- addict *
- future *
- lmdb *
- numpy *
- opencv-python *
- pyyaml *
- recommonmark *
- requests *
- scikit-image *
- scipy *
- sphinx *
- sphinx_intl *
- sphinx_markdown_tables *
- sphinx_rtd_theme *
- tb-nightly *
- torch >=1.7
- torchvision *
- tqdm *
- yapf *
- Pillow *
- addict *
- future *
- lmdb *
- numpy >=1.17,<2
- opencv-python *
- pyyaml *
- requests *
- scikit-image *
- scipy *
- tb-nightly *
- torch >=1.7
- torchvision *
- tqdm *
- yapf *