Realcat commited on
Commit
0f3f5ca
1 Parent(s): 2d36d99

fix: display lines

Browse files
Files changed (2) hide show
  1. common/utils.py +4 -0
  2. common/viz.py +3 -1
common/utils.py CHANGED
@@ -20,10 +20,14 @@ from .viz import (
20
  )
21
  import time
22
  import matplotlib.pyplot as plt
 
 
 
23
 
24
  device = "cuda" if torch.cuda.is_available() else "cpu"
25
 
26
  ROOT = Path(__file__).parent.parent
 
27
  DEFAULT_SETTING_THRESHOLD = 0.1
28
  DEFAULT_SETTING_MAX_FEATURES = 2000
29
  DEFAULT_DEFAULT_KEYPOINT_THRESHOLD = 0.01
 
20
  )
21
  import time
22
  import matplotlib.pyplot as plt
23
+ import warnings
24
+ warnings.filterwarnings("ignore", category=UserWarning)
25
+ warnings.filterwarnings("ignore", category=gr.deprecation.GradioDeprecationWarning)
26
 
27
  device = "cuda" if torch.cuda.is_available() else "cpu"
28
 
29
  ROOT = Path(__file__).parent.parent
30
+ # some default values
31
  DEFAULT_SETTING_THRESHOLD = 0.1
32
  DEFAULT_SETTING_MAX_FEATURES = 2000
33
  DEFAULT_DEFAULT_KEYPOINT_THRESHOLD = 0.01
common/viz.py CHANGED
@@ -1,8 +1,10 @@
 
 
1
  import numpy as np
2
  import seaborn as sns
3
- import matplotlib
4
  import matplotlib.pyplot as plt
5
  from pathlib import Path
 
6
  from typing import Dict, Any, Optional, Tuple, List, Union
7
 
8
 
 
1
+ import cv2
2
+ import matplotlib
3
  import numpy as np
4
  import seaborn as sns
 
5
  import matplotlib.pyplot as plt
6
  from pathlib import Path
7
+ import typing
8
  from typing import Dict, Any, Optional, Tuple, List, Union
9
 
10