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

query related to cornerNet inference #33

Closed
Sujith93 opened this issue May 7, 2020 · 2 comments
Closed

query related to cornerNet inference #33

Sujith93 opened this issue May 7, 2020 · 2 comments

Comments

@Sujith93
Copy link

Sujith93 commented May 7, 2020

I trained cornerNet on custom data

After runing the below line of code
boxes = gtf.Predict("/data/train/Image_046.jpg", vis_thresh=0.5, output_img="output.jpg")
from IPython.display import Image
Image(filename='output.jpg')

I tried printing boxes as I'm looking for predicted bounding boxes and its related scores, but from the output, it looks something like this and unable to interpret this.

boxes : {'Apple': array([[1.50363940e+03, 9.93703247e+02, 2.09030884e+03, 1.20912891e+03,
6.05484009e-01],
[1.49551221e+03, 9.82063232e+02, 3.78910303e+03, 1.13179028e+03,
3.35086226e-01],
......
[3.8891382e+02, 4.1944517e+03, 2.7675557e+03, 4.3056367e+03,
1.5905794e-03],
[4.4121234e+02, 2.8287498e+03, 3.7419502e+03, 3.0195723e+03,
1.2366427e-03]], dtype=float32), 'Banana': array([[4.3748615e+02, 1.3137083e+03, 1.4082772e+03, 1.4733477e+03,
7.0229608e-01],
[3.9888440e+02, 2.6156851e+03, 1.3096824e+03, 2.7784297e+03,
6.4267540e-01],
......
[1.6594436e+03, 7.6432733e+02, 2.0213037e+03, 1.4048514e+03,
1.9753652e-03]], dtype=float32)}

Could you please help me out how to get the bounding boxes and its related scores from this output.

@THEFASHIONGEEK
Copy link
Contributor

    bboxes: A dictionary representing bounding boxes of different object
        categories, where the keys are the names of the categories and the
        values are the bounding boxes. The bounding boxes of category should be
        stored in a 2D NumPy array, where each row is a bounding box (x1, y1,
        x2, y2, score).

For example if we see your output, first key-value pair you have
{'Apple': array([[1.50363940e+03, 9.93703247e+02, 2.09030884e+03, 1.20912891e+03,
6.05484009e-01] ....}
here Apple is the class x1 =1.50363940e+03,y1= 9.93703247e+02,x2 = 2.09030884e+03, y2= 1.20912891e+03, score =6.05484009e-01.

@Sujith93
Copy link
Author

Sujith93 commented May 7, 2020

yes, the values look confused, I got it.
Thanks.

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

2 participants