olgaliak / active-learning-detect

Active learning + object detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Null labels in predictions

abfleishman opened this issue · comments

Yash and I worked through a bug where I was getting errors when there were photos that were reviewed but did not have a label. These images received a bounding box of 0,0,0,0 and a NULL label. In the totag.csv files, there are a bunch of rows that have NULL class. and the confidence is 0.

image

This makes me think that when we use download_vott_json we will get these files if we use pick_max = False which is not all that useful when generating new tags for training.

Hey Abram,

This was in some ways an intentional decision. Since NULL is only exported to the CSV file to indicate that no predictions were found in that image, and since we were operating under an assumption that each image would have at least one correct prediction, we decided to give images with no predictions a confidence of 0 to have them displayed first as they were clearly incorrect. If this is not the case with your data, the easiest way to remedy this is by changing the confidence given to the NULL prediction. In line 34 of train/create_predictions.py, change:

predictions = [[0,"NULL",0,0,0,0]]

to:

predictions = [[1,"NULL",0,0,0,0]]

Which will set the NULL confidence to 1 and hence have those images appear less frequently. You can also set this to .6 or .8 or any other float between 0 and 1 depending on how frequently you would like to see images with no predictions.

Best,

Yash

Gotcha! Yes, this dataset has a ton of "empty frames" with nothing of interest in them. Thanks!