Key error 'iscrowd' while finetuning

I’m trying to fine tune an existing model, I’ve created a custom Dataset class and included iscrowd key in my get_item() (based on what is done here),
but I keep getting:

site-packages/pycocotools/", line 188, in
iscrowd = [int(o[‘iscrowd’]) for o in gt]
KeyError: ‘iscrowd’

it seems to run fine without GPU.
Can anyone help?

Could you post a minimal code snippet using random input shapes, which would reproduce this issue, please? The error points to a missing key, but since the code seems to apparently work on the CPU, we would like to debug it on the GPU.