Coder Social home page Coder Social logo

Frame Rate about cam2bev HOT 4 CLOSED

ika-rwth-aachen avatar ika-rwth-aachen commented on July 25, 2024
Frame Rate

from cam2bev.

Comments (4)

lreiher avatar lreiher commented on July 25, 2024 1

Please understand that at the moment we have no capacity to publicly release the inference node.

We can however give you some hints on what such an inference node would need to do:

  1. Load parameters
    • path to exported TensorFlow model
    • paths to one-hot-conversion files for input/label
  2. Setup node
    • load TensorFlow model
    • parse one-hot-conversion palettes
    • create as many image subscribers as you have cameras
    • synchronize image subscribers using message_filters and register callback function
    • create publisher for output image
  3. Callback/Inference Function
    • create input tensors from image messages
      • convert ROS image message to CV images using cv_bridge
      • resize images, if needed
      • one-hot-encode images using the parsed palette
    • run inference using TensorFlow C++ Library
    • create output image message from output tensor
      • one-hot-decode output tensor using the parsed palette
      • convert tensor to ROS image
    • publish output image message

from cam2bev.

lreiher avatar lreiher commented on July 25, 2024

The 2Hz in the paper only relates to the sampling rate of the training sample generation process, i.e., training samples in our dataset are 0.5s apart.

We have a C++ ROS Node to run trained models in inference mode. I quickly measured its runtimes for the following configuration:

  • NVIDIA GeForce RTX 3090
  • uNetXST model
  • 512x256 image size, 10 predicted semantic classes
  • computation of the segmented images is not included in runtime
  • single image: ~40ms
  • 4 images: ~100ms

Possible areas of runtime improvement:

  • The DeepLab models will likely run faster, especially DeepLab MobileNet. Their runtime also doesn't depend on the number of input images, since they work on a single homography image instead. In that case though one would also need to consider the runtime of computing the homography image.
  • uNetXST can also be simplified by reducing its Encoder-Decoder-Depth (default: 5).
  • Reducing image size will speed-up processing.
  • Reducing the number of predicted semantic classes will speed-up processing.

Please also note that we have not focused on achieving minimal runtime. Typical model optimization techniques like pruning or quantization could further decrease latency.

from cam2bev.

sparro12 avatar sparro12 commented on July 25, 2024

Thank you. This was helpful. We will probably try to replicate this as first steps and then move to see if there are improvements. For our high speeds, a transformation to birds eye may be necessary as image stitching through homography alone seems to be unreliable.

from cam2bev.

sparro12 avatar sparro12 commented on July 25, 2024

Would you be willing to share the C++ ROS node with me? I'd like to do some experimenting and it would speed up the process to have your working node

from cam2bev.

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.