Spaces:
Build error
Build error
temp
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
import torch
|
|
|
4 |
|
5 |
import fire_network
|
6 |
|
@@ -33,8 +34,8 @@ def generate_matching_superfeatures(im1, im2, scale_id=6, threshold=50):
|
|
33 |
im1_tensor = transform(im1)
|
34 |
im2_tensor = transform(im2)
|
35 |
|
36 |
-
im1_cv = cv2.imread(im1)
|
37 |
-
im2_cv = cv2.imread(im2)
|
38 |
|
39 |
# extract features
|
40 |
with torch.no_grad():
|
@@ -48,9 +49,11 @@ def generate_matching_superfeatures(im1, im2, scale_id=6, threshold=50):
|
|
48 |
attns2 = output2[1]
|
49 |
strenghts2 = output2[2]
|
50 |
|
51 |
-
print(feats1
|
52 |
-
print(
|
53 |
-
print(
|
|
|
|
|
54 |
|
55 |
|
56 |
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
import torch
|
4 |
+
from torchvision import transforms
|
5 |
|
6 |
import fire_network
|
7 |
|
|
|
34 |
im1_tensor = transform(im1)
|
35 |
im2_tensor = transform(im2)
|
36 |
|
37 |
+
# im1_cv = cv2.imread(im1)
|
38 |
+
# im2_cv = cv2.imread(im2)
|
39 |
|
40 |
# extract features
|
41 |
with torch.no_grad():
|
|
|
49 |
attns2 = output2[1]
|
50 |
strenghts2 = output2[2]
|
51 |
|
52 |
+
print(len(feats1))
|
53 |
+
# print(feats1.shape)
|
54 |
+
print(feats1[0].shape)
|
55 |
+
# print(attns1.shape)
|
56 |
+
# print(strenghts1.shape)
|
57 |
|
58 |
|
59 |
|