When I run this line in deepstream
cv::addWeighted(color, alpha, roi, 1.0 - alpha, 0.0, roi);
Memory usage by deepstream % is 205 and skyrocketed as shown in attached image.
If I close that line, the mem % usage by deepstream is 11.5% only.
What could be issue?
kesong
August 12, 2021, 1:32pm
3
Can you share the reproduce step? So I can check it in my side.
Thanks.
I used deepstream-app.
Then gstdsexample is enabled in config file as
[ds-example]
enable=1
#processing-width=960
#processing-height=544
full-frame=1
blur-objects=0
unique-id=15
Then full-frame is enabled and inside the following function
static GstFlowReturn
gst_dsexample_transform_ip (GstBaseTransform * btrans, GstBuffer * inbuf){}
You can plot a rectangle with a transparency as
cv::Mat roi = in_mat(cv::Rect(x1, y1, x2-x1, y2-y1 ));
cv::Mat color(roi.size(), CV_8UC4, cv::Scalar( 0, 0, 255 ));
double alpha = 0.3;
cv::addWeighted(color, alpha, roi, 1.0 - alpha, 0.0, roi);
I used TOP to see memory %.
At the same time, when you check the issue can please check also why this color value cv::Scalar( 0, 0, 255 ) doesn’t reflect in display? Say I like to change to red, but it shows gray only.
kesong
August 14, 2021, 1:10pm
6
Can you share the patch or gstdsexample.cpp which can reproduce your issue?
I used this file.
gstdsexample.cpp (43.2 KB)
Pls let me know if you need more.
@kesong may I have reply?
kesong
August 17, 2021, 1:30am
9
Crazy busy. Will reproduce it later and feedback you. Thanks.
@kesong Thanks. Because I need to deploy the solution on Friday. I like to settle before deployment.
kesong
August 17, 2021, 1:14pm
11
Please try latest release DS5.1. Latest release always has better quality.
edit_or
August 18, 2021, 10:03am
12
I tried latest version. Speed is definitely much faster. But memory % still increasing.
kesong
August 18, 2021, 12:06pm
13
OpenCV will excute on CPU. Suggest to use other HW accelerated function if possible.
kesong
August 19, 2021, 12:36pm
15
Can you describe the purpose of the plugin?
edit_or
August 19, 2021, 12:53pm
16
I need to get tracking bounding boxes of detected objects and do next level of decision making. Then I also need to draw additional boxes on image.
kesong
August 21, 2021, 12:02am
17
Is it enough for you with below plugin? Or you need more feature for the plugin?
Gst-nvdsosd — DeepStream 5.1 Release documentation (nvidia.com)
edit_or
August 21, 2021, 12:11am
18
How can I use this plugin? I need to use c++ vector. So in .c file, I can’t use c++ vector, right?
Did you try use nvdsanalytics to draw rectangle, trigger object move in this rectangle and get bounding of object
example test5 custom: deepstream-occupancy-analytics/config at master · NVIDIA-AI-IOT/deepstream-occupancy-analytics · GitHub
Thanks I can get bounding box. Just have memory issue in plotting rectangles.
kesong
August 29, 2021, 2:40am
21