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

I have a trouble about np.log #28

Open
mshmoon opened this issue Apr 19, 2019 · 1 comment
Open

I have a trouble about np.log #28

mshmoon opened this issue Apr 19, 2019 · 1 comment

Comments

@mshmoon
Copy link

mshmoon commented Apr 19, 2019

Thank you for you to contribute your code.
I have a question ask for you help.
When use your code_1.0 to train vot2016 dataset. I meet an error.
I print the values of relate code
-0.99 [ 35.960415 44.26483 63.01 ... 63.01 89.51967 109.86125 ] [[-0.14122681 -0.14122681 -0.00901137 -0.02753027]
[-0.14122681 -0.14122681 -0.01105902 -0.02236539]
[-0.14122681 -0.14122681 -0.01571179 -0.01571179]]
/home/xiaoma/Siamese-RPN-pytorch/code_v1.0/data_loader.py:60: RuntimeWarning: invalid value encountered in log
diff[:,3] = np.log((gt[3] + eps)/(anchors[:,3] + eps))

I think the reason is np.log meet negative values. So how to solve the trouble about negative values

@mshmoon
Copy link
Author

mshmoon commented Apr 19, 2019

For solve this error. I have add this code
x1, y1, x2, y2 = cords_in_cropped_resized_detection
cx, cy, w, h = (x1+x2)//2, (y1+y2)//2, x2-x1, y2-y1
cx,cy,w,h = max(0,cx),max(0,cy),max(0,w),max(0,h)#### This code is mine

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