Skip to content
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

add Segment anything #40

Merged
merged 2 commits into from
May 19, 2023

Conversation

jinwonkim93
Copy link
Contributor

This PR is to add segment anything.
SamDetector returns segmented map like controlnet-segment-anything.

Usage

from controlnet_aux import SamDetector
from PIL import Image

sam = SamDetector.from_pretrained("./", model_type="vit_b", filename="sam_vit_b_01ec64.pth")
img = Image.open("image.png")
sam(img)

model_type : vit_h, vit_l, vit_b

Limitation

@jinwonkim93 jinwonkim93 changed the title Segment anything add Segment anything May 19, 2023
@patrickvonplaten
Copy link
Contributor

Works for me!

@patrickvonplaten patrickvonplaten merged commit dd7e23f into huggingface:master May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants