Spaces:
Runtime error
Runtime error
liuyizhang
commited on
Commit
•
fd3aa1a
1
Parent(s):
d60468e
update app.py
Browse files- app.py +1 -1
- ram_utils.py +1 -1
app.py
CHANGED
@@ -322,7 +322,7 @@ def lama_cleaner_process(image, mask):
|
|
322 |
return image
|
323 |
|
324 |
# relate anything
|
325 |
-
from ram_utils import iou, sort_and_deduplicate, relation_classes, MLP, show_anns,
|
326 |
from ram_train_eval import RamModel,RamPredictor
|
327 |
from mmengine.config import Config as mmengine_Config
|
328 |
input_size = 512
|
|
|
322 |
return image
|
323 |
|
324 |
# relate anything
|
325 |
+
from ram_utils import iou, sort_and_deduplicate, relation_classes, MLP, show_anns, ram_show_mask
|
326 |
from ram_train_eval import RamModel,RamPredictor
|
327 |
from mmengine.config import Config as mmengine_Config
|
328 |
input_size = 512
|
ram_utils.py
CHANGED
@@ -57,7 +57,7 @@ def show_points(coords, labels, ax, marker_size=375):
|
|
57 |
ax.scatter(neg_points[:, 0], neg_points[:, 1], color='red', marker='*',
|
58 |
s=marker_size, edgecolor='white', linewidth=1.25)
|
59 |
|
60 |
-
def
|
61 |
img = np.ones((m.shape[0], m.shape[1], 3))
|
62 |
color_mask = np.random.random((1, 3)).tolist()[0]
|
63 |
for i in range(3):
|
|
|
57 |
ax.scatter(neg_points[:, 0], neg_points[:, 1], color='red', marker='*',
|
58 |
s=marker_size, edgecolor='white', linewidth=1.25)
|
59 |
|
60 |
+
def ram_show_mask(m):
|
61 |
img = np.ones((m.shape[0], m.shape[1], 3))
|
62 |
color_mask = np.random.random((1, 3)).tolist()[0]
|
63 |
for i in range(3):
|