Menu

dlib shape_predictor causing memory leak

Help
abuxhuv
2020-01-05
2020-01-05
  • abuxhuv

    abuxhuv - 2020-01-05

    I am using webcam_face_recognition with Dlib which recursively calls
    for (auto face : rects) { auto shape = sp(img, face); matrix<unsigned char> face_chip; extract_image_chip(img, get_face_chip_details(shape,150,0.25), face_chip); faces.push_back(move(face_chip)); }
    this snippet over and over which causes memory leak. When I comment out the snippet, no memory leakage.
    I am using Dlib 19.19 on Jetson Xavier (Jetpack 4.3) with Ubuntu 18.04

     

    Last edit: abuxhuv 2020-01-05
    • Davis

      Davis - 2020-01-05

      That loop is appending to faces, making it bigger, and causing more RAM to
      be used.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.