Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,6 +28,10 @@ import cv2
|
|
| 28 |
|
| 29 |
plt.ion()
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
torch.backends.cuda.matmul.allow_tf32 = True # for gpu >= Ampere and pytorch >= 1.12
|
| 32 |
batch_size = 1
|
| 33 |
|
|
|
|
| 28 |
|
| 29 |
plt.ion()
|
| 30 |
|
| 31 |
+
|
| 32 |
+
# 添加 sam2 模块路径
|
| 33 |
+
sys.path.append(os.path.join(os.path.dirname(__file__), 'SAM2'))
|
| 34 |
+
|
| 35 |
torch.backends.cuda.matmul.allow_tf32 = True # for gpu >= Ampere and pytorch >= 1.12
|
| 36 |
batch_size = 1
|
| 37 |
|