Git Product home page Git Product logo

Comments (8)

dusty-nv avatar dusty-nv commented on June 25, 2024

Hmm since another node sends detectNet the images, I am not sure how you would determine the image filename that an image subscriber receives. Do you know if that is possible in ROS?

from ros_deep_learning.

WaldoPepper avatar WaldoPepper commented on June 25, 2024

I think, taking the header (essentialy the time stamp) of the image used for detection and publish it in the detections message as the detections source_img/header together with the detection, should be sufficient to identify the image in a rosbag stream of images.

from ros_deep_learning.

k3street avatar k3street commented on June 25, 2024

There isn't a defined message in ROS that captures the img file and metadata, what I do is time stamp a frame in a data store like postgres with all metadata about the box.

from ros_deep_learning.

dusty-nv avatar dusty-nv commented on June 25, 2024

OK, gotcha - I timestamp the detection message here:

msg.header.stamp = ROS_TIME_NOW();

Although it seems there is some other header in the message for another timestamp. You could try setting that other header if you want.

from ros_deep_learning.

WaldoPepper avatar WaldoPepper commented on June 25, 2024

msg.header.stamp is the entire messages time stamp which I would like to keep at ROS_TIME_NOW().

I think more along the lines of adding something like

detMsg.source_img.header = input->header;

to add a source image-related time stamp to each individual set of detections.

I will try this and let you know how it works...

from ros_deep_learning.

WaldoPepper avatar WaldoPepper commented on June 25, 2024

Ok, did a (very) quick test, it works so far:

   bbox: 
      center: 
        x: 589.929748535
        y: 646.913085938
        theta: 0.0
      size_x: 202.356445312
      size_y: 240.17388916
    source_img: 
      header: 
        seq: 2339
        stamp: 
          secs: 1607068054
          nsecs: 348318751
        frame_id: "//detectnet_link"
      height: 0
      width: 0
      encoding: ''
      is_bigendian: 0
      step: 0
      data: []

A nice side-effect is, that the frame_id of the camera which took the image, is now published, too, which may help with calculating the apparent position of the identified object relative to a /tf frame of choice.

Using this node has been and still is a very pleasant experience, thanks again for providing it... :-)

from ros_deep_learning.

WaldoPepper avatar WaldoPepper commented on June 25, 2024

Looking deeper into it I found the correlation I was looking for.

I recorded a rosbag from the topics of interest /video_source/raw and /detectnet/detections

rosbag record /video_source/raw /detectnet/detections

When viewing them in rqt_bag I can identify exactly from which image a particular detection was derived from:

Screenshot from 2020-12-04 11-30-20

from ros_deep_learning.

WaldoPepper avatar WaldoPepper commented on June 25, 2024

Problem solved, I will try to make a PR after I learned more about the implications of the code change...

from ros_deep_learning.

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.