Go to the source code of this file.
|
| AVFILTER_DNN_DEFINE_CLASS (dnn_detect, DNN_TF|DNN_OV) |
|
static float | sigmoid (float x) |
|
static float | linear (float x) |
|
static int | dnn_detect_get_label_id (int nb_classes, int cell_size, float *label_data) |
|
static float | dnn_detect_IOU (AVDetectionBBox *bbox1, AVDetectionBBox *bbox2) |
|
static int | dnn_detect_parse_yolo_output (AVFrame *frame, DNNData *output, int output_index, AVFilterContext *filter_ctx) |
|
static int | dnn_detect_fill_side_data (AVFrame *frame, AVFilterContext *filter_ctx) |
|
static int | dnn_detect_post_proc_yolo (AVFrame *frame, DNNData *output, AVFilterContext *filter_ctx) |
|
static int | dnn_detect_post_proc_yolov3 (AVFrame *frame, DNNData *output, AVFilterContext *filter_ctx, int nb_outputs) |
|
static int | dnn_detect_post_proc_ssd (AVFrame *frame, DNNData *output, int nb_outputs, AVFilterContext *filter_ctx) |
|
static int | dnn_detect_post_proc_ov (AVFrame *frame, DNNData *output, int nb_outputs, AVFilterContext *filter_ctx) |
|
static int | dnn_detect_post_proc_tf (AVFrame *frame, DNNData *output, AVFilterContext *filter_ctx) |
|
static int | dnn_detect_post_proc (AVFrame *frame, DNNData *output, uint32_t nb, AVFilterContext *filter_ctx) |
|
static void | free_detect_labels (DnnDetectContext *ctx) |
|
static int | read_detect_label_file (AVFilterContext *context) |
|
static int | check_output_nb (DnnDetectContext *ctx, DNNBackendType backend_type, int output_nb) |
|
static av_cold int | dnn_detect_init (AVFilterContext *context) |
|
static int | dnn_detect_flush_frame (AVFilterLink *outlink, int64_t pts, int64_t *out_pts) |
|
static int | dnn_detect_activate (AVFilterContext *filter_ctx) |
|
static av_cold void | dnn_detect_uninit (AVFilterContext *context) |
|
static int | config_input (AVFilterLink *inlink) |
|
implementing an object detecting filter using deep learning networks.
Definition in file vf_dnn_detect.c.
◆ OFFSET
◆ OFFSET2
◆ FLAGS
◆ DNNDetectionModelType
Enumerator |
---|
DDMT_SSD | |
DDMT_YOLOV1V2 | |
DDMT_YOLOV3 | |
DDMT_YOLOV4 | |
Definition at line 36 of file vf_dnn_detect.c.
◆ AVFILTER_DNN_DEFINE_CLASS()
AVFILTER_DNN_DEFINE_CLASS |
( |
dnn_detect |
, |
|
|
DNN_TF| |
DNN_OV |
|
) |
| |
◆ sigmoid()
◆ linear()
◆ dnn_detect_get_label_id()
static int dnn_detect_get_label_id |
( |
int |
nb_classes, |
|
|
int |
cell_size, |
|
|
float * |
label_data |
|
) |
| |
|
static |
◆ dnn_detect_IOU()
◆ dnn_detect_parse_yolo_output()
find all candidate bbox yolo output can be reshaped to [B, N*D, Cx, Cy] Detection box 'D' has format [x
, y
, h
, w
, box_score
, class_no_1
, ...,]
Definition at line 122 of file vf_dnn_detect.c.
Referenced by dnn_detect_post_proc_yolo(), and dnn_detect_post_proc_yolov3().
◆ dnn_detect_fill_side_data()
◆ dnn_detect_post_proc_yolo()
◆ dnn_detect_post_proc_yolov3()
◆ dnn_detect_post_proc_ssd()
◆ dnn_detect_post_proc_ov()
◆ dnn_detect_post_proc_tf()
◆ dnn_detect_post_proc()
◆ free_detect_labels()
◆ read_detect_label_file()
◆ check_output_nb()
◆ dnn_detect_init()
◆ dnn_detect_flush_frame()
◆ dnn_detect_activate()
◆ dnn_detect_uninit()
◆ config_input()
◆ anchor_array_def
◆ dnn_detect_options
Initial value:= {
{
"ssd",
"output shape [1, 1, N, 7]", 0,
AV_OPT_TYPE_CONST, { .i64 =
DDMT_SSD }, 0, 0,
FLAGS, .unit =
"model_type" },
{
"yolo",
"output shape [1, N*Cx*Cy*DetectionBox]", 0,
AV_OPT_TYPE_CONST, { .i64 =
DDMT_YOLOV1V2 }, 0, 0,
FLAGS, .unit =
"model_type" },
{
"yolov3",
"outputs shape [1, N*D, Cx, Cy]", 0,
AV_OPT_TYPE_CONST, { .i64 =
DDMT_YOLOV3 }, 0, 0,
FLAGS, .unit =
"model_type" },
{
"yolov4",
"outputs shape [1, N*D, Cx, Cy]", 0,
AV_OPT_TYPE_CONST, { .i64 =
DDMT_YOLOV4 }, 0, 0,
FLAGS, .unit =
"model_type" },
}
Definition at line 66 of file vf_dnn_detect.c.
◆ pix_fmts
◆ dnn_detect_inputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 815 of file vf_dnn_detect.c.
◆ ff_vf_dnn_detect
Initial value:= {
.p.name = "dnn_detect",
.p.priv_class = &dnn_detect_class,
}
Definition at line 823 of file vf_dnn_detect.c.
static enum AVPixelFormat pix_fmts[]
#define FILTER_PIXFMTS_ARRAY(array)
#define FILTER_INPUTS(array)
static av_cold int dnn_detect_init(AVFilterContext *context)
static const AVFilterPad dnn_detect_inputs[]
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
static av_cold int preinit(AVFilterContext *ctx)
int ff_dnn_filter_init_child_class(AVFilterContext *filter)
static av_cold void dnn_detect_uninit(AVFilterContext *context)
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
static int config_input(AVFilterLink *inlink)
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FILTER_OUTPUTS(array)
#define AV_PIX_FMT_GRAYF32
static int dnn_detect_activate(AVFilterContext *filter_ctx)
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
int(* init)(AVBSFContext *ctx)
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AV_OPT_TYPE_FLAG_ARRAY
May be combined with another regular option type to declare an array option.
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
static void uninit(AVBSFContext *ctx)
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
@ AV_OPT_TYPE_INT
Underlying C type is int.
static const AVOptionArrayDef anchor_array_def
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.