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

Function inference

demo_auto_generation.py:53–65  ·  view source on GitHub ↗
(image,level=[0],*args, **kwargs)

Source from the content-addressed store, hash-verified

51
52@torch.no_grad()
53def inference(image,level=[0],*args, **kwargs):
54 if level == 'All Prompt':
55 level = [1, 2, 3, 4, 5, 6]
56 else:
57 level = [level.split(' ')[-1]]
58 print(level)
59 text_size, hole_scale, island_scale=640,100,100
60 text, text_part, text_thresh='','','0.0'
61 with torch.autocast(device_type='cuda', dtype=torch.float16):
62 semantic=False
63 model=model_sam
64 a= interactive_infer_image_idino_m2m_auto(model, image,level,text,text_part,text_thresh,text_size,hole_scale,island_scale,semantic, *args, **kwargs)
65 return a
66
67
68

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected