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

getting "list index out of range" error #3

Open
tanmay-18 opened this issue Jul 12, 2023 · 0 comments
Open

getting "list index out of range" error #3

tanmay-18 opened this issue Jul 12, 2023 · 0 comments

Comments

@tanmay-18
Copy link

tanmay-18 commented Jul 12, 2023

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
[<ipython-input-5-13aae2c79e61>](https://localhost:8080/#) in <cell line: 9>()
      7 
      8 # Run inference and draw detection result on the local copy of the original file
----> 9 detection_result_image = run_odt_and_draw_results(
     10     INPUT_IMAGE_URL,
     11     interpreter,

2 frames
[<ipython-input-1-e5b13d81f88d>](https://localhost:8080/#) in get_output_tensor(interpreter, index)
     36 def get_output_tensor(interpreter, index):
     37   """Retur the output tensor at the given index."""
---> 38   output_details = interpreter.get_output_details()[index]
     39   tensor = np.squeeze(interpreter.get_tensor(output_details['index']))
     40   return tensor

IndexError: list index out of range

when i tried to print index and interpreter.get_output_details() the output was-

0
[{'name': 'Identity', 'index': 408, 'shape': array([   1,    9, 8400], dtype=int32), 'shape_signature': array([   1,    9, 8400], dtype=int32), 'dtype': <class 'numpy.float32'>, 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
1
[{'name': 'Identity', 'index': 408, 'shape': array([   1,    9, 8400], dtype=int32), 'shape_signature': array([   1,    9, 8400], dtype=int32), 'dtype': <class 'numpy.float32'>, 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
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