Skip to main content

A library to preprocess image data.

Project description

Paidiverpy

lifecycle License Documentation DOI Pypi

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:

    # ssh
    git clone git@github.com:paidiver/paidiverpy.git
    
    # 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)

Execute the package via the command line.

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

Docker

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

  1. Build the container locally:

    git clone git@github.com:paidiver/paidiverpy.git
    cd paidiverpy
    docker build -t paidiverpy .
  2. Pull from GitHub Container Registry (GHCR):

    docker pull ghcr.io/paidiver/paidiverpy:latest
    docker tag ghcr.io/paidiver/paidiverpy:latest paidiverpy:latest
  3. Pull from Docker Hub:

    docker pull soutobias/paidiverpy:latest
    docker tag soutobias/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>

## 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paidiverpy-0.1.4.tar.gz (31.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paidiverpy-0.1.4-py3-none-any.whl (127.9 kB view details)

Uploaded Python 3

File details

Details for the file paidiverpy-0.1.4.tar.gz.

File metadata

  • Download URL: paidiverpy-0.1.4.tar.gz
  • Upload date:
  • Size: 31.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for paidiverpy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1b08a196d807e0bc6a31ca42393b4319146fc435bb5ad4f941ebda1feb75700a
MD5 901086ac359832629a4deca97b88e410
BLAKE2b-256 2fd071d0cc54e5ee91fd13b3f122f592c8bdd349947e7fee992a18ca2167b1bc

See more details on using hashes here.

File details

Details for the file paidiverpy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: paidiverpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 127.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for paidiverpy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6bd06d3c2cdbdb158dda611aa5693b2fc778da5396dbc95f1ff7c951e87eacc6
MD5 d20f7f319946809684d8755275bc98cb
BLAKE2b-256 af995caf6680b1d34a4289a01b3356a30fc8f36d5c5190db3c9d948170320932

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page