I have trained YOLO on license plate character recognition dataset, then I have implemented using OpenCV. Now, when I try to recognize the characters, detection is good, but the Labels are shuffled. I don't know how to sort the bounding box or labels from left to right and from top to bottom. In this picture, character detection accuracy is good, but when I print the Labels, their order is changed. Like: 6LJE195. How Can I sort the bounding boxes or labels. 2 row License plate 1 row license plate