mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-17 05:45:55 +08:00
update default sam_prompt structure to include point data
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
00ad95d1c0
commit
9e6c46184d
@ -143,7 +143,16 @@ class SamSession(BaseSession):
|
|||||||
Returns:
|
Returns:
|
||||||
List[PILImage]: A list of masks generated by the decoder.
|
List[PILImage]: A list of masks generated by the decoder.
|
||||||
"""
|
"""
|
||||||
prompt = kwargs.get("sam_prompt", "{}")
|
prompt = kwargs.get(
|
||||||
|
"sam_prompt",
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"type": "point",
|
||||||
|
"label": 1,
|
||||||
|
"data": [int(img.width / 2), int(img.height / 2)],
|
||||||
|
}
|
||||||
|
],
|
||||||
|
)
|
||||||
schema = {
|
schema = {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user