def __getitem__(self, item):
    (img, msk, cat, iscrowd, idx) = self._load_item(item)
    rec = self.transform(img, msk, cat, iscrowd)
    size = (img.size[1], img.size[0])
    img.close()
    for m in msk:
        m.close()
    rec['idx'] = idx
    rec['size'] = size
    return rec
def __getitem__(self, item):
    (img, msk, cat, iscrowd, idx) = self._load_item(item)
    rec = self.transform(img, msk, cat, iscrowd)
    size = (img.size[1], img.size[0])
    img.close()
    for m in msk:
        m.close()
    rec['idx'] = idx
    rec['size'] = size
    return rec