Image dimensions
When running a training step I get an error at this point:
self.x_position_embeddings(bbox[:, :, 0])
RuntimeError: index out of range: Tried to access index 1091 out of table with 1023 rows
self.x_position_embeddings => Embedding(1024, 768) (config.max_2d_position_embeddings = 1024)
This happens because the bbox batch has values bigger then 1023.
bbox[:, :, 0].
tensor([[ 0, 380, 605, ..., 0, 0, 0],
[ 0, 69, 69, ..., 1382, 1382, 1000],
[ 0, 171, 387, ..., 0, 0, 0],
...,
[ 0, 495, 495, ..., 0, 0, 0],
[ 0, 506, 506, ..., 0, 0, 0],
[ 0, 245, 245, ..., 206, 206, 1000]])
Is this related to the image size? Should I resize images/annotation boxes to a specific dimension?
Thank you!
`
So one of the element of bounding box is greater than 1024.
Indeed .. I had many issues with the boxes. Some box coordinates were outside the image. After some cleaning everything went well and the model performs very nice!