Scripts for daily image collection and decryption.#26
Conversation
* Added evaluator for detector and classifier * Made necessary changes to main to run evaluator * detector_type as an argument, compare to list of strings * Retinaface works with GPU Co-authored-by: Aditya Chakraborty <chakra17@purdue.edu> Co-authored-by: Aditya Chakraborty <31283807+adityachakra16@users.noreply.github.com>
* Added evaluator for detector and classifier * Made necessary changes to main to run evaluator * detector_type as an argument, compare to list of strings * Retinaface works with GPU Co-authored-by: Aditya Chakraborty <chakra17@purdue.edu> Co-authored-by: Aditya Chakraborty <31283807+adityachakra16@users.noreply.github.com>
…ver (HELPS machine).
|
|
||
| METADATA_FILE = 'metadata.json' | ||
| # rclone on ee220clnx1 is an earlier version that doesn't support copying to shared folders | ||
| RCLONE_PATH = '/home/shay/a/bergz/rclone-v1.52.2-linux-amd64/rclone' |
There was a problem hiding this comment.
I wasn't sure if this should be an argument or not, but there's no reason it would ever change. I made this executable able to be executed by anyone on the machine, so this script could be run by anyone.
There was a problem hiding this comment.
yeah lets make it an argument with a default value.
|
|
||
| for (image_name, x_min, y_min, x_max, y_max, init_vector, goggles) in cursor: | ||
| metadata.append({'image_name': image_name, | ||
| 'x_min': float(x_min), # JSON cannot serialize Decimals. |
There was a problem hiding this comment.
this is fine for converting a decimal to float.
| METADATA_FILE = 'metadata.json' | ||
| # rclone on ee220clnx1 is an earlier version that doesn't support copying to shared folders | ||
| RCLONE_PATH = '/home/shay/a/bergz/rclone-v1.52.2-linux-amd64/rclone' | ||
| TODAY = datetime.datetime.today().strftime('%Y-%m-%d') |
There was a problem hiding this comment.
dates usually need to be calculated in the function they are called in. However I understand that this is a simple script which probably doesn't run for a very long period of time. If that is the case, please leave a comment denoting that so this doesn't become a future hidden bug.
|
Because the rclone executable was in my personal folder, others couldn't run it. I put a version at /local/b/embedvis that anyone can run, but each user has to set up their own configuration pointing to the Drive (or wherever else they want they images sent). |
decrypt_images is not ready to merge yet, I just wanted to make the PR now to get feedback on collect_images. I'll finish decrypt_images once @jbagnara finishes encryption in main.py, then merge this PR.
After running main.py to send some images to ee220clnx1:/local/b/embedvis/Nano_Images,
I tested collect_images on the machine by cloning my version of the repo to that location.
I changed the database query to a different date from today for testing, but other than that the code was exactly the same and I successfully copied images and a metadata.json to the Drive.