Menu

A Couple of Question about DNN in Dlib.

2018-07-26
2018-07-29
  • John Puskin

    John Puskin - 2018-07-26

    Dear Davis.

    1. Is deep learning (i.e. face detection&recognition) in dlib thread safe? (with CUDA & without CUDA)
      1.1. If no, is it possible to make it thread safe easily?
    2. Is dnn face detection more accurate than standart HOG face detector?
    3. Would please give an estimate time duration of a single face/image with dnn face detection and recognition (with NVidia 1080 Ti & enabled CUDA) ?

    Best Regards.

     
    • Davis

      Davis - 2018-07-28

      The normal thread safety rules apply here as they do to any other object.
      See: http://dlib.net/intro.html

      DNNs are more accurate than HOG but slower to execute. The specific timing
      will depend on the sizes of your images. Run the examples and see.

       
  • John Puskin

    John Puskin - 2018-07-29

    I try to make myself clear.

    Suppose, I want to initialize DNN's globally, something like that;
    shape_predictor sp; deserialize("shape_predictor_5_face_landmarks.dat") >> sp;
    anet_type net; deserialize("dlib_face_recognition_resnet_model_v1.dat") >> net;

    then each thread calls the following function by itself (without re-initialization) ;
    sp(img, face);
    net(faces);

    Does is make problem? Can threads successfuly exetuce its own sp & net DNNs.
    I understand that global initialization makes problem, am I right?

     
    • Davis

      Davis - 2018-07-29

      That question is answered in the documentation I sent you. It's all
      discussed in detail.

       

Log in to post a comment.