-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
anyway to visualize the detect result like in jet-inference? #28
Comments
I was looking to do the same and managed to jurryrig the code to do this. I don't want to actually submit the change cause I don't feel like going through the full test process to make sure this is sound so use at your own risk. Also I didn't verify this was all the changes so if i missed something let me know. And if anyone is interested in cleaning the changes up and putting it into the release as a parameter or something feel free to. Make the following code changes
In node_detectnet.cpp under the other impage publisher ptr add near the top of img_callback replace the existing line with this at the end of img_callback replace the existing detection_publish with these lines
in main just under the detection_pub = &pub; insert the following
|
@gclarke42 When visualizing the /camera/image_det_output in rviz using detectNet::OVERLAY_BOX as an overlay, the conversion crashes. At the beginning I can see some blue box flickering shortly sometimes where the detections should be, then I get
Any idea how to fix this? Appreciate your work. It does not crash when using OVERLAY_NONE but then the whole point is kind of gone. As a work around one could probably draw directly on the back-converted image using openCV. |
@matthaeusheer I updated the first response with a couple of missing lines, the first is the ptr you mentioned, the 2nd is a line change that enables the bounding box in img_detect. As you correctly guessed OVERLAY_NONE is rather pointless:P I did notice that with some models, moving the camera around a bunch or having too many detentions caused a crash, i didn't really look into the why much yet, I have had pretty good luck using ssd-mobilenet-v2. I am using a rasppi V2 camera with 1280/720 maxfps of 30 in case it helps debug any. The stream is coming from gstreamer, I then use cv_bridge to convert the image to bgr and pipe that into the node. It sounds like you had both of those missing lines covered already, the only difference i see jump out is I used all 3 bounding box options instead of just the plain box. I'm not sure about the errors, just based on the message it seems to be having a problem running the rgb-bga conversion in CUDA. I'm not well versed in CUDA, when writing that function i basically just reversed everything that it did in the initial conversion in order to copy the modified image from cvt back into an image ptr. RVIZ should be able to process the BGR image i think, so you might be able to skip that step and instead just copy the updated image to the stream ptr. |
I did a workaround by simply drawing detection boxes using openCV, my ros_deep_learning fork, which works just fine. Let's see, @dusty-nv, do you have some hints on this one? |
Thank you @gclarke42 those code snippets worked on the Nano. Will report back on some testing or if I come across any other ideas |
anyway to visualize the detect result like in jet-inference?
The text was updated successfully, but these errors were encountered: