Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 3a627c3

Browse files
committed
Add evaluation script test_net.py
1 parent facee36 commit 3a627c3

22 files changed

+2696
-41
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"python.linting.pylintEnabled": true,
33
"python.linting.flake8Enabled": false,
4+
"python.autoComplete.extraPaths": ["${workspaceRoot}/lib"],
45
}

lib/core/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ def segm_results(cls_boxes, masks, ref_boxes, im_h, im_w):
346346

347347
# Get RLE encoding used by the COCO evaluation API
348348
rle = mask_util.encode(np.array(im_mask[:, :, np.newaxis], order='F'))[0]
349+
# For dumping to json, need to decode the byte string.
350+
# https://github.com/cocodataset/cocoapi/issues/70
351+
rle['counts'] = rle['counts'].decode('ascii')
349352
segms.append(rle)
350353

351354
mask_ind += 1

0 commit comments

Comments
 (0)