facebookresearch / detr

End-to-End Object Detection with Transformers
Apache License 2.0
13.09k stars 2.37k forks source link

Polygons instead of rectangular bounding box #280

Open BS-98 opened 3 years ago

BS-98 commented 3 years ago

Hi,

is it possible to put polygons as an input instead of rectangular bounding boxes? I am interested in semantic segmentation and I would like provide the data in form of polygons. polygonbbox

I would be grateful for any help.

andreaalf97 commented 3 years ago

+1

alcinos commented 3 years ago

Hi @BS-98 Thank you for your interest in DETR. It should be rather straight-forward to extend DETR to arbitrary polygons, as long as the number of vertex is constant:

That being said, if your end goal is semantic segmentation, I recommend that you look at the panoptic segmentation approach that we propose. Note that panoptic segmentation is a mix of semantic segmentation and instance segmentation, so technically it is a super-set of what you want to do.

Feel free to ask if anything is unclear.

TG-Unit commented 1 year ago

Hi @BS-98

Have you been successful with this approach? I am working on a similar task and would be interested if you were able to solve this.

BR

yellowjs0304 commented 1 year ago

I wanna make same result like rect to polygon (before : x, y, w, h -> after : x1, y1, x2, y2, x3, y3, x4, y4). Do you have any good sample like this? i already modify "self.bbox_embed" into MLP(hidden_dim, hidden_dim, 4, 3) to MLP(hidden_dim, hidden_dim, 8, 3)

Also, I think i need to change the "loss_boxes" but, I don't know how to modify it... @alcinos @BS-98