(image,level=[0],*args, **kwargs)
| 51 | |
| 52 | @torch.no_grad() |
| 53 | def 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 |
nothing calls this directly
no outgoing calls
no test coverage detected