Closed martintomov closed 5 months ago
@martintmv-git this is a very naive implementation, but if you want to test it out you can pip install git+https://github.com/EduardoPach/grounded-sam.git
and then, if your fine-tuned Sam
model is at hugging face hub, do something like:
from grounded_sam.inference import grounded_segmentation
from grounded_sam.plot import plot_detections_plotly, plot_detections
# This can be a path or an URL or a PIL/numpy image
image = ...
# This should be a list of strings representing the labels
labels = ...
image_array, detections = grounded_segmentation(image, labels, segmenter_id="<PATH_TO_YOUR_MODEL_IN_HF>")
You can also refer to this notebook which is the same implementation I have in this repo, but not packaged
Hi,
I'm interested if this implementation of
grounded-sam
could be used in a notebook environment.I have a fine-tuned SAM model and I would like to make it work with Grounding DINO for advanced object detection for a particular use-case.