πŸ‘©β€πŸ’» User guide#

πŸ“š Contents:

⬇️ Installation#

  1. Install scivision via PyPi: which tends to be the most user-friendly option:

    pip install scivision
    
  2. Install scivision from the source code:

    • Clone scivision source code:

      git clone https://github.com/alan-turing-institute/scivision.git
      
    • Install scivision and its dependencies:

      cd /path/to/my/scivision
      pip install -v -e .
      

πŸ”— Optional dependencies#

Scivision supports optional dependencies, which are not installed by default. These dependencies are required for certain functionality, such as loading models from certain sources, or loading certain types of data.

  • cloud_extra: install dependencies for loading data or models from cloud storage (e.g. AWS S3 and Google Cloud Storage)

To install the optional cloud_extra dependencies, run:

pip install scivision[cloud_extra]

πŸ“‹ Support table#

Python version

Scivision version

<3.7

no compatible version

^3.7

<0.4

^3.8

  • (any)

^3.9

  • (any)

^3.10

>=0.3

>=3.11

>=0.3, untested, but intending to support (bug reports welcome)

Scivision is currently working towards supporting Python >=3.11.

πŸ§ͺ Getting started#

Scivision enables users to quickly find computer vision models that can be run on matching scientific image dataset(s), or find datasets that models can be run on. This can be achieved by running several lines of Python code.

The core functionality of the Python package API is documented in the 🌟 API documentation and a Jupyter notebook demonstrating it can be found on GitHub or can be interactively run via clicking the following link to Binder:

badge

In brief, the notebook demonstrates the following:

  1. Loading a pretrained (ImageNet) model, which was previously added to the scivision catalog with the name β€œscivision-test-plugin”

    model = load_pretrained_model('/path/to/model/repo')

  2. Using the β€œdefault” scivision catalog to find a matching dataset, which the loaded model can be run on

    default_catalog.compatible_datasources(<model name>)

  3. Loading the dataset in a format the model can recognise

    load_dataset('/path/to/data/repo')

  4. Running the model on the data, performing simple model inference

    model.predict(<loaded data>)

πŸ“– Catalog of models and datasets#

The models and datasets you find when searching the β€œdefault” scivision catalog (that which comes with the package) are loaded from external sources via metadata included in the GitHub repository.

To understand how these external sources are configured for compatibility with scivision, consult the following sections of this documentation:

To understand how to contribute new models and data sources to the scivision catalog, check out: