Skip to content

Commit

Permalink
Fixed missing annotations, closes #127
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Mar 1, 2019
1 parent b0c9359 commit 5f12784
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/util/coco_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def get_dataset_coco(dataset):
has_keypoints = len(annotation.get('keypoints', [])) > 0
has_segmentation = len(annotation.get('segmentation', [])) > 0

if has_keypoints or has_keypoints:
if has_keypoints or has_segmentation:
del annotation['deleted']

if not has_keypoints:
Expand All @@ -217,6 +217,7 @@ def get_dataset_coco(dataset):
arr = np.array(annotation.get('keypoints', []))
arr = arr[2::3]
annotation['num_keypoints'] = len(arr[arr > 0])

coco.get('annotations').append(annotation)

image = fix_ids(image)
Expand Down

0 comments on commit 5f12784

Please sign in to comment.