Example without bounding boxes

Hi, I am trying to train and validate a Gluoncv Faster R-CNN on my own dataset. But, in some experiments, I have images that do not have any bounding box, both on training and validation sets. How should my dataset class return the label in this case?

I have tried returning an empty numpy array, or np.array([[-1, -1, -1, -1, -1]]), or np.array([[0, 0, 0, 0, -1]])
But I get errors on the dataloader.

What error specifically?

Thank you for your reply. Actually, I found that that the error was caused by another issue.
Now my training code works by returning an arbitrary bbox and a label -1:

return nd.array(img), np.array([[100, 100, 200, 200, -1]])

By inspecting the source code, I realized that I have to return from my dataset class at least one bbox per example. But I am not sure if return a -1 as class label is the right approach.

Apologies for delayed response.
I’m not sure if passing -1 as class label with dummy data is the right approach. At the same time it seems that this calls for a better documentation somewhere. [maybe maskrcnn/fasterrcnn] tutorials.
Let me ask around the team & get back.

It’s okay to supply invalid bbox with label -1, indicate that it’s not belonging to any foreground objects