Closed alicera closed 2 years ago
https://github.com/Daniil-Osokin/lightweight-human-pose-estimation.pytorch/blob/1590929b601535def07ead5522f05e5096c1b6ac/scripts/prepare_train_labels.py#L44
I generate the coco dataset and some images have the " 'segmentations': [ ] " So I write a code to deal with it. How about the code?
if annotations[1] == []: annotations[1] =[{'counts': [annotation['bbox'][0], annotation['bbox'][1], annotation['bbox'][0] + annotation['bbox'][1], annotation['bbox'][1], annotation['bbox'][0] + annotation['bbox'][2], annotation['bbox'][1]+ annotation['bbox'][3], annotation['bbox'][0], annotation['bbox'][1]+ annotation['bbox'][3]], 'size': [annotation['bbox'][3], annotation['bbox'][2]]}]
Please, check #231.
https://github.com/Daniil-Osokin/lightweight-human-pose-estimation.pytorch/blob/1590929b601535def07ead5522f05e5096c1b6ac/scripts/prepare_train_labels.py#L44
I generate the coco dataset and some images have the " 'segmentations': [ ] " So I write a code to deal with it. How about the code?