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

In the function setDetParams(), np.linspace() may not create exact values #20

Open
minan19605 opened this issue Oct 25, 2020 · 0 comments

Comments

@minan19605
Copy link

Ubuntu 18.04, AMD Ryzen 3700x

MMCV: 1.0.5
MMDetection: 2.3.0+68d860d
MMDetection Compiler: GCC 7.5
MMDetection CUDA Compiler: 10.1

In the function setDetParams(), the code:
self. iouThrs = np.linspace(.5,
0.95,
int(np.round((0.95 - .5) / .05)) + 1,
endpoint=True)
self.recThrs = np.linspace(.0,
1.00,
int(np.round((1.00 - .0) / .01)) + 1,
endpoint=True)

I found the self. iouThrs values are like:
[0.5 , 0.55, 0.6 , 0.65, 0.7 , 0.75, 0.8 , 0.85, 0.8999999 , 0.95]

The self.recThrs has the same issues.

So I changed those codes as below and tested ok. Please check if the modification is ok.

    iouThrs = np.linspace(.5,
                               0.95,
                               int(np.round((0.95 - .5) / .05)) + 1,
                               endpoint=True)
    self.iouThrs = **_np.round(iouThrs, decimals=2)_**
    recThrs = np.linspace(.0,
                               1.00,
                               int(np.round((1.00 - .0) / .01)) + 1,
                               endpoint=True)
    self.recThrs = **_np.round(recThrs, decimals=2)_**
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