Solved by Etienne_Perot in post #8 
              
              
                hello there, 
using the awesome idea from torchvision “batched_nms”, this following code can decode for several images / several classes at once, it works because batched_nms offsets boxes according to their category, so you never perform a wrong suppression. 
I also tried to accelerate box encoding…