Skip to content

Commit 2a33880

Browse files
authored
changed model in Segmentation pipeline
1 parent 6320cf1 commit 2a33880

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: clipcrop/clipcrop.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def __init__(self, input_path, input_text):
141141

142142
def load_models(self):
143143

144-
segmentor = pipeline("image-segmentation")
144+
segmentor = pipeline("image-segmentation", model="facebook/maskformer-swin-tiny-coco")
145145
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
146146
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
147147

@@ -191,4 +191,4 @@ def segment_image(self, segmentor, model, processor, num=None):
191191
seg_dict["score"] = scores[x]
192192
seg_list.append(seg_dict)
193193

194-
return seg_list
194+
return seg_list

0 commit comments

Comments
 (0)