GithubHelp home page GithubHelp logo

Comments (18)

jkjung-avt avatar jkjung-avt commented on August 29, 2024

Thanks for letting me know your test result on Jetson AGX Xavier.

As to NMS, yes. The TRT SSD engine uses the "NMS_TRT" plugin (provided by NVIDIA) for that. Please refer to ssd/build_engine.py for more info.

The inference code is exactly the same for live camera feed and image file. If you'd like to try "more aggressive" NMS, you could try to lower nmsThreshold value, to say 0.3, and rebuild the TRT engine.

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

Thanks for the recommendation!

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

Hi @jkjung-avt I would like to reopen this issue...

I still seem to get multiple boxes. Is this because of the multithreading? Is the Xavier too fast?
Just for information, this is using the regular trt_ssd.py... Not the async version.
See the image below:

Screenshot from 2019-12-20 15-33-49

from tensorrt_demos.

jkjung-avt avatar jkjung-avt commented on August 29, 2024

@mbufi, This looks like "NMS" does not properly remove duplicated detections. Did you set nmsThreshold too high? Could you set it back to 0.6 and see if the problem persists?

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

Hi @jkjung-avt this is actually with the default values from the GitHub. I just reccloned the repo and ran the image object detection on the Huskies with an Xavier and got this.

from tensorrt_demos.

jkjung-avt avatar jkjung-avt commented on August 29, 2024

I don't see such a problem on either my Jetson Nano DevKit (TensorRT 5 & 6) or x86 PC (TensorRT 5.1.5.0). I still think this is a problem related to NMS.

Which version of TensorRT are you using? Do you have a different platform (or a different version of TensorRT) for comparison?

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

That is so weird! I will have to try it on multiple jetsons (I have tx2, nano, and Xavier) and let you know the results.

I am using jetpack 4.2.2 which I think is tensorrt 5.1 (off the top of my head).

from tensorrt_demos.

jkjung-avt avatar jkjung-avt commented on August 29, 2024

I also tested the code with JetPack-4.2.2 (TensorRT 5.1.6.0) before and did not see this problem.

This might be a silly thing to ask. But did you test with the original huskies picture (without bounding boxes)? Make sure you are not using this picture for testing: huskies.png.

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

Yup! This all started because I tested with live webcam and it was producing multiple bounding boxes. I will experiment more and let you know the results. Thanks jk!

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

working as intended. Not sure why at first it did not... flashing the jetson and reinstalling all libraries fixed issue...

from tensorrt_demos.

Hrayo712 avatar Hrayo712 commented on August 29, 2024

@mbufi which example gave you the 130 FPS on the Xavier ? , Also, how much did you get with the non asynchronous version.

I am currently running the SSD mobilenet_v2_coco on live camera feed on the Xavier (non-asynchronous) and can only reach as much as 40 FPS for some reason. I am using Jetpack 4.3 + TensorRT 6.

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

@Hrayo712 I was using the aysnc version.

I believe with the non-async I was averaging ~80ish? I am using jetpack 4.2.2 with tensorRT 5.1

from tensorrt_demos.

Kmarconi avatar Kmarconi commented on August 29, 2024

Hi guys,

Just tested the ssd async version on my Xavier and i'm arround 150~170 FPS which is just amazing. But for the moment I've tested it just with my camera and there is at least 3 boxes around my person... Any advice ?

Ps: Working on Jetpack 4.3 with tensortRT 6.0

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

@Kmarconi I had the same issue. Is this on live camera or on a single image?

from tensorrt_demos.

Kmarconi avatar Kmarconi commented on August 29, 2024

On live camera :)

from tensorrt_demos.

jkjung-avt avatar jkjung-avt commented on August 29, 2024

Upon more thought, I just realized that 130 or 150~170 frames per second is much higher than: (a) frame rate of the camera; and (b) frame rate of the display (unless you're using a very high end industrial camera...)!!

I wasn't considering that when developing the code. So what you've seen might be the same camera image gets inferenced and drawn multiple times.

To verify whether the optimized TensorRT engine produces correct result on Jetson Xavier, please use the sync version of trt_ssd.py and look at the image frame one by one.

You might do that by, say, intentionally increasing delays between image frames. Modify this line of code. From: (1ms)

key = cv2.waitKey(1)

To: (0.1 second)

key = cv2.waitKey(100)

from tensorrt_demos.

Kmarconi avatar Kmarconi commented on August 29, 2024

It is working, yep. With the sync version and with a 25ms delay for the waitKey, I'm at 30 FPS and there is only one box for each object :) Thanks :)

from tensorrt_demos.

marvision-ai avatar marvision-ai commented on August 29, 2024

@Kmarconi Glad this was worked out :) Thanks @jkjung-avt !

from tensorrt_demos.

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.