edgarriba commited on
Commit
cb2a0ee
1 Parent(s): a86591e

Update app.py

Browse files

fixes https://huggingface.co/spaces/kornia/Image-Stitching/discussions/1

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,9 +5,9 @@ import kornia.feature as KF
5
  import torch
6
 
7
  def inference(file_1, file_2):
8
- img_1: Tensor = K.io.load_image(str(file_1), K.io.ImageLoadType.RGB32)
9
  img_1 = img_1[None] # 1xCxHxW / fp32 / [0, 1]
10
- img_2: Tensor = K.io.load_image(str(file_2), K.io.ImageLoadType.RGB32)
11
  img_2 = img_1[None] # 1xCxHxW / fp32 / [0, 1]
12
 
13
  IS = ImageStitcher(KF.LoFTR(pretrained='outdoor'), estimator='ransac')
 
5
  import torch
6
 
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 = img_1[None] # 1xCxHxW / fp32 / [0, 1]
12
 
13
  IS = ImageStitcher(KF.LoFTR(pretrained='outdoor'), estimator='ransac')