Hello @Areeba ,
I believe the issue is with the NN result decoding. As the error states, size of the bounding boxes array is 0, and you can't access the first element. Different NN models can have a different output so you have to change the decoding part of the code.
Here are some examples of decoding the NN result, just to give you an idea:
Thanks, Erik