AttributeError: 'CLIPSegImageSegmentationOutput' object has no attribute 'logits_per_image'

#1
by Bailey24 - opened

You did great, beautiful work.
But I want to know the image-text similarity score, you said

outputs = model(**inputs)
logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1)  # we can take the softmax to get the label probabilities

but I try it, I got the error

logits_per_image = outputs.logits_per_image

AttributeError: 'CLIPSegImageSegmentationOutput' object has no attribute 'logits_per_image'

Please help me.

Thank you. It work.

nielsr changed discussion status to closed

Sign up or log in to comment