How to concat two frame_meta into one frame_meta , and add it to batch_meta?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) : Jetson Nano
• DeepStream Version: Deepstream 6.0
• JetPack Version (valid for Jetson only): Jetpack 4.6
• TensorRT Version: TensorRT 8.0
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs): questions

In Preprocess plugin, assuming streammux’s batch_size = 1, how to copy the frame_meta and concat them(1920 x 1080 → 3840 x 2160), then add the concated frame_meta into batch_meta as nvinfer plugin’s inputs?

The pseudo code is as follows

batch_meta = gst_buffer_get_nvds_batch_meta (inbuf);

...

NvDsFrameMeta *frame_meta = NULL;
frame_meta = (NvDsFrameMeta *) (l_frame->data);

NvDsFrameMeta* copy_frame_meta = NULL;
copy_frame_meta = nvds_acquire_frame_meta_from_pool	(batch_meta);
// copy frame_meta twice
nvds_copy_frame_meta(frame_meta, copy_frame_meta);
nvds_copy_frame_meta(frame_meta, copy_frame_meta); 
// remove the original frame_meat
nvds_remove_frame_meta_from_batch(batch_meta, frame_meta);
// add concated frame_meat into batch_meata
nvds_add_frame_meta_to_batch(batch_meta, copy_frame_meta);

But the result is not what I want!the batch_size of batch_meta becomes larger and larger。

before batch meta's batchsize = 97
after batch meta's batchsize = 98
WARNING from element preprocess-plugin: Warning: exceeding preprocess batch-size (=network-input-shape[0]) => skipping sources

idx=7 network_input_shape[0]=7
Warning: Warning: exceeding preprocess batch-size (=network-input-shape[0]) => skipping sources

before batch meta's batchsize = 98
after batch meta's batchsize = 99
WARNING from element preprocess-plugin: Warning: exceeding preprocess batch-size (=network-input-shape[0]) => skipping sources

idx=7 network_input_shape[0]=7
Warning: Warning: exceeding preprocess batch-size (=network-input-shape[0]) => skipping sources

before batch meta's batchsize = 99
after batch meta's batchsize = 100

Hi @yangye ,
Sorry! Don’t understand the requirement.

Is “1920 x 1080 → 3840 x 2160” to scale the frame?
How can the concat work for above scale?

“1920 x 1080 → 3840 x 2160” means that i have two pictures and want to Stitch them together.
image

But merging the frame_metas does not stitch the images.

You may could take a look if nvdspreprocess (Gst-nvdspreprocess (Alpha) — DeepStream 6.0 Release documentation) can meet your potential requirement,

And, stitching two 1920x1080 outputs 3840x1080

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.