Gaze Estimation: Make File Error

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)**GPU
• DeepStream Version6.4
• JetPack Version (valid for Jetson only)
• TensorRT Version8.6.1.6
**• NVIDIA GPU Driver Version (valid for GPU only)**Driver Version: 566.36
• Issue Type( questions, new requirements, bugs)

Im running deepstream 6.4 container in wsl2 and clone the repo from nvidia deepstream tao apps and when i try to compile this file, im getting this error here:

root@AAM-LAPTOP-027:/opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_tao_apps/apps/tao_others/deepstream-gaze-app# cd gazeinfer_impl/
root@AAM-LAPTOP-027:/opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_tao_apps/apps/tao_others/deepstream-gaze-app/gazeinfer_impl# make
-fPIC -DDS_VERSION=“6.1.0” -I /usr/local/cuda/include -I …/…/…/includes -I /opt/nvidia/deepstream/deepstream/sources/gst-plugins/gst-nvdsvideotemplate/includes -I /opt/nvidia/deepstream/deepstream/sources/includes -I /opt/nvidia/deepstream/deepstream/sources/includes/cvcore_headers -I …/…/deepstream-faciallandmark-app -I …/ -I …/…/common/ -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-deprecated-declarations
g++ -o libnvds_gazeinfer.so gazeinfer.o deepstream_gaze_meta.o …/…/common/ds_yml_parse.o -shared -Wl,-no-undefined -L/usr/local/cuda/lib64/ -lcudart -lcuda -ldl -lpthread -lyaml-cpp -L/opt/nvidia/deepstream/deepstream/lib/ -lnvdsgst_helper -lnvdsgst_meta -lnvds_meta -lnvds_yml_parser -L/opt/nvidia/deepstream/deepstream/lib/cvcore_libs -lnvds_infer -lgstrtspserver-1.0 -lnvbufsurface -lnvbufsurftransform -lnvdsbufferpool -lnvcv_core -lnvcv_gazenet -Wl,-rpath,/opt/nvidia/deepstream/deepstream/lib/ -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
/usr/bin/ld: gazeinfer.o: in function GazeAlgorithm::SetInitParams(DSCustom_CreateParams*)': gazeinfer.cpp:(.text+0x18f6): undefined reference to cuGraphicsEGLRegisterImage’
/usr/bin/ld: gazeinfer.cpp:(.text+0x1aae): undefined reference to `cuGraphicsResourceGetMappedEglFrame’
collect2: error: ld returned 1 exit status
make: *** [Makefile:70: libnvds_gazeinfer.so] Error 1

Kindly help needed here.

You can try to add a macro in the source code like below.

gazeinfer.cpp

#if defined(__aarch64__)
  if(m_process_surf->memType == NVBUF_MEM_SURFACE_ARRAY) {
    if (NvBufSurfaceMapEglImage (m_process_surf, 0) != 0) {
      GST_ERROR ("Error:Could not map EglImage from NvBufSurface for nvinfer");
      return false;
    }

    if (cuGraphicsEGLRegisterImage (&m_cuda_resource,
        m_process_surf->surfaceList[0].mappedAddr.eglImage,
        CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE) != CUDA_SUCCESS) {
        GST_ELEMENT_ERROR (m_element, STREAM, FAILED,
            ("Failed to register EGLImage in cuda\n"), (NULL));
        return false;
    }
    if (cuGraphicsResourceGetMappedEglFrame (&m_egl_frame,
        m_cuda_resource, 0, 0) != CUDA_SUCCESS) {
        GST_ELEMENT_ERROR (m_element, STREAM, FAILED,
            ("Failed to get mapped EGL Frame\n"), (NULL));
        return false;
    }
  }
#endif
1 Like


well its working now, just curious why the results are so bad here?

Could you refer to this 307375 and see if that can work it out?

1 Like

somehow its working and the facial land marks are stable and better but as you can see in the video the arrows are not accurate enough.

i tested it on proper eye movement video here and these are the results:

these are not accurate at all.

@yuweiw waiting for your guidance here!

The model we trained on a small dataset is only for demonstration purposes. The accuracy cannot be fully guaranteed. If you want more accurate data, you need to train a new model on a larger dataset

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.