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,
https://source.codeaurora.org/external/imxsupport/eiq_sample_apps/tree/examples-tflite/face_recognit...
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