Ask Your Question
0

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

Comments

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
0

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

supra56 gravatar image

Change this:

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

Comments

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
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 125 times

Last updated: Mar 05