Spaces:
Runtime error
Runtime error
Update sam/utils.py
Browse files- sam/utils.py +12 -7
sam/utils.py
CHANGED
@@ -230,10 +230,15 @@ def visualize_attention(arr, filename):
|
|
230 |
|
231 |
|
232 |
# Build config
|
233 |
-
def build_sam_config(config_path):
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
|
232 |
# Build config
|
233 |
+
# def build_sam_config(config_path):
|
234 |
+
# with open(config_path, 'r') as infile:
|
235 |
+
# config = json.load(infile)
|
236 |
+
|
237 |
+
# sam_checkpoint = config['model']['sam_checkpoint']
|
238 |
+
# model_type = config['model']['model_type']
|
239 |
+
# return sam_checkpoint, model_type
|
240 |
+
|
241 |
+
def build_sam_config(config):
|
242 |
+
sam_checkpoint = config.sam.sam_checkpoint
|
243 |
+
model_type = config.sam.model_type
|
244 |
+
return sam_checkpoint, model_type
|