Spaces:
Sleeping
Sleeping
Commit
·
e93d8c1
1
Parent(s):
ba0e7f4
Minor fix
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ model.to(device)
|
|
16 |
|
17 |
def inference(image, conf_thres, iou_thres,):
|
18 |
pred = model(image, device=device, retina_masks=True, imgsz=1024, conf=conf_thres, iou=iou_thres)
|
19 |
-
prompt_process = FastSAMPrompt(
|
20 |
ann = prompt_process.everything_prompt()
|
21 |
prompt_process.plot(annotations=ann, output_path="./output.jpg", withContours=False, better_quality=False)
|
22 |
output = Image.open('./output.jpg')
|
|
|
16 |
|
17 |
def inference(image, conf_thres, iou_thres,):
|
18 |
pred = model(image, device=device, retina_masks=True, imgsz=1024, conf=conf_thres, iou=iou_thres)
|
19 |
+
prompt_process = FastSAMPrompt(image, pred, device="cpu")
|
20 |
ann = prompt_process.everything_prompt()
|
21 |
prompt_process.plot(annotations=ann, output_path="./output.jpg", withContours=False, better_quality=False)
|
22 |
output = Image.open('./output.jpg')
|