mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Shorten SegmentAnythingInvocation and GroundingDinoInvocatino docstrings, since they are used as the invocation descriptions in the UI.
This commit is contained in:
parent
e6a512aa86
commit
c6d49e8b1f
@ -23,13 +23,12 @@ GROUNDING_DINO_MODEL_ID = "IDEA-Research/grounding-dino-tiny"
|
|||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
)
|
)
|
||||||
class GroundingDinoInvocation(BaseInvocation):
|
class GroundingDinoInvocation(BaseInvocation):
|
||||||
"""Runs a Grounding DINO model (https://arxiv.org/pdf/2303.05499). Performs zero-shot bounding-box object detection
|
"""Runs a Grounding DINO model. Performs zero-shot bounding-box object detection from a text prompt."""
|
||||||
from a text prompt.
|
|
||||||
|
|
||||||
Reference:
|
# Reference:
|
||||||
- https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
|
# - https://arxiv.org/pdf/2303.05499
|
||||||
- https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
|
# - https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
|
||||||
"""
|
# - https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
|
||||||
|
|
||||||
prompt: str = InputField(description="The prompt describing the object to segment.")
|
prompt: str = InputField(description="The prompt describing the object to segment.")
|
||||||
image: ImageField = InputField(description="The image to segment.")
|
image: ImageField = InputField(description="The image to segment.")
|
||||||
|
@ -26,12 +26,12 @@ SEGMENT_ANYTHING_MODEL_ID = "facebook/sam-vit-base"
|
|||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
)
|
)
|
||||||
class SegmentAnythingInvocation(BaseInvocation):
|
class SegmentAnythingInvocation(BaseInvocation):
|
||||||
"""Runs a Segment Anything Model (https://arxiv.org/pdf/2304.02643).
|
"""Runs a Segment Anything Model."""
|
||||||
|
|
||||||
Reference:
|
# Reference:
|
||||||
- https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
|
# - https://arxiv.org/pdf/2304.02643
|
||||||
- https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
|
# - https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
|
||||||
"""
|
# - https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
|
||||||
|
|
||||||
image: ImageField = InputField(description="The image to segment.")
|
image: ImageField = InputField(description="The image to segment.")
|
||||||
bounding_boxes: list[BoundingBoxField] = InputField(description="The bounding boxes to prompt the SAM model with.")
|
bounding_boxes: list[BoundingBoxField] = InputField(description="The bounding boxes to prompt the SAM model with.")
|
||||||
|
Loading…
Reference in New Issue
Block a user