Upload 147 files
Browse files- App_main.py +4 -9
- README.md +2 -1
- models/__init__.py +1 -1
- models/__pycache__/__init__.cpython-310.pyc +0 -0
- models/__pycache__/edsr.cpython-310.pyc +0 -0
- models/__pycache__/funsr.cpython-310.pyc +0 -0
- models/__pycache__/liif.cpython-310.pyc +0 -0
- models/__pycache__/metasr.cpython-310.pyc +0 -0
- models/__pycache__/mlp.cpython-310.pyc +0 -0
- models/__pycache__/models.cpython-310.pyc +0 -0
- models/__pycache__/rcan.cpython-310.pyc +0 -0
- models/__pycache__/rdn.cpython-310.pyc +0 -0
- models/__pycache__/rs_multiscale_super.cpython-310.pyc +0 -0
- models/__pycache__/rs_super.cpython-310.pyc +0 -0
- models/__pycache__/siren_modulation.cpython-310.pyc +0 -0
- models/__pycache__/swin_backbone.cpython-310.pyc +0 -0
- models/__pycache__/transformer_neck.cpython-310.pyc +0 -0
- models/baselines/__pycache__/OverNet.cpython-310.pyc +0 -0
- models/baselines/__pycache__/__init__.cpython-310.pyc +0 -0
- models/baselines/__pycache__/aliif.cpython-310.pyc +0 -0
- models/baselines/__pycache__/arbrcan.cpython-310.pyc +0 -0
- models/baselines/__pycache__/basis.cpython-310.pyc +0 -0
- models/baselines/__pycache__/diinn.cpython-310.pyc +0 -0
- models/baselines/__pycache__/dynamic_layers.cpython-310.pyc +0 -0
- models/baselines/__pycache__/expansion.cpython-310.pyc +0 -0
- models/baselines/__pycache__/sadn.cpython-310.pyc +0 -0
- models/baselines/__pycache__/upsampler.cpython-310.pyc +0 -0
- models/blocks/__pycache__/CSPLayer.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/__init__.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/common.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/dcm.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/fsrcnn.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/lgcnet.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/srcnn.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/transenet.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/transformer.cpython-310.pyc +0 -0
- models/cnn_models/__pycache__/vdsr.cpython-310.pyc +0 -0
- models/swin_backbone.py +1 -2
- requirements.txt +5 -7
App_main.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
-
import numpy as np
|
2 |
import os
|
3 |
-
os.system('nvidia-smi')
|
4 |
-
os.system('ls /usr/local')
|
5 |
-
os.system('pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu116')
|
6 |
-
os.system('pip install -U openmim')
|
7 |
os.system('mim install mmcv')
|
|
|
8 |
import models
|
9 |
import gradio as gr
|
10 |
|
@@ -88,12 +84,12 @@ examples = [
|
|
88 |
]
|
89 |
|
90 |
with gr.Blocks() as demo:
|
91 |
-
image_input = gr.
|
92 |
# with gr.Row().style(equal_height=True):
|
93 |
# image_LR_output = gr.outputs.Image(label='LR Img', type='numpy')
|
94 |
-
image_output = gr.
|
95 |
with gr.Row():
|
96 |
-
checkpoint = gr.
|
97 |
scale = gr.Slider(1, 10, value=4.0, step=0.1, label='scale')
|
98 |
|
99 |
io = gr.Interface(fn=sr_func,
|
@@ -111,6 +107,5 @@ io = gr.Interface(fn=sr_func,
|
|
111 |
allow_flagging='auto',
|
112 |
examples=examples,
|
113 |
cache_examples=True,
|
114 |
-
layout="grid"
|
115 |
)
|
116 |
io.launch()
|
|
|
|
|
1 |
import os
|
|
|
|
|
|
|
|
|
2 |
os.system('mim install mmcv')
|
3 |
+
import numpy as np
|
4 |
import models
|
5 |
import gradio as gr
|
6 |
|
|
|
84 |
]
|
85 |
|
86 |
with gr.Blocks() as demo:
|
87 |
+
image_input = gr.Image(type='pil', label='Input Img')
|
88 |
# with gr.Row().style(equal_height=True):
|
89 |
# image_LR_output = gr.outputs.Image(label='LR Img', type='numpy')
|
90 |
+
image_output = gr.Image(label='SR Result', type='numpy')
|
91 |
with gr.Row():
|
92 |
+
checkpoint = gr.Radio(['UC', 'AID'], label='Checkpoint')
|
93 |
scale = gr.Slider(1, 10, value=4.0, step=0.1, label='scale')
|
94 |
|
95 |
io = gr.Interface(fn=sr_func,
|
|
|
107 |
allow_flagging='auto',
|
108 |
examples=examples,
|
109 |
cache_examples=True,
|
|
|
110 |
)
|
111 |
io.launch()
|
README.md
CHANGED
@@ -4,8 +4,9 @@ emoji: 🐢
|
|
4 |
colorFrom: red
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: App_main.py
|
9 |
pinned: false
|
|
|
10 |
---
|
11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
4 |
colorFrom: red
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.2.0
|
8 |
app_file: App_main.py
|
9 |
pinned: false
|
10 |
+
python_version: 3.10
|
11 |
---
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
models/__init__.py
CHANGED
@@ -3,7 +3,7 @@ from . import edsr, rdn, rcan, swin_backbone
|
|
3 |
from . import mlp
|
4 |
from . import liif
|
5 |
from . import metasr
|
6 |
-
from . import rs_super, siren_modulation, transformer_neck
|
7 |
from . cnn_models import *
|
8 |
from . import rs_multiscale_super
|
9 |
from .funsr import FUNSR
|
|
|
3 |
from . import mlp
|
4 |
from . import liif
|
5 |
from . import metasr
|
6 |
+
from . import rs_super, siren_modulation, transformer_neck
|
7 |
from . cnn_models import *
|
8 |
from . import rs_multiscale_super
|
9 |
from .funsr import FUNSR
|
models/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (559 Bytes). View file
|
|
models/__pycache__/edsr.cpython-310.pyc
ADDED
Binary file (5.82 kB). View file
|
|
models/__pycache__/funsr.cpython-310.pyc
ADDED
Binary file (5.08 kB). View file
|
|
models/__pycache__/liif.cpython-310.pyc
ADDED
Binary file (3.03 kB). View file
|
|
models/__pycache__/metasr.cpython-310.pyc
ADDED
Binary file (2.47 kB). View file
|
|
models/__pycache__/mlp.cpython-310.pyc
ADDED
Binary file (2.12 kB). View file
|
|
models/__pycache__/models.cpython-310.pyc
ADDED
Binary file (734 Bytes). View file
|
|
models/__pycache__/rcan.cpython-310.pyc
ADDED
Binary file (6.47 kB). View file
|
|
models/__pycache__/rdn.cpython-310.pyc
ADDED
Binary file (3.3 kB). View file
|
|
models/__pycache__/rs_multiscale_super.cpython-310.pyc
ADDED
Binary file (6.26 kB). View file
|
|
models/__pycache__/rs_super.cpython-310.pyc
ADDED
Binary file (4.99 kB). View file
|
|
models/__pycache__/siren_modulation.cpython-310.pyc
ADDED
Binary file (1.53 kB). View file
|
|
models/__pycache__/swin_backbone.cpython-310.pyc
ADDED
Binary file (1.87 kB). View file
|
|
models/__pycache__/transformer_neck.cpython-310.pyc
ADDED
Binary file (2.88 kB). View file
|
|
models/baselines/__pycache__/OverNet.cpython-310.pyc
ADDED
Binary file (7.42 kB). View file
|
|
models/baselines/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (356 Bytes). View file
|
|
models/baselines/__pycache__/aliif.cpython-310.pyc
ADDED
Binary file (3.38 kB). View file
|
|
models/baselines/__pycache__/arbrcan.cpython-310.pyc
ADDED
Binary file (9.51 kB). View file
|
|
models/baselines/__pycache__/basis.cpython-310.pyc
ADDED
Binary file (2.83 kB). View file
|
|
models/baselines/__pycache__/diinn.cpython-310.pyc
ADDED
Binary file (5.43 kB). View file
|
|
models/baselines/__pycache__/dynamic_layers.cpython-310.pyc
ADDED
Binary file (3.85 kB). View file
|
|
models/baselines/__pycache__/expansion.cpython-310.pyc
ADDED
Binary file (1.5 kB). View file
|
|
models/baselines/__pycache__/sadn.cpython-310.pyc
ADDED
Binary file (16.8 kB). View file
|
|
models/baselines/__pycache__/upsampler.cpython-310.pyc
ADDED
Binary file (8.6 kB). View file
|
|
models/blocks/__pycache__/CSPLayer.cpython-310.pyc
ADDED
Binary file (4.37 kB). View file
|
|
models/cnn_models/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (341 Bytes). View file
|
|
models/cnn_models/__pycache__/common.cpython-310.pyc
ADDED
Binary file (4.67 kB). View file
|
|
models/cnn_models/__pycache__/dcm.cpython-310.pyc
ADDED
Binary file (3.45 kB). View file
|
|
models/cnn_models/__pycache__/fsrcnn.cpython-310.pyc
ADDED
Binary file (3.16 kB). View file
|
|
models/cnn_models/__pycache__/lgcnet.cpython-310.pyc
ADDED
Binary file (3.59 kB). View file
|
|
models/cnn_models/__pycache__/srcnn.cpython-310.pyc
ADDED
Binary file (2.31 kB). View file
|
|
models/cnn_models/__pycache__/transenet.cpython-310.pyc
ADDED
Binary file (5.89 kB). View file
|
|
models/cnn_models/__pycache__/transformer.cpython-310.pyc
ADDED
Binary file (6.61 kB). View file
|
|
models/cnn_models/__pycache__/vdsr.cpython-310.pyc
ADDED
Binary file (2.65 kB). View file
|
|
models/swin_backbone.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
from models import register
|
2 |
from einops import rearrange
|
3 |
-
from mmcv.cnn import build_norm_layer
|
4 |
import torch
|
5 |
import torch.nn as nn
|
6 |
import torch.nn.functional as F
|
7 |
import torch.utils.checkpoint as cp
|
8 |
-
from .swin_neck import SwinTransformer, PatchEmbed, SwinBlockSequence
|
9 |
|
10 |
|
11 |
@register('Swin_backbone')
|
|
|
1 |
from models import register
|
2 |
from einops import rearrange
|
3 |
+
from mmcv.cnn import build_norm_layer
|
4 |
import torch
|
5 |
import torch.nn as nn
|
6 |
import torch.nn.functional as F
|
7 |
import torch.utils.checkpoint as cp
|
|
|
8 |
|
9 |
|
10 |
@register('Swin_backbone')
|
requirements.txt
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
3 |
einops
|
4 |
-
|
5 |
-
opencv-python
|
6 |
-
pandas
|
7 |
-
scikit-image
|
8 |
-
tqdm
|
9 |
easydict
|
|
|
1 |
+
torch
|
2 |
+
torchvision
|
3 |
+
openmim
|
4 |
+
gradio
|
5 |
einops
|
6 |
+
tensorboardX
|
|
|
|
|
|
|
|
|
7 |
easydict
|