I am following this tutorial from Phil Schmid on how to deploy an image-segmentation model from the huggingface hub to a sagemaker endpoint.
The only difference I make to the code is that I deploy the model serverlessly.
The deployment works great, and the the masking works. However, I am not being returned the scores of each class. The values are all None for the scores.
e.g. {“score”: null, “label”: “wall”, “mask”: }
This applies to every model I try from the Hub, not just one. Would love clarity on this, and any potential fixes.
It depends on which model you’re using. In case of semantic segmentation (like SegFormer), there’s no notion of scores per segment. This is because the model predicts a label per pixel. Hence the model only outputs scores per pixel, not per segment.
However, models like DETR and MaskFormer do output scores per segment.