Testing OpenCV-based Lane departure warning system(LDWS) application on imx8mqevk with BSP 5.4.3_1.0.0, it's working fine with CPU memory but consuming 180 percent of the CPU memory(makes the camera output slow). So, I need to run the same piece of code on the GPU to improve camera output response. Took eIQ TFlite based face recognition application as a reference for GPU acceleration. Implemented the same piece of code for the LDWS app also. Tried different TFlite models for execution and enabled the NNAPI delegates, but facing segmentation fault, it's working fine without NNAPI and running on the CPU memory with slow camera response. Attaching log file for reference.
Can you please help me to solve the segmentation issues and suggest how effectively use the imx8 GPU memory for ADAS applications like LDWS and Traffic light recognition.
I took reference source from the following link,
The following LDWS run_inference code sections only I have doubt, kindly clarify it.
lane_future = pool.enqueue(init_lanealgorithm);
if (!lane.empty())
pred_future = pool.enqueue(get_output_tensor, lane, s);
init_lanealgorithm function contains the OpenCV piece of code for lane detections and it's return type is Mat object.
lane - Mat object
Hello rmani0029,
With your log, it is very difficult to figure out what caused the segmentation after run inference.
And,There is no stack trace back to point to where the segmentation fault happens.
Could you use gdb to run your application to see you can get trace back to point where the segmentation happens?
Or you gave your application and show us how to set up the test so that we can debug.
As I know previously, opencv's mat object uses cpu memory and is very slow. We once had traffic recognition demo which uses gpu physical memory allocated by g2d, implemented zero copy for mat's data buffer for opencl gpu data processing, which improved the performance and reduce cpu usage.
Regards
Hi,
Hi,
LaneDeparture.bz2 file contains the binary file of the LDWS application.
Regards,
Manikandan.R