The Koster Seafloor Observatory is an open-source, citizen science and machine learning approach to analyse subsea movies.
The system processes underwater footage and its associatead metadata into biologically-meaningfull information. The format of the underwater media is standard (.mp4 or .png) and the associated metadata should be captured in three csv files (“movies”, “sites” and “species”) following the Darwin Core standards (DwC).
This data management module contains scripts and resources to move and process underwater footage and its associated data (e.g. location, date, sampling device).
The system is built around a series of easy-to-use Jupyter notebook tutorials. Each tutorial allows users to perform a specific task of the system (e.g. upload footage to the citizen science platform or analyse the classified data). The notebooks rely on the koster utility functions.
* Project-specific tutorial
If you want to fully use our system (Binder and Colab has computing limitations), you will need to download this repository on your local computer or server.
Follow the documentation to create a new environment in conda
Clone this repository using
git clone --recurse-submodules https://github.com/ocean-data-factory-sweden/kso-data-management.git
Navigate to the folder where you have cloned the repository or unzipped the manually downloaded repository.
cd kso-data-management
Then install the requirements by running.
pip install -r requirements.txt
If you will work in a new project you will need to input the information about the underwater footage files, sites and species of interest. You can use a template of the csv files and move the directory to the "db_starter" folder.
You will need files of underwater footage to run this system. You can download some samples and move them to db_starter
. You can also store your own files and specify their directory in the tutorials.
If you would like to expand and improve the KSO capabilities, please follow the instructions below and reach out if there are any issues.
- Install conda
- Create new environment
- Install git and pip (with conda)
- Clone kso repo and its submodules (ideally your fork)
- To avoid issues with different notebook kernels we recommend creating a new one:
pip install ipykernel
python -m ipykernel install --user --name="new_environment"
Before pushing your code to the main branch of KSO, please:
- run Black on the code you have edited
black filename
- update the timestamp on the notebook
python update_ts.py filename
Remember to follow the conventional commits guidelines to facilitate code sharing.
* SNIC login credentials and access to Chalmers VPN using Windows or MAC required.
Log in the Alvis Portal and click on "Interactive Apps" and then "Jupyter". This open the server creation options.
Creating a Jupyter session requires a custom environment file, which is available on our shared drive /mimer/NOBACKUP/groups/snic2022-22-1210/jupter_envs. Please copy these files to your Home Directory in order to use the custom environments we have created.
Here you can keep the settings as default, apart from the "Number of hours" which you can set to the desired limit. Then choose either Data Management (Runtime (User specified jupyter1.sh)) or Machine Learning (Runtime (User specified jupyter2.sh)) from the Runtime dropdown options.
This will directly queue a server session using the correct container image, first showing a blue window and then you should see a green window when the session has been successfully started and the button "Connect to Jupyter" appears on the screen. Click this to launch into the Jupyter notebook environment.
Important note: The remaining time for the server is shown in green window as well. If you have finished using the notebook server before the alloted time runs out, please select "Delete" so that the resources can be released for use by others within the project.
If you experience issues uploading movies to Zooniverse, it might be related to the libmagic package. In Windows, the following commands seem to work:
pip install python-libmagic
pip install python-magic-bin
If you use this code or its models in your research, please cite:
Anton V, Germishuys J, Bergström P, Lindegarth M, Obst M (2021) An open-source, citizen science and machine learning approach to analyse subsea movies. Biodiversity Data Journal 9: e60548. https://doi.org/10.3897/BDJ.9.e60548
You can find out more about the project at https://www.zooniverse.org/projects/victorav/the-koster-seafloor-observatory.
We are always excited to collaborate and help other marine scientists. Please feel free to contact us with your questions.