-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I have a more specific using example (code snippet) in README.md? #119
Comments
hi, we provided the demo file here for you to refer. You can also refer to the colab notebook here. |
Got it, thank you for your help, I would go through it, |
I noticed there is one line: device = "cuda"
sam.to(device=device) I am not sure what device I should pass, if I run this as Docker Image in Kubeflow pipeline ? (Kubeflow will pre-allocated one GPU for it.) |
and in the line input_box = np.array([[4,13,1007,1023]])
input_point, input_label = None, None the bbox is in [w,h,x,y] format or [x1,y1,x2,y2] format? |
And I have another question: image = cv2.imread('demo/input_imgs/example0.png')
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
input_box = np.array([[4,13,1007,1023]])
input_point, input_label = None, None
predictor.set_image(image)
masks, scores, logits = predictor.predict(
point_coords=input_point,
point_labels=input_label,
box = input_box,
multimask_output=False,
hq_token_only= False,
) If I input a bbox which just cover the whole image, and let multimask_output=True |
I want to get start with the step: https://github.com/SysCV/sam-hq?tab=readme-ov-file#getting-started
But the ambiguous parameters like "<model_type>" "<path/to/checkpoint>" , ... are not specific enough for me to understand how to use this tool,
For example, the parameter <your_image> should stand for absolute path? the image object? or multi-binary array?
I would appreciate it if you could provide a specific use example for HQ-SAM inference if possible thanks!
The text was updated successfully, but these errors were encountered: