Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
Real-ESRGAN
Commits
fc7a249d
Commit
fc7a249d
authored
Sep 25, 2022
by
boomb0om
Browse files
Fix imports
parent
d0496926
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
RealESRGAN/__init__.py
RealESRGAN/__init__.py
+1
-0
RealESRGAN/model.py
RealESRGAN/model.py
+2
-2
RealESRGAN/rrdbnet_arch.py
RealESRGAN/rrdbnet_arch.py
+1
-1
main.py
main.py
+1
-2
No files found.
RealESRGAN/__init__.py
View file @
fc7a249d
from
.model
import
RealESRGAN
\ No newline at end of file
RealESRGAN/model.py
View file @
fc7a249d
...
...
@@ -4,8 +4,8 @@ from PIL import Image
import
numpy
as
np
import
cv2
from
rrdbnet_arch
import
RRDBNet
from
utils
import
*
from
.
rrdbnet_arch
import
RRDBNet
from
.
utils
import
*
class
RealESRGAN
:
...
...
RealESRGAN/rrdbnet_arch.py
View file @
fc7a249d
...
...
@@ -2,7 +2,7 @@ import torch
from
torch
import
nn
as
nn
from
torch.nn
import
functional
as
F
from
arch_utils
import
default_init_weights
,
make_layer
,
pixel_unshuffle
from
.
arch_utils
import
default_init_weights
,
make_layer
,
pixel_unshuffle
class
ResidualDenseBlock
(
nn
.
Module
):
...
...
main.py
View file @
fc7a249d
...
...
@@ -2,7 +2,7 @@ import os
import
torch
from
PIL
import
Image
import
numpy
as
np
from
r
eal
esrgan
import
RealESRGAN
from
R
eal
ESRGAN
import
RealESRGAN
def
main
()
->
int
:
...
...
@@ -13,7 +13,6 @@ def main() -> int:
image
=
Image
.
open
(
f
"inputs/
{
image
}
"
).
convert
(
'RGB'
)
sr_image
=
model
.
predict
(
image
)
sr_image
.
save
(
f
'results/
{
i
}
.png'
)
return
1
if
__name__
==
'__main__'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment