-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panoptic Segmentation Annotator Request #1308
Comments
Hi @bhyun-kim 👋 Sure, you can go ahead! Which model were you thinking of? I know If I understand correctly, we'll need 2 types of |
Hi @LinasKo,
How about starting with 'from_mmdetection'? The panoptic segmentation prediction results in MMDetection include
Panoptic segmentation models return both semantic and instance segmentation results. Therefore, we need to store a numpy array that contains class information for each pixel in an image. My concern is that @classmethod
def from_mmdetection(cls, mmdet_results) -> Detections:
if hasattr(mmdet_results, 'pred_panoptic_seg'):
return cls(
xyxy=mmdet_results.pred_instances.bboxes.cpu().numpy(),
confidence=mmdet_results.pred_instances.scores.cpu().numpy(),
class_id=mmdet_results.pred_instances.labels.cpu().numpy().astype(int),
mask=mmdet_results.pred_instances.masks.cpu().numpy()
if "masks" in mmdet_results.pred_instances
else None,
data={'segmentation_map': mmdet_results.pred_panoptic_seg.sem_seg.cpu().numpy()}
)
else:
return cls(
xyxy=mmdet_results.pred_instances.bboxes.cpu().numpy(),
confidence=mmdet_results.pred_instances.scores.cpu().numpy(),
class_id=mmdet_results.pred_instances.labels.cpu().numpy().astype(int),
mask=mmdet_results.pred_instances.masks.cpu().numpy()
if "masks" in mmdet_results.pred_instances
else None,
) |
Assigning transformers panoptic implementation to @onuralpszr. |
@bhyun-kim, good point about the pixels. Would you have some time to create a Colab for us, to see what kind of values panoptic |
@LinasKo I am sharing the Colab notebook I created. The issue is that the lengths of the semantic segmentation results and other outputs like |
Search before asking
Description
It seems that supervision doesn't currently support Panoptic segmentation annotator. Is this feature included in your roadmap? If so, I would like to contribute.
Use case
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: