Spaces:
Build error
Build error
init
Browse files- app.py +3 -1
- test_dark.ipynb +0 -0
app.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
|
3 |
import torch
|
4 |
import torch.nn.functional as F
|
5 |
-
from torchvision.transforms import Compose, ToTensor, Normalize, ConvertImageDtype
|
6 |
|
7 |
import numpy as np
|
8 |
import cv2
|
@@ -27,6 +27,7 @@ def dark_inference(img):
|
|
27 |
|
28 |
transform = Compose([
|
29 |
ToTensor(),
|
|
|
30 |
Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
|
31 |
ConvertImageDtype(torch.float)
|
32 |
])
|
@@ -47,6 +48,7 @@ def exposure_inference(img):
|
|
47 |
|
48 |
transform = Compose([
|
49 |
ToTensor(),
|
|
|
50 |
ConvertImageDtype(torch.float)
|
51 |
])
|
52 |
input_img = transform(img)
|
|
|
2 |
|
3 |
import torch
|
4 |
import torch.nn.functional as F
|
5 |
+
from torchvision.transforms import Compose, ToTensor, Scale, Normalize, ConvertImageDtype
|
6 |
|
7 |
import numpy as np
|
8 |
import cv2
|
|
|
27 |
|
28 |
transform = Compose([
|
29 |
ToTensor(),
|
30 |
+
Scale(512),
|
31 |
Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
|
32 |
ConvertImageDtype(torch.float)
|
33 |
])
|
|
|
48 |
|
49 |
transform = Compose([
|
50 |
ToTensor(),
|
51 |
+
Scale(512),
|
52 |
ConvertImageDtype(torch.float)
|
53 |
])
|
54 |
input_img = transform(img)
|
test_dark.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|