Transfer_learning app full image:

i customized transfer_leaning app and try to get image with i want bbox only,
full image is created by dummy_obj inside probe,
as obj list already, it should be got all obj_params, i tried to acquire display meta and add on frame but getting nothing bounding box to show.
i noted the probe scale obj dimensions to full frame, maybe it covers all, or how to move the probe to osd src pad?
so how to do for my issue?

thank you very much!


We are going to check this issue in deep.
Will share more information with you later.


Could you share how do you check the bounding box?
We can get the bbox information in the output/labels/ when using save-img-full-frame=1


yes can get bbox informations at labels,
but i want to show my target bounding box on images which takes, this is problem.
and keep all bbox on RTSP out screens, too, but EGL is not important for me.

thank you.


Do you want to get the NvDsObjectMeta data in the overlay_graphics(.) function?
If yes, have you tried to call the nvds_acquire_obj_meta_from_pool(.)?


before the line:
at_least_one_image_saved |= save_image(img_producer.get_image_full_frame_path_saved(),
ip_surf, &dummy_obj_meta, frame_meta, dummy_counter);
i have acquire obj_meta and add it to frame already, but none boxes on snap images at all.
i want to show boxes which i am interest on images.

thank you


Sorry for the late reply.

Is this still an issue for you?
If yes, would you mind sharing your customization with us for reproducing?


yes it is really a long time problem for me still, this is my code which in transfer learning cpp, i tried two ways to acquire but can not get bbox to show on images:

    if(at_least_one_confidence_is_within_range) {
        for (NvDsMetaList *l_obj = frame_meta->obj_meta_list; l_obj != nullptr;
             l_obj = l_obj->next) {
            NvDsObjectMeta *obj_meta = static_cast<NvDsObjectMeta *>(l_obj->data);
            if (!obj_meta_is_above_min_confidence(obj_meta)
                || !obj_meta_box_is_above_minimum_dimension(obj_meta))

            ImageMetaProducer::IPData ipdata = make_ipdata(appCtx, frame_meta, obj_meta);

            /// Store temporally information about the current object in the producer
            bool data_was_stacked = img_producer.stack_obj_data(ipdata);
            /// Save a cropped image if the option was enabled
            if (data_was_stacked && g_img_meta_consumer.get_save_cropped_images_enabled())
                at_least_one_image_saved |= save_image(ipdata.image_cropped_obj_path_saved,
                                                       ip_surf, obj_meta, frame_meta, obj_counter);
            if (data_was_stacked && !full_frame_written
                && g_img_meta_consumer.get_save_full_frame_enabled()) {
                unsigned dummy_counter = 0;
                /// Creating a special object meta in order to save a full frame
                NvDsObjectMeta dummy_obj_meta;
                dummy_obj_meta.rect_params.width = ip_surf->surfaceList[frame_meta->batch_id].width;
                dummy_obj_meta.rect_params.height = ip_surf->surfaceList[frame_meta->batch_id].height;
       = 0;
                dummy_obj_meta.rect_params.left = 0;
                NvDsObjectMeta *obj_meta = nvds_acquire_obj_meta_from_pool(batch_meta); //
                NvDsObjectMeta *obj_parent = obj_meta->parent; //
                nvds_add_obj_meta_to_frame (frame_meta, obj_meta, obj_parent); //
                //NvDsDisplayMeta *display_meta = nvds_acquire_display_meta_from_pool(batch_meta);
                //nvds_add_display_meta_to_frame (frame_meta, display_meta);
                at_least_one_image_saved |= save_image(img_producer.get_image_full_frame_path_saved(),
                                                       ip_surf, &dummy_obj_meta, frame_meta, dummy_counter);
                full_frame_written = true;
            at_least_one_metadata_saved |= data_was_stacked;
    /// Send information contained in the producer and empty it.
    if(at_least_one_metadata_saved) {
/// Wait for all the thread writing jpg files to be finished. (joining a thread list)
if (at_least_one_image_saved)


pls give an advice for the problem still, i want to draw object’s bbox on all images which have been snapped.

thank you


Sorry for the late update.

The sample is trying to save some images for further training.
As you can find, the after_pgie_image_meta_save is attached right behind the primary nvinfer.

But please note that the bounding box is added after nvosd.
You will need to add the osd_sink_pad_buffer_probe to nvosd and save the image.


pls give more advice about where to add osd_sink_probe then i can get result which i want?

thank you very much really!


Thanks for your patience.

You can find a jpeg encoder example in the osd_sink_pad_buffer_probe in the below example:


Please add it to the overlay_graphics function accordingly.

oh, it is seems a very nice idea! ::)))
i try this way as soon as possible and let you know.
and pls help me check sgie tensor problem at another topic.

thank you so much!

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