Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do an operation that is repeated and may bring errors? #940

Open
chencodeX opened this issue Oct 9, 2020 · 0 comments
Open

Why do an operation that is repeated and may bring errors? #940

chencodeX opened this issue Oct 9, 2020 · 0 comments

Comments

@chencodeX
Copy link

https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/rpn/anchor_target_layer.py
Line 137 138 140

gt_argmax_overlaps = overlaps.argmax(axis=0)
gt_max_overlaps = overlaps[gt_argmax_overlaps,np.arange(overlaps.shape[1])]
gt_argmax_overlaps = np.where(overlaps == gt_max_overlaps)[0]

line 137 and line 138 equivalent to gt_max_overlaps = overlaps.max(axis=0)

And when the 140th line retrieves the index by value, the row-column relationship is not considered. If the largest overlap of a groudturth and all anchors is only 0.5, this line of code may mistakenly get the indexes of some other groudturth low-scoring anchors when indexing

Why not just use gt_argmax_overlaps = overlaps.argmax(axis=0) ?

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

No branches or pull requests

1 participant