Facial landmark detection in UE4

I am trying to add facial landmark detection in my game. I am using the Opencv library in UE4.19. So far, I can do facial detection however, when trying landmark detection, I am unable to load the model. Below is a snippet of the facial landmark code:

facemark = cv::face::FacemarkLBF::create();
facemark->loadModel(faceLandmarksPath);

The faceLandmarksPath is a string. I know I am not using the loadModel correctly in UE4 but I don’t know how to reference it and I couldn’t find anything on facial landmark detection in ue4.

The code throws a heap corruption error however continuing over it results in the landmark detection working perfectly fine. The only issue is I am not sure why the heap corruption is occurring. The model loaded is 55 MB and it worked on VSCode, is there a file size limit for the UE4 code? and that’s causing the memory to overrun?