boxes
and scores
contain information across all classes. Since we’re performing non-max suppression per label
(see here to understand the motivation), the for loop should use boxes and scores for a single label during each pass. Please read the markdown again and look closely at the loop specific variables for invoking non_max_suppression
correctly.
As far as tf.gather
is concerned, see this as well:
# Append the resulting boxes into the partial result
# Use tf.gather() with 'selected_indices' and `nms_indices_label`
Posting solution code in a public topic goes against our Community Forum Code of Conduct. It’s okay to share stacktrace on a public post and send code to a mentor via direct message.
Please edit your post.
Here’s a guide on how to edit a post.