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

The performance gap in SBD. #8

Open
mt-cly opened this issue Sep 5, 2021 · 0 comments
Open

The performance gap in SBD. #8

mt-cly opened this issue Sep 5, 2021 · 0 comments

Comments

@mt-cly
Copy link

mt-cly commented Sep 5, 2021

Hi, thanks for your work.
I do some work base on your Intseg recently, but I get [email protected]=8.8 in reproduction. The thing is, as you did not provide the test code for generating next click, I implement that following the description of your paper as follows:

def get_next_anno_point_prob(pred, gt, seq_points):
    fndist_map = distance_transform_edt(np.pad((gt == 1) & (pred == 0), ((1, 1), (1, 1)), 'constant'))[1:-1, 1:-1]
    fpdist_map = distance_transform_edt(np.pad((gt == 0) & (pred == 1), ((1, 1), (1, 1)), 'constant'))[1:-1, 1:-1]
    fndist_map[seq_points[:, 1], seq_points[:, 0]], fpdist_map[seq_points[:, 1], seq_points[:, 0]] = 0, 0
    neg_prob_map, pos_prob_map = fndist_map.reshape(-1), fpdist_map.reshape(-1)
    prob_map = np.max((neg_prob_map, pos_prob_map), axis=0)
    prob_map = prob_map/prob_map.sum()
    pnt_index = np.random.choice(len(prob_map), replace=False, p=prob_map)
    if_pos = 1 if neg_prob_map[pnt_index]>0 else 0 if pos_prob_map[pnt_index]>0 else -1
    assert if_pos != -1
    h, w = fndist_map.shape
    pt_next = (pnt_index%w, int(pnt_index/w), if_pos)
    return pt_next

I do not know what results in this gap. Have you any suggestions or can you kindly provide the code of evaluation? Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant