Skip to content
Snippets Groups Projects
Commit 00c65567 authored by William Wan's avatar William Wan
Browse files

add a note

parent f6c5a26d
No related branches found
No related tags found
No related merge requests found
Basically,
after getting dlib installed and CMakelist modified,
moving "shape_predictor_68_face_landmarks.dat" to the build folder,
then the face detector should be good to run.
All the detector relating files are under "nerf_b/include/detector" and "nerf_b/src/detector".
How to use the face detector:
In the main file,
FaceDetector detector("shape_predictor_68_face_landmarks.dat");
should construct a face detector according to the given file.
After linking a model instance and a detecor in the main file, the next step is passing the observation for each frame and do the optimization in Optimizer::optimize.
How to modify the face detector:
For a detector object, _jointPointMap is mapping from a joint's name to the serial number of its tracking point. More specifically, in face_detector.cpp,
_jointPointMap["noseRt_tz"] = 31;
should map the noseRt_tz joint to the 31st point found by dlib.
In detecrtor.cpp, Detector::updateModels(int index) is updating a corresponding instance by the tracking points.
\ No newline at end of file
......@@ -163,11 +163,12 @@ void Optimizer::optimize(
if(optParams.runDetectors){
for(int k = 0; k<_instanceToDetectorAssociation[j].size(); ++k){
int detectorIndex = _instanceToDetectorAssociation[j][k];
//std::cout<<"found points ??? " << _detectors[detectorIndex]->foundPoints() <<std::endl;
if (_detectors[detectorIndex]->isWorking()) {
if (_detectors[detectorIndex]->isWorking()) {
// detector found faces
detectionControlJTJContribution(
j, detectorIndex, optParams.detectorWeight);
} else if (_detectors[detectorIndex]->hasPoints()){
} else if (_detectors[detectorIndex]->hasPoints()){
// detector not found faces, but we have the face expression recorded from previous frame
detectionControlJTJContribution(
j, detectorIndex, optParams.detectorWeight * 0.6);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment