Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

fix eval_instance_segmentation_coco when pred_masks is empty #780

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

yuyu2172
Copy link
Member

@yuyu2172 yuyu2172 commented Feb 12, 2019

Why

When pred_mask.shape == (0, H, W), the function fails.

Note

The test data did not follow the current data format, so I fixed it with the following conversion script.

import numpy as np

data = np.load('eval_instance_segmentation_coco_result_2018_07_06.npz', encoding='latin1')

labels = data['labels']
masks = data['masks']
scores = data['scores']
masks = [np.array(mask) for mask in masks]

np.savez(
    'eval_instance_segmentation_coco_result_2019_02_12.npz',
    labels=labels,
    scores=scores,
    masks=masks)

@yuyu2172 yuyu2172 added the bug label Feb 12, 2019
@yuyu2172 yuyu2172 added this to the 0.13 milestone Feb 12, 2019
@yuyu2172
Copy link
Member Author

In the original data, masks are stored as [[(H, W)]].
This contradicts with the format of masks, which is [(R, H, W)].

@yuyu2172 yuyu2172 merged commit a47cf54 into chainer:master Feb 12, 2019
@yuyu2172 yuyu2172 deleted the fix-eval-instance-segm branch February 12, 2019 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants