Skip to main content
Paidiverpy

lifecycle License Documentation DOIlink Pypi covlink

Paidiverpy is a Python package designed to create pipelines for preprocessing image data for biodiversity analysis.

IMPORTANT: This package is still in active development, and frequent updates and changes are expected. The API and features may evolve as we continue improving it.

Documentation

The official documentation is hosted on ReadTheDocs.org: https://paidiverpy.readthedocs.io/

IMPORTANT: Comprehensive documentation is under construction.

Installation

To install paidiverpy, run:

pip install paidiverpy

Build from Source

  1. Clone the repository:

    # https
    git clone https://github.com/paidiver/paidiverpy.git
    cd paidiverpy
  2. (Optional) Create a Python virtual environment to manage dependencies separately from other projects. For example, using conda:

    conda env create -f environment.yml
    conda activate Paidiverpy
  3. Install the paidiverpy package:

    pip install -e .

Usage

You can run your preprocessing pipeline using Paidiverpy in several ways, typically requiring just one to three lines of code:

Python Package

Install the package and utilize it in your Python scripts.

# Import the Pipeline class
from paidiverpy.pipeline import Pipeline

# Instantiate the Pipeline class with the configuration file path
# Please refer to the documentation for the configuration file format
pipeline = Pipeline(config_file_path="../examples/config_files/config_simple2.yml")

# Run the pipeline
pipeline.run()

You can export the output images to the specified output directory:

pipeline.save_images(image_format="png")

Command Line Interface (CLI)

Pipelines can be executed via command-line arguments. For example:

paidiverpy -c "examples/config_files/config_simple.yml"

This runs the pipeline according to the configuration file, saving output images to the directory defined in the output_path.

Docker

You can run Paidiverpy using Docker by pulling a pre-built image from GitHub Container Registry (GHCR) or Docker Hub.

docker pull ghcr.io/paidiver/paidiverpy:latest
docker tag ghcr.io/paidiver/paidiverpy:latest paidiverpy:latest

To run the container, use the following command:

docker run --rm \
  -v <INPUT_PATH>:/app/input/ \
  -v <OUTPUT_PATH>:/app/output/ \
  -v <METADATA_PATH>:/app/metadata/ \
  -v <CONFIG_DIR>:/app/config_files/ \
  paidiverpy -c /app/examples/config_files/<CONFIG_FILE>

Example Data

If you’d like to manually download example data for testing, you can use the following command:

`python from paidiverpy.utils.data import PaidiverpyData PaidiverpyData().load(DATASET_NAME) `

Available datasets:

  • plankton_csv: Plankton dataset with CSV file metadata

  • benthic_csv: Benthic dataset with CSV file metadata

  • benthic_ifdo: Benthic dataset with IFDO metadata

  • nef_raw: Sample images in Nef format (raw images) with CSV file metadata

  • benthic_raw_images: Benthic dataset in raw format with CSV file metadata

Example data will be automatically downloaded when running the example notebooks.

IMPORTANT: Please check the documentation for more information about Paidiverpy: https://paidiverpy.readthedocs.io/

Contributing to paidiverpy

Want to support or improve paidiverpy? Check out our contribution guide to learn how to get started.

Acknowledgements

This project was supported by the UK Natural Environment Research Council (NERC) through the Tools for automating image analysis for biodiversity monitoring (AIAB) Funding Opportunity, reference code UKRI052.

Release files for Paidiverpy 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Paidiverpy 0.3.1
File Size Uploaded
paidiverpy-0.3.1.tar.gz 23.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for Paidiverpy 0.3.1
File Interpreter ABI Platform
paidiverpy-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 MB

Release files / paidiverpy-0.3.1.tar.gz

Download URL paidiverpy-0.3.1.tar.gz
Size 23.5 MB
Tags Source
SHA-256 checksum
How to use checksums
aa329d5794daab2f4078c6afa39d8d213179af12db2c498a83f5ad64062bfe1d
BLAKE2b-256 checksum
How to use checksums
3ae03273b1de90cfa96e4f60bcb33d78cfddb8ac1ea89dc0873ea041bbac514d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / paidiverpy-0.3.1-py3-none-any.whl

Download URL paidiverpy-0.3.1-py3-none-any.whl
Size 150.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0425c9803f12ed701510d075ebf109d044c9d8dd6ccf4e405b994a2a27828329
BLAKE2b-256 checksum
How to use checksums
72fcda5560065e2e5f73aa2c9c97cf37100ebc0be25639663eef439830232245
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page