Spaces:
Paused
Paused
fast api cod commit
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
@@ -165,10 +165,11 @@ def masking_process(image,obj):
|
|
165 |
response = run_sam_inference(SAM_IMAGE_MODEL, image, detections)
|
166 |
print('5')
|
167 |
if response['code'] == 400:
|
168 |
-
|
|
|
169 |
else:
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
|
|
165 |
response = run_sam_inference(SAM_IMAGE_MODEL, image, detections)
|
166 |
print('5')
|
167 |
if response['code'] == 400:
|
168 |
+
print("no object found")
|
169 |
+
return "no object found"
|
170 |
else:
|
171 |
+
detections2=response['data']
|
172 |
+
mask = Image.fromarray(detections2.mask[0])
|
173 |
+
# response['data']=mask
|
174 |
+
torch.cuda.empty_cache()
|
175 |
+
return mask
|