Fix bbox mapping for internal yolo resize
This commit is contained in:
parent
cdc3c46932
commit
fc9cf5546f
@ -73,7 +73,10 @@ DetCoordContext BuildDetCoordContext(const Frame& frame, int model_input_w, int
|
||||
ctx.out_w = frame.width;
|
||||
ctx.out_h = frame.height;
|
||||
|
||||
if (frame.transform_meta && frame.transform_meta->valid &&
|
||||
const bool infer_input_matches_frame = (frame.width == model_input_w && frame.height == model_input_h);
|
||||
|
||||
if (infer_input_matches_frame &&
|
||||
frame.transform_meta && frame.transform_meta->valid &&
|
||||
frame.transform_meta->src_w > 0 && frame.transform_meta->src_h > 0 &&
|
||||
frame.transform_meta->scale_x > 1e-6f && frame.transform_meta->scale_y > 1e-6f) {
|
||||
ctx.has_transform = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user