MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / inference

Function inference

demo.py:56–62  ·  view source on GitHub ↗
(image,text,text_part,text_thresh,*args, **kwargs)

Source from the content-addressed store, hash-verified

54
55@torch.no_grad()
56def inference(image,text,text_part,text_thresh,*args, **kwargs):
57 text_size, hole_scale, island_scale=640,100,100
58 with torch.autocast(device_type='cuda', dtype=torch.float16):
59 semantic=False
60 model=model_sam
61 a,b= interactive_infer_image_idino_m2m(model, image,text,text_part,text_thresh,text_size,hole_scale,island_scale,semantic, *args, **kwargs)
62 return a,b
63
64
65

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected