"git@developer.sourcefind.cn:orangecat/ollama.git" did not exist on "13524b5e72c85f926ef43da7cb979ee61f7cb79a"
Commit 007a619a authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

PY3 migration

PiperOrigin-RevId: 324258617
parent c9da7a38
...@@ -237,7 +237,7 @@ def convert_groundtruths_to_coco_dataset(groundtruths, label_map=None): ...@@ -237,7 +237,7 @@ def convert_groundtruths_to_coco_dataset(groundtruths, label_map=None):
(boxes[j, k, 3] - boxes[j, k, 1]) * (boxes[j, k, 3] - boxes[j, k, 1]) *
(boxes[j, k, 2] - boxes[j, k, 0])) (boxes[j, k, 2] - boxes[j, k, 0]))
if 'masks' in groundtruths: if 'masks' in groundtruths:
mask = Image.open(six.StringIO(groundtruths['masks'][i][j, k])) mask = Image.open(six.BytesIO(groundtruths['masks'][i][j, k]))
width, height = mask.size width, height = mask.size
np_mask = ( np_mask = (
np.array(mask.getdata()).reshape(height, width).astype(np.uint8)) np.array(mask.getdata()).reshape(height, width).astype(np.uint8))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment