1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

libavfilter/vf_dnn_detect: Add yolo support

Add yolo support. Yolo model doesn't output final result. It outputs
candidate boxes, so we need post-process to remove overlap boxes to
get final results. Also, the box's coordinators relate to cell and
anchors, so we need these information to calculate boxes as well.

Model detail please refer to: https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolo-v2-tf

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
This commit is contained in:
Wenbin Chen
2023-11-21 10:20:18 +08:00
committed by Guo Yejun
parent caa5d123a7
commit 47b2328076
2 changed files with 244 additions and 4 deletions

View File

@@ -386,9 +386,9 @@ static void infer_completion_callback(void *args)
ov_shape_free(&output_shape);
return;
}
output.channels = dims[1];
output.height = dims[2];
output.width = dims[3];
output.channels = output_shape.rank > 2 ? dims[output_shape.rank - 3] : 1;
output.height = output_shape.rank > 1 ? dims[output_shape.rank - 2] : 1;
output.width = output_shape.rank > 0 ? dims[output_shape.rank - 1] : 1;
av_assert0(request->lltask_count <= dims[0]);
ov_shape_free(&output_shape);
#else