Skip to content

[FEATURE]: Manual image_file to pkl_representation management #1233

Closed
@BrunoMarinhoM

Description

Description

  • Description:
    The Find method would have three extra fields (enforce_disk_consistency (boolean), refresh_database (boolean), and updated_images (list of paths)) that would allow manual image representations management;
    When both enforce_disk_consistency and refresh_database are set to True, the behavior would remain the same;

  • Differences:
    -- refresh_database set to false -> The function is gonna rely only on the already set up pkl representations within the db_path, ignoring all tests to assure that any of the image files were still in the db_path directory;
    -- enforce_disk_consistency set to false and refresh_database set to true -> The function would only update (either add, delete or replace) the files within the updated_images list; ignoring all others;

  • Advantage: when dealing with cloud computing or large enough set of images, this controlled behavior allow you to rely only on the images pkl representations and not their (possibly large) actual image files. For example, in a API, you could simply upload your database, run the find function once only to create the pkl representations file, and afterwards delete all the image files and would still be able to run the face_recognition with the same database except none of the image files would be in the server.

  • Additional Info: I'm already using the lib that way in my personal repo; and it's been a perfect fit for the cloud computing env that I've been using; if you think it could be useful for you project I'd be happy to share.

Additional Info

No response

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions