MCPcopy Create free account
hub / github.com/davisking/dlib / postprocess_detections

Function postprocess_detections

examples/dnn_yolo_train_ex.cpp:141–145  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
141void 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
147int main(const int argc, const char** argv)
148try

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected