offlinemot.utils_.transform_detection
- offlinemot.utils_.transform_detection(p0, detections, detect_thresh)[source]
Convert the result of the detection from a cropped part of image to the original image coordinates.
- Parameters
p0 (tuple) – The top-left point used for cropping the image (x,y)
detections (list) – A list of lists for the detections in the cropped frame as it is the output from the detection network. The list has the following shape [top-left point, bottom-right point,probabilty, class id]
detect_thresh (float) – The minimum probability to consider a detection result from Yolo model ok.
- Returns
The same detection list as the input but with moving the coordinates to the original frame of coordinates before cropping.
- Return type
list