Spaces:
Running
Running
remove license comments
Browse files- models/SRFlow/code/__init__.py +0 -17
- models/SRFlow/code/confs/SRFlow_DF2K_4X.yml +2 -18
- models/SRFlow/code/models/SRFlow_model.py +0 -16
- models/SRFlow/code/models/SR_model.py +0 -16
- models/SRFlow/code/models/base_model.py +0 -16
- models/SRFlow/code/models/lr_scheduler.py +0 -16
- models/SRFlow/code/models/modules/FlowActNorms.py +0 -16
- models/SRFlow/code/models/modules/FlowStep.py +0 -16
- models/SRFlow/code/models/modules/FlowUpsamplerNet.py +0 -16
- models/SRFlow/code/models/modules/Permutations.py +0 -16
- models/SRFlow/code/models/modules/RRDBNet_arch.py +0 -16
- models/SRFlow/code/models/modules/SRFlowNet_arch.py +0 -16
- models/SRFlow/code/models/modules/Split.py +0 -16
- models/SRFlow/code/models/modules/flow.py +0 -16
- models/SRFlow/code/models/modules/glow_arch.py +0 -16
- models/SRFlow/code/models/modules/loss.py +0 -16
- models/SRFlow/code/models/modules/module_util.py +0 -16
- models/SRFlow/code/models/modules/thops.py +0 -16
- models/SRFlow/code/models/networks.py +0 -16
- models/SRFlow/code/options/options.py +0 -16
- models/SRFlow/code/utils/timer.py +0 -16
models/SRFlow/code/__init__.py
CHANGED
@@ -1,20 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
-
|
18 |
import glob
|
19 |
import sys
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import glob
|
2 |
import sys
|
3 |
|
models/SRFlow/code/confs/SRFlow_DF2K_4X.yml
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
#### general settings
|
18 |
name: train
|
19 |
use_tb_logger: true
|
@@ -40,8 +24,8 @@ datasets:
|
|
40 |
val:
|
41 |
name: DF2K_256_tr
|
42 |
mode: LRHR_PKL
|
43 |
-
dataroot_GT:
|
44 |
-
dataroot_LQ:
|
45 |
quant: 32
|
46 |
n_max: 20
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#### general settings
|
2 |
name: train
|
3 |
use_tb_logger: true
|
|
|
24 |
val:
|
25 |
name: DF2K_256_tr
|
26 |
mode: LRHR_PKL
|
27 |
+
dataroot_GT: .
|
28 |
+
dataroot_LQ:
|
29 |
quant: 32
|
30 |
n_max: 20
|
31 |
|
models/SRFlow/code/models/SRFlow_model.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
import logging
|
18 |
import sys
|
19 |
sys.path.append('../..')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import logging
|
2 |
import sys
|
3 |
sys.path.append('../..')
|
models/SRFlow/code/models/SR_model.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
import logging
|
18 |
from collections import OrderedDict
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import logging
|
2 |
from collections import OrderedDict
|
3 |
|
models/SRFlow/code/models/base_model.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
import os
|
18 |
from collections import OrderedDict
|
19 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
from collections import OrderedDict
|
3 |
import torch
|
models/SRFlow/code/models/lr_scheduler.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
import math
|
18 |
from collections import Counter
|
19 |
from collections import defaultdict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import math
|
2 |
from collections import Counter
|
3 |
from collections import defaultdict
|
models/SRFlow/code/models/modules/FlowActNorms.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch
|
18 |
from torch import nn as nn
|
19 |
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
from torch import nn as nn
|
3 |
import sys
|
models/SRFlow/code/models/modules/FlowStep.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch
|
18 |
from torch import nn as nn
|
19 |
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
from torch import nn as nn
|
3 |
import sys
|
models/SRFlow/code/models/modules/FlowUpsamplerNet.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import numpy as np
|
18 |
import torch
|
19 |
from torch import nn as nn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
import torch
|
3 |
from torch import nn as nn
|
models/SRFlow/code/models/modules/Permutations.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import numpy as np
|
18 |
import torch
|
19 |
from torch import nn as nn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
import torch
|
3 |
from torch import nn as nn
|
models/SRFlow/code/models/modules/RRDBNet_arch.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import functools
|
18 |
import torch
|
19 |
import torch.nn as nn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import functools
|
2 |
import torch
|
3 |
import torch.nn as nn
|
models/SRFlow/code/models/modules/SRFlowNet_arch.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import math
|
18 |
|
19 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import math
|
2 |
|
3 |
import torch
|
models/SRFlow/code/models/modules/Split.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch
|
18 |
from torch import nn as nn
|
19 |
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
from torch import nn as nn
|
3 |
import sys
|
models/SRFlow/code/models/modules/flow.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch
|
18 |
import torch.nn as nn
|
19 |
import torch.nn.functional as F
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
import torch.nn as nn
|
3 |
import torch.nn.functional as F
|
models/SRFlow/code/models/modules/glow_arch.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch.nn as nn
|
18 |
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch.nn as nn
|
2 |
|
3 |
|
models/SRFlow/code/models/modules/loss.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch
|
18 |
import torch.nn as nn
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
import torch.nn as nn
|
3 |
|
models/SRFlow/code/models/modules/module_util.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch
|
18 |
import torch.nn as nn
|
19 |
import torch.nn.init as init
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
import torch.nn as nn
|
3 |
import torch.nn.init as init
|
models/SRFlow/code/models/modules/thops.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE
|
16 |
-
|
17 |
import torch
|
18 |
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
|
3 |
|
models/SRFlow/code/models/networks.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
import importlib
|
18 |
import sys
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import importlib
|
2 |
import sys
|
3 |
|
models/SRFlow/code/options/options.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
import os
|
18 |
import os.path as osp
|
19 |
import logging
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
import os.path as osp
|
3 |
import logging
|
models/SRFlow/code/utils/timer.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
|
2 |
-
# Licensed under CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International) (the "License");
|
3 |
-
# you may not use this file except in compliance with the License.
|
4 |
-
# You may obtain a copy of the License at
|
5 |
-
#
|
6 |
-
# https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
7 |
-
#
|
8 |
-
# The code is released for academic research use only. For commercial use, please contact Huawei Technologies Co., Ltd.
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
#
|
15 |
-
# This file contains content licensed by https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE
|
16 |
-
|
17 |
import time
|
18 |
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import time
|
2 |
|
3 |
|