Skip to content

Commit

Permalink
Update extract ground truth keypoints function to save only point shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
healthonrails committed Jun 27, 2024
1 parent 3142b80 commit afd97fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions annolid/postprocessing/skeletonization.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,12 @@ def extract_ground_truth_keypoints(json_path):
with open(json_path, 'r') as f:
data = json.load(f)

ground_truth_keypoints = {
shape['label']: shape['points'][0]
for shape in data['shapes']
}
ground_truth_keypoints = {}
for shape in data['shapes']:
if shape['shape_type'] == 'point':
ground_truth_keypoints[shape['label']] = shape['points'][0]

return ground_truth_keypoints

return ground_truth_keypoints

Expand Down

0 comments on commit afd97fb

Please sign in to comment.