Spaces:
Paused
Paused
test
Browse files
modules/__pycache__/masking_module.cpython-310.pyc
CHANGED
|
Binary files a/modules/__pycache__/masking_module.cpython-310.pyc and b/modules/__pycache__/masking_module.cpython-310.pyc differ
|
|
|
modules/masking_module.py
CHANGED
|
@@ -33,7 +33,7 @@ def load_sam_image_model(
|
|
| 33 |
return SAM2ImagePredictor(sam_model=model)
|
| 34 |
|
| 35 |
|
| 36 |
-
@spaces.GPU(duration=
|
| 37 |
def run_sam_inference(
|
| 38 |
model: Any,
|
| 39 |
image: Image,
|
|
@@ -62,7 +62,7 @@ def run_sam_inference(
|
|
| 62 |
'data':detections,
|
| 63 |
'message':'The AI couldn’t detect the object you want to mask.'
|
| 64 |
}
|
| 65 |
-
@spaces.GPU(duration=
|
| 66 |
def florence2(image,task_prompt, text_input=None):
|
| 67 |
"""
|
| 68 |
Calling the Microsoft Florence2 model
|
|
@@ -130,7 +130,7 @@ def draw_MASK(image, prediction, fill_mask=False):
|
|
| 130 |
|
| 131 |
return new_image
|
| 132 |
|
| 133 |
-
@spaces.GPU(duration=
|
| 134 |
def masking_process(image,obj):
|
| 135 |
# task_prompt = '<REGION_TO_SEGMENTATION>'
|
| 136 |
# # task_prompt = '<OPEN_VOCABULARY_DETECTION>'
|
|
|
|
| 33 |
return SAM2ImagePredictor(sam_model=model)
|
| 34 |
|
| 35 |
|
| 36 |
+
@spaces.GPU(duration=20)
|
| 37 |
def run_sam_inference(
|
| 38 |
model: Any,
|
| 39 |
image: Image,
|
|
|
|
| 62 |
'data':detections,
|
| 63 |
'message':'The AI couldn’t detect the object you want to mask.'
|
| 64 |
}
|
| 65 |
+
@spaces.GPU(duration=20)
|
| 66 |
def florence2(image,task_prompt, text_input=None):
|
| 67 |
"""
|
| 68 |
Calling the Microsoft Florence2 model
|
|
|
|
| 130 |
|
| 131 |
return new_image
|
| 132 |
|
| 133 |
+
@spaces.GPU(duration=20)
|
| 134 |
def masking_process(image,obj):
|
| 135 |
# task_prompt = '<REGION_TO_SEGMENTATION>'
|
| 136 |
# # task_prompt = '<OPEN_VOCABULARY_DETECTION>'
|