Code Monkey home page Code Monkey logo

Comments (10)

elementdl avatar elementdl commented on May 10, 2024 1

Ok, again thanks a lot, without you I will still be lost!

from deepstream-yolo.

marcoslucianops avatar marcoslucianops commented on May 10, 2024

Hi,

If you only need save bbox coordinates, you can enable gie-kitti-output-dir in [application] section of your source.txt file.

gie-kitti-output-dir = Pathname of an existing directory where the application stores primary detector output in a modified KITTI metadata format.

Example: gie-kitti-output-dir=/home/ubuntu/kitti_data/

You can modify write_kitti_output function in deepstream_app.c to save your custom metadata.

An example of metadata usage is:

  for (NvDsMetaList * l_frame = batch_meta->frame_meta_list; l_frame != NULL;
      l_frame = l_frame->next) {
    for (NvDsMetaList * l_obj = frame_meta->obj_meta_list; l_obj != NULL;
        l_obj = l_obj->next) {
      NvDsObjectMeta *obj = (NvDsObjectMeta *) l_obj->data;
      float left = obj->rect_params.left;
      float top = obj->rect_params.top;
      float right = left + obj->rect_params.width;
      float bottom = top + obj->rect_params.height;
    }
  }

from deepstream-yolo.

elementdl avatar elementdl commented on May 10, 2024

Ok, in order to see if I understand correctly,

I use deepstream-yolov3-tiny, so the source.txt file is "deepstream_app_config_yoloV3_tiny"?
Under "[application]", I add enable-gie-kitti-output-dir=1?

how can I modify where the data will be stored? I saw that is has to be modified in the configuration file, so in "config_infer_primary_yoloV3_tiny" I add under "[property]" gie-kitti-output-dir=/home/ubuntu/kitti_data/?

I found the function "write_kitti_track_output", and it seems to get all the data I need (coordinates, id of bounding boxes...).

My real goal is to get these metadata and create a program that will send motor commands to a robot later.
For example if I got in the data a bounding boxes with a pedestrian in the center of the frame, I have to send "stop", for the safety of the pedestrian.

If i understood well, in the analytics_done_buf_prob function, if I replace write_kitti_track_output by a custom function that take the same data than write_kitti_track_output, I will be able to exploit the data of the bounding boxes, right?

from deepstream-yolo.

elementdl avatar elementdl commented on May 10, 2024

*also, do I have to compile something after or can I directly use the command "$ deepstream-app -c <path_to_config_file>"?

from deepstream-yolo.

marcoslucianops avatar marcoslucianops commented on May 10, 2024

I use deepstream-yolov3-tiny, so the source.txt file is "deepstream_app_config_yoloV3_tiny"?
Under "[application]", I add enable-gie-kitti-output-dir=1?

No, you will add in [application] in deepstream_app_config_yoloV3_tiny:
gie-kitti-output-dir=directory you want to save

Don't need edit config_infer_primary_yoloV3_tiny to that.

I found the function "write_kitti_track_output", and it seems to get all the data I need (coordinates, id of bounding boxes...).

You can add you custom metadata in write_kitti_output.
write_kitti_track_output only works with tracker, and objList->uniqueId isn't bbox id (it's gie id).

If i understood well, in the analytics_done_buf_prob function, if I replace write_kitti_track_output by a custom function that take the same data than write_kitti_track_output, I will be able to exploit the data of the bounding boxes, right?

Yes.

*also, do I have to compile something after or can I directly use the command "$ deepstream-app -c <path_to_config_file>"?

If you only compiled with make, You need use command in deepstream-app directory using ./deepstream-app...
You can move new compiled deepstream-app to bin folder (/opt/nvidia/deepstream/deepstream-5.0/bin/), and you will can use without ./ in any directory.

from deepstream-yolo.

elementdl avatar elementdl commented on May 10, 2024

Ok, I will try this, thanks, you helped me a lot!

from deepstream-yolo.

marcoslucianops avatar marcoslucianops commented on May 10, 2024

I suppose "that obj->obj_label" is "person"
but "id" doesnt appear, right?

Did you enable gie-kitti-output-dir or kitti-track-output-dir? For write_kitti_track_output function, you need use

kitti-track-output-dir=directory you want to save

from deepstream-yolo.

elementdl avatar elementdl commented on May 10, 2024

Yes, I made a mistake, I didn't realize there was two similar function, I just saw write_kitti_track_output, I was using write_kitti_output.

from deepstream-yolo.

elementdl avatar elementdl commented on May 10, 2024

I didn't understand all this

You can add you custom metadata in write_kitti_output.
write_kitti_track_output only works with tracker, and objList->uniqueId isn't bbox id (it's gie id).

I don't know what is a tracker in this case, neither uniqueId and gie id.

Just to be sure, if I use write_kitti_output, can I still get the id of the object detected?

from deepstream-yolo.

marcoslucianops avatar marcoslucianops commented on May 10, 2024

Just to be sure, if I use write_kitti_output, can I still get the id of the object detected?

Yes.

Correcting, you can also use write_kitti_track_output function without [tracker] in deepstream_app_config_yoloV3_tiny. The write_kitti_output function will be called after [primary-gie] and write_kitti_track_output will be called after all GIEs (primary-gie, secondary-gie, etc).

You can use, in both case

      fprintf (bbox_params_dump_file,
          "%s %d %.1f %.1f %.1f %.1f\n",
          obj->obj_label, obj->object_id, left, top, right, bottom);

If you only want label, id, left, top, right, bottom respectively.

from deepstream-yolo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.