Ask Your Question

Error occurred when I used tensor flow lite custom model

asked 2020-03-05 06:28:08 -0500

sng gravatar image

I faced an issue while running an object detection program using tensor flow lite costum model.I am attaching the error code bellow.

classes = interpreter.get_tensor(output_details[1]['index'])[0] # Class index of detected objects IndexError: list index out of range

edit retag flag offensive close merge delete


off topic. get_tensor is not an opencv function?

LBerger gravatar imageLBerger ( 2020-03-05 06:43:19 -0500 )edit

and unfortunately, so far there is no support for tf lite models in opencv's dnn module

berak gravatar imageberak ( 2020-03-05 07:00:06 -0500 )edit

@LBerger, @berak. OF course.

supra56 gravatar imagesupra56 ( 2020-03-05 07:29:49 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2020-03-05 07:24:42 -0500

supra56 gravatar image

Change this:

classes = interpreter.get_tensor(output_details[1]['index'])[0]
classes = interpreter.get_tensor(output_details[1]['index'])
edit flag offensive delete link more


Are you looping after?

supra56 gravatar imagesupra56 ( 2020-03-05 07:26:55 -0500 )edit

we are getting the same error. This is working with the existing model but not with the customised model. Kindly reply.

sng gravatar imagesng ( 2020-03-06 22:29:07 -0500 )edit

Question Tools

1 follower


Asked: 2020-03-05 06:28:08 -0500

Seen: 614 times

Last updated: Mar 05 '20