Hello Michael, It is possible to do that.
For your example 1:
In your dataset getitem method, you could set for images with background only:
box_count = 0
bboxes = np.array([]).reshape(-1, 4)

And convert them like any other image:
bboxes = torch.as_tensor(bboxes, dtype=torch.float32)
labels = torch.ones((box_count,), dtype=torch.int64)