Skip to content

Commit

Permalink
Merge pull request #5 from supervisely-ecosystem/float
Browse files Browse the repository at this point in the history
segmentation + bbox to float
  • Loading branch information
qanelph authored Aug 25, 2021
2 parents e6e1617 + 2f525f1 commit d9faba8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def get_project_contributors():


def coco_segmentation(segmentation): # works only with external vertices for now
segmentation = [coord for sublist in segmentation for coord in sublist]
segmentation = [float(coord) for sublist in segmentation for coord in sublist]
return segmentation


def coco_bbox(bbox):
bbox = [coord for sublist in bbox for coord in sublist]
bbox = [float(coord) for sublist in bbox for coord in sublist]
x, y, max_x, max_y = bbox
width = max_x - x
height = max_y - y
Expand Down

0 comments on commit d9faba8

Please sign in to comment.