Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
more fixes
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import kornia as K
|
|
|
3 |
from kornia.contrib import ImageStitcher
|
4 |
import kornia.feature as KF
|
5 |
import torch
|
@@ -8,7 +9,7 @@ def inference(file_1, file_2):
|
|
8 |
img_1: Tensor = K.io.load_image(file_1.name, K.io.ImageLoadType.RGB32)
|
9 |
img_1 = img_1[None] # 1xCxHxW / fp32 / [0, 1]
|
10 |
img_2: Tensor = K.io.load_image(file_2.name, K.io.ImageLoadType.RGB32)
|
11 |
-
img_2 =
|
12 |
|
13 |
IS = ImageStitcher(KF.LoFTR(pretrained='outdoor'), estimator='ransac')
|
14 |
with torch.no_grad():
|
|
|
1 |
import gradio as gr
|
2 |
import kornia as K
|
3 |
+
from kornia.core import Tensor
|
4 |
from kornia.contrib import ImageStitcher
|
5 |
import kornia.feature as KF
|
6 |
import torch
|
|
|
9 |
img_1: Tensor = K.io.load_image(file_1.name, K.io.ImageLoadType.RGB32)
|
10 |
img_1 = img_1[None] # 1xCxHxW / fp32 / [0, 1]
|
11 |
img_2: Tensor = K.io.load_image(file_2.name, K.io.ImageLoadType.RGB32)
|
12 |
+
img_2 = img_2[None] # 1xCxHxW / fp32 / [0, 1]
|
13 |
|
14 |
IS = ImageStitcher(KF.LoFTR(pretrained='outdoor'), estimator='ransac')
|
15 |
with torch.no_grad():
|