Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce app size #12

Open
odedharth opened this issue Nov 8, 2016 · 6 comments
Open

reduce app size #12

odedharth opened this issue Nov 8, 2016 · 6 comments

Comments

@odedharth
Copy link

As the landmarks file is very big (around 90mb) its causes the IOS app to be much larger in size.
Do you think there is a way reduce the size of the file (maybe zip it in some way)?

@zweigraf
Copy link
Owner

I am not sure if it is zipped already, so that may be worth a try.

Also, you can generate your own Dlib model which includes less landmarks and possible less accuracy, giving you a smaller model file size. I did not test that, as you need quite a powerful computer (lots of memory) for generating the model.

@andreapiso
Copy link

Also, you should zip the file to see how much space it will actually take when you build the app, since the IPA is already a compressed archive.

@wlads
Copy link

wlads commented Mar 15, 2017

Using gzip the shape_predictor_68_face_landmarks.dat file goes from 99,693,937 to 72,325,689 bytes.. don't think it is worth. Besides you will have to decompress the file at runtime.

@zweigraf
Copy link
Owner

Well that is a nice improvement, around 20%.

If you combine this with a custom model with less landmarks, you could have some nice results.

@singhiam
Copy link

Thanks for the repo and efforts you guys put on this 👍

Can you please guide me how can I create custom models ?

Looking forward to hear from you..

thanks

@zweigraf
Copy link
Owner

I did not do that myself yet, so I can only refer you to the Dlib documentation.

They talk about this feature here and talk about it in the comments of this article. Sample code for training a model is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants