YOLO outputs the bounding boxes in the coordinate system of the input (letterboxed) image, so we need to convert them back to the original image.
| 139 | // YOLO outputs the bounding boxes in the coordinate system of the input (letterboxed) image, so we need to convert them |
| 140 | // back to the original image. |
| 141 | void postprocess_detections(const rectangle_transform& tform, std::vector<yolo_rect>& detections) |
| 142 | { |
| 143 | for (auto& d : detections) |
| 144 | d.rect = tform(d.rect); |
| 145 | } |
| 146 | |
| 147 | int main(const int argc, const char** argv) |
| 148 | try |