ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
52.99k stars 13.45k forks source link

Model Building Incremental way #685

Open akhilgupta0221 opened 5 years ago

akhilgupta0221 commented 5 years ago

Description

Instead of building the Model for all the images every time is that possible to build the Model in the incremental way.

for ex: If we have 100 images first day and we have built the Model for 100 images for the same day then next day the model will be built only for the new images on the top of the previous day model and that will give the model of all the images present till that day.

No need to retrain all the images every time it should only be for the new images on top of previous day model.

ageitgey commented 5 years ago

What kind of model are you training exactly? If you are just encoding images, you could save the encodings from the previous days so you don't have to recalculate them.

akhilgupta0221 commented 5 years ago

@ageitgey : It's an encodings of images. In layman terms I want to merge the previous day and the current day model without building the previous day model.

nitishxp commented 5 years ago

@ageitgey can u suggest a way to reduce model building time eg: Suppose on any day we have 100 images and we are building a model on it, on next day we get 10 new more images now we need to build a model of 110 images (which will take more time). Is there any way by which we can only include these new 10 images and merge it with 100 images model so that it can reduce model building time :)

donaldxu commented 5 years ago

@nitishxp you can save the model by pickle When you need to add more faces, you can load from the model and add new face encodings to it

nitishxp commented 5 years ago

is this a good way to do in the production environment?

donaldxu commented 5 years ago

is this a good way to do in the production environment?

in a production environment, i think you can save face encodings in database or redis

nitishxp commented 5 years ago

Hi can you give a documentation to save model in redis and read from it?

Thanks

On Thu 29 Nov, 2018, 6:46 AM donaldxu <notifications@github.com wrote:

is this a good way to do in the production environment?

in a production environment, i think you can save face encodings in database or redis

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ageitgey/face_recognition/issues/685#issuecomment-442668227, or mute the thread https://github.com/notifications/unsubscribe-auth/AX2B-ipaVIErHbFvfeO8YZuxf7qikkqbks5uzzVdgaJpZM4Yxb89 .

fishfree commented 1 year ago

Hi can you give a documentation to save model in redis and read from it? Thanks On Thu 29 Nov, 2018, 6:46 AM donaldxu @.*** wrote: is this a good way to do in the production environment? in a production environment, i think you can save face encodings in database or redis — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#685 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AX2B-ipaVIErHbFvfeO8YZuxf7qikkqbks5uzzVdgaJpZM4Yxb89 .