MiraPurkrabek / PoseAnnotator

PoseAnnotator is a simple Python tool with a GUI for annotating 2D human poses from images. It allows users to easily label key points on human figures for pose estimation tasks.
GNU General Public License v3.0
0 stars 1 forks source link

Sync annotations to google drive after exiting #3

Closed Fizza-Rubab closed 1 month ago

Fizza-Rubab commented 2 months ago

What?

I have added functionality for uploading the annotations to Google Drive of the user. The annotations are uploaded only once after the user exits the program.

Why?

A backup of the annotations can be stored in case the file on the local system gets corrupted. It can also be used by collaborators and supervisors to track progress on data annotation task.

How?

Syncing to Google Drive uses the Google Drive API via the Pydrive wrapper. The user first has to setup the Google Drive API access through the Google Cloud Console (details mentioned in annotations.md in the docs). Once API and credentials are configured, the user can provide a flag in the script to enable syncing. The user can also provide a cloud folder id if they want the results to be saved in a specific folder.

MiraPurkrabek commented 2 months ago

Once the above-mentioned issues/questions are resolved, I propose to:

  1. Add PyDrive as an optional requirement to both the .txt and Conda env files.
  2. Change "Miroslav Purkrabek" to "PoseAnnotator contributors" in the BibTeX citation, as I will no longer be the sole contributor.
Fizza-Rubab commented 1 month ago

Hi @MiraPurkrabek, thank you for reviewing the code.

  1. I agree that the secrets file can be accidentally uploaded. It may be safer to add all *.json files to gitignore.
  2. Thank you for pointing this out. Yes, it would be possible. I can save the access and refresh tokens in a file when the user authenticates the first time. They can then be loaded to prevent the authentication prompt from appearing until the file is deleted, or access is revoked.

I will share the updated code soon.

MiraPurkrabek commented 1 month ago

All checks completed, merging into the main. Thank you @Fizza-Rubab for the new feature.