Maskrcnn-benchmark: Only bounding box annotation

Created on 11 Mar 2019  ยท  6Comments  ยท  Source: facebookresearch/maskrcnn-benchmark

โ“ Questions and Help

Hi

Thanks a lot for sharing your work.
for my dataset, i have bounding box annotations but i don't have the masks, is there any chance i could still train the network by box co-ordinates.

Thanks

question

All 6 comments

Yes you can. You just need to pick an architecture that only trains on bounding boxes, like all e2e_faster_rcnn. Though, be sure you have labelled you data in coco-style. Maybe this thread can give you a hint on that matter.

Hi

because my data is mostly rectangular , i wrote a function to get masks from my bounding boxes.

so hopefully i should be able to train mask-rcnn!
Thanks for your help.

Hi @fmassa @LeviViana

Few questions about the annotations format,

i am going to use the detection format, so the required fields are

  1. area 2. bbox 3.category_id 4.image_id 5.iscrowd 6.segmentation

Im guessing this is all i need to train my dataset, kindly correct me if i'm wrong.

--The bbox field it takes in four points- im guessing this is x1,y1,x2,y2- atleast my points are in this format.

--in the segmentation field it takes in rle or polygon - Can i pass in it a list of list of eight points, it will look like this -[[[0,45],[336,45],[336,270],[0,270]]] , will this work?

-- Area, i'm guessing this is the area of the mask, am i just supposed to sum all the positive pixels(white pixels)?, will that work?

Clarifications on this will be helpful,

Thanks in advance.

@DecentMakeover the data is expected to be in COCO format.
Thus the boxes should be in x0, y0, w, h, but this can be easily modified https://github.com/facebookresearch/maskrcnn-benchmark/blob/90080e60cc4a9252d019f475af044c9d4119b09b/maskrcnn_benchmark/data/datasets/coco.py#L75

If you don't have segmentation data, just remove https://github.com/facebookresearch/maskrcnn-benchmark/blob/90080e60cc4a9252d019f475af044c9d4119b09b/maskrcnn_benchmark/data/datasets/coco.py#L82-L84 and you'll be good to go

For the area, it's the area of the polygon. If you don't have polygons, just use the are of the bounding box.

Hi, you can easily generate the coco data using only the bounding box or segmentation polygon, I did it manually based on this repo

@fmassa Thanks a lot for the response.

@AdanMora , okay Thanks, ill look into it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BelhalK picture BelhalK  ยท  4Comments

hadim picture hadim  ยท  4Comments

jbitton picture jbitton  ยท  4Comments

Nacho114 picture Nacho114  ยท  4Comments

auroua picture auroua  ยท  3Comments