autowebcompat
autowebcompat copied to clipboard
Create final bounding_box.json file from bounding boxes of different users
To create final bounding_box.json
file, I am thinking of having IOU as the basic criteria with some defined threshold with at least 50% bounding_box.json
from the label_persons
directory agreeing with it.
We can discuss different ideas in this thread.
@sagarvijaygupta i have a couple of doubts in this regard , do you mean for each person A you'll keep adding the bounding box they created for a particular set of images to the bounding box jsons and then apply IOU with a threshold to get one definite value?
@Shashi456 I am thinking of using all the bounding boxes for a given screenshot by all users who have annotated them and calculate the maximum area of intersection with maximum people agreeing with it (there will be trade off between area of intersection and more people agreeing with it
- what trade off will be best I am not sure). Now for this area we know the bounding box we are talking about for every user, so I start taking union of these bounding boxes with the found area of intersection one by one (sorted on the basis of area) such that their IOU with the found intersection is above the threshold.
I was going through https://arxiv.org/pdf/1506.01497.pdf faster RCNN
and came across NMS (Non-Maximum Suppression). I think it will be more preferable.
@marco-c any thoughts about it?
It sounds interesting, but maybe it's too much work?
@marco-c I searched about NMS and found it is much similar to what I proposed above. If by
too much work
you mean about the length of code, it won't be much and is quiet easy to understand. https://www.pyimagesearch.com/2015/02/16/faster-non-maximum-suppression-python/ has an implementation of it which is simple and fast enough. We can think about other possible options also. As after this only we will be able to provide information from these bounding boxes for training.
Sounds good then!
@marco-c This is the output I am getting with overlapping threshold value of 0.5. Is it fine? Or should I make some changes.
Also I wanted to ask one thing. What should I do with the read_labels
in utils.py
? I mean we have some already labeled data. If we remove labels.csv
we will lose the information. Should I just create the final_bounding_box.json
and keep read_labels
as it is (and everything else the same and continue writing labels separately) till we have sufficient marked data with bounding_box.json
after which read_labels
can be updated and labels.csv
removed?
This is the output I am getting with overlapping threshold value of 0.5. Is it fine? Or should I make some changes.
It looks OK to me.
Also I wanted to ask one thing. What should I do with the read_labels in utils.py? I mean we have some already labeled data. If we remove labels.csv we will lose the information. Should I just create the final_bounding_box.json and keep read_labels as it is (and everything else the same and continue writing labels separately) till we have sufficient marked data with bounding_box.json after which read_labels can be updated and labels.csv removed?
Let's convert the current file, making the boundary box the entire image when an image was labeled with n
or d
.
(The label_persons/amitrockon.csv should be converted, labels.csv should be generated automatically)