Created
May 25, 2018 05:18
-
-
Save dimpler03/8d60282d5fd143856c4529e0a292e96f to your computer and use it in GitHub Desktop.
Prepare shape predictor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@property (assign) BOOL prepared; | |
@implementation MLWrapper { | |
dlib::shape_predictor sp; | |
} | |
- (void)prepare { | |
NSString *modelFileName = [[NSBundle mainBundle] pathForResource:@"shape_predictor_68_face_landmarks" ofType:@"dat"]; | |
std::string modelFileNameCString = [modelFileName UTF8String]; | |
dlib::deserialize(modelFileNameCString) >> sp; | |
self.prepared = YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment