π©βπ» User guide#
π Contents:
β¬οΈ Installation#
Install scivision via PyPi: which tends to be the most user-friendly option:
pip install scivision
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 |
|
^3.9 |
|
^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:
In brief, the notebook demonstrates the following:
- 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')
- Using the βdefaultβ scivision catalog to find a matching dataset, which the loaded model can be run on
default_catalog.compatible_datasources(<model name>)
- Loading the dataset in a format the model can recognise
load_dataset('/path/to/data/repo')
- 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: