Obtaining individual items in 'output' of inference? #3532
Unanswered
cooldecola
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to run detectron2 on video and for each frame I compute
boxes = outputs['instances'].pred_boxes
How do I get each individual item in the list?
When I try
print(boxes[0][0])
or
print(boxes[0])
I get the error saying:
list index out of range
I've also tried
boxes = np.asarray((outputs['instances'].pred_boxes.tensor.cpu().numpy()))
I get this format
[[x x x x]]
and I cannot access the individual items because there is no comma.
Any help would be great. How do I get individual items?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions