Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
update app
Browse files- app.py +2 -2
- packages.txt +0 -0
app.py
CHANGED
@@ -5,7 +5,7 @@ from kornia.contrib import ImageStitcher
|
|
5 |
import kornia.feature as KF
|
6 |
import torch
|
7 |
|
8 |
-
def
|
9 |
img_1 = K.image_to_tensor(io.imread(file_1), False).float() / 255.
|
10 |
img_2 = K.image_to_tensor(io.imread(file_2), False).float() / 255.
|
11 |
IS = ImageStitcher(KF.LoFTR(pretrained='outdoor'), estimator='ransac')
|
@@ -34,7 +34,7 @@ outputs = [
|
|
34 |
title = "Image Stitching using Kornia and LoFTR"
|
35 |
|
36 |
demo_app = gr.Interface(
|
37 |
-
fn=
|
38 |
inputs=inputs,
|
39 |
outputs=outputs,
|
40 |
title=title,
|
|
|
5 |
import kornia.feature as KF
|
6 |
import torch
|
7 |
|
8 |
+
def inference(file_1, file_2):
|
9 |
img_1 = K.image_to_tensor(io.imread(file_1), False).float() / 255.
|
10 |
img_2 = K.image_to_tensor(io.imread(file_2), False).float() / 255.
|
11 |
IS = ImageStitcher(KF.LoFTR(pretrained='outdoor'), estimator='ransac')
|
|
|
34 |
title = "Image Stitching using Kornia and LoFTR"
|
35 |
|
36 |
demo_app = gr.Interface(
|
37 |
+
fn=inference,
|
38 |
inputs=inputs,
|
39 |
outputs=outputs,
|
40 |
title=title,
|
packages.txt
DELETED
File without changes
|