You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Jonathan Chan 71c6de1dd5 Updated README.md 2 years ago
coastsnap Updated README.md 2 years ago
README.md Updated README.md 2 years ago
coastsnap_sites.csv Added relative file paths 2 years ago
environment.yml Added tagging and workflow powerpoint 2 years ago
registration_capacity.csv Added tagging and workflow powerpoint 2 years ago
workflow.pptx Updated workflow.pptx 2 years ago

README.md

Coastsnap - Batch download, registration and tagging

About the project

This is a Python/Photoshop toolbox to help automate managing images captured for the Coastsnap project. This toolbox was written for a specific workflow (Download -> Register -> Tag -> Manually remove bad images in 'Registered'). See workflow.pptx, for a more informative schematic of the intended workflow. Batch downloading code is an extension on the Leaman CoastSnap Toolbox (http://git.wrl.unsw.edu.au:3000/chrisl/coastsnap.git)

This toolbox can:

  • Download images stored on the Spotteron app service batch_spotteron_download.bat
  • Register Spotteron images in photoshop batch_photoshop_registration.bat
  • Tag registered images with the image date, time, tide, contributor batch_tag_registered.bat

Getting started

Prerequisites

This package has only been tested on a Windows system. Using the Anaconda distribution of Python is recommended for easiest installation of the toolbox requirements.

Installation

  1. Clone this repo onto your PC: git clone http://git.wrl.unsw.edu.au:3000/jonoc/coastsnap.git
  2. Change your working directory into the repo: cd coastsnap
  3. Create a new conda environment called "coastsnap" with the required dependencies. This is the same environment as for the Leaman CoastSnap Toolbox, so you may already have it. If you're not sure, run: conda info --envs and look for "coastsnap". Otherwise, create the environment by runnning: conda env create -f environment.yml

Add filepaths

  1. Open up coastsnap_sites.csv. Change the path name in cell E2, to the oneDrive CoastSnap directory (contains Images, Tide Data, Database etc.) NOTE: This file is called by all of the scripts in this repo. DON'T CHANGE THE STRUCTURE OF THE CSV, as it'll cause the registration.jsx scripts to die. Feel free to add more sites (rows) though.

Updating repo with latest code

  1. Open your terminal and make sure you're in the directory you cloned the coastsnap repo into.
  2. Ensure you have the coastsnap conda environment active: activate coastsnap
  3. Pull the latest changes: git pull
  4. Update the environment: conda env update --name coastsnap --file environment.yml

Usage

Batch download images from Spotteron

Run batch_spotteron_download.bat

Script Logic: For every site in coastsnap_sites.csv, download the latest Spotteron images and save to Processed.

  • Starts downloading from the most recent image and stops downloading for the site when an image has already been downloaded, to avoid overwriting images.

Batch register images

Run batch_photoshop_registration.bat

Script Logic: For every site in coastsnap_sites.csv, iterate through the sites' Processed images (Images/Site/Processed). For any image that hasn't already been photoshop registered (in Images/Site/Photoshop), register it.

Batch tag images

Run batch_tag_registered.bat

Script Logic: For every site in oneDrive CoastSnap directory, iterate through the sites' registered images (Images/Site/Photoshop). Tag the images with their Date, Time, Contributor and Tide (if tide data for site exists), suffix the filename with "_registered" and save at Images/Site/Registered.

  • Starts tagging from the most recent image and stops for the site when an image has already been tagged. This way, the user can manually remove bad registered/tagged images, and they will not be automatically replaced.
  • Retrieves tide data for the site from the .mat file specified in Database/CoastSnapDB.xlsx