Skip to main content

Scivision

Project description

Continuous integration status badge Documentation status badge PyPI badge All Contributors Licence badge (BSD 3 Clause) DOI

If you are new to Scivision, start with the website.

The Scivision project is building:

  • A community of computer vision practitioners in the sciences and humanities (join the community on Slack)

  • A catalog of community-curated computer vision models and datasets from the sciences and humanities

  • A software ecosystem of interoperable tools and utilities for working with computer vision models and data, including:

    • Scivision.Py, a Python package for conveniently downloading and using the computer vision models and datasets from Python (Scivision on PyPI)
    • Pixelflow, a tool for extracting information about the characteristics of objects in images

    Example use cases for these tools can be found in the gallery of notebooks using Scivision models and datasets

The Scivision project was founded by the Alan Turing Institute.

Repository contents

This main project repository on GitHub hosts

  • development of the Python package (in the root directory)
  • development of the website (in frontend)
  • the documentation sources (in docs)

Get involved

Submit a bug or feature request here.

If you would like a link to a model or datasource to be listed in the catalog, such a contribution would be gratefully received. These can be submitted through the Scivision website. See the Contributing Guide for more details on how to format your model / data.

Pull requests for code changes are also welcome.

Getting Started with Scivision.Py

A quick overview of using the Scivision.Py python package.

Install Scivision.Py

$ pip install scivision

Load a Scivision model

from scivision import load_pretrained_model

resnet18 = load_pretrained_model(
    # The model URL
    "https://github.com/alan-turing-institute/scivision_classifier",

    # A Scivision model can contain several variants -- below we select the one to use
    model_selection='resnet18',

    # Allow the model and its dependencies to be installed if they are not already
    # (including tensorflow in this example)
    allow_install=True
)

We can give an image as input to the model. Any image data compatible with numpy (an 'Array_like') is accepted. We can obtain some image data by loading a Scivision datasource.

Load a Scivision datasource

from scivision import load_pretrained_model

dataset = load_dataset('https://github.com/alan-turing-institute/scivision-test-data')

# 'dataset' provides several named arrays.  This datasource provides one named 'test_image':
# the keys can be looked up with `list(dataset)` (or by consulting the datasource documentation)
#
test_image = dataset['test_image'].read()

Optionally, inspect the image (with matplotlib, for example):

import matplotlib.pyplot as plt

plt.imshow(test_image)

Image showing test_image (a picture of a Koala)

Run a Scivision model

resnet18.predict(test_image)

Output: koala : 99.78%

Query the model and datasource catalogs

from scivision import default_catalog

# The datasource catalog as a Pandas dataframe
default_catalog.datasources.to_dataframe()

# Similarly for the model catalog
default_catalog.models.to_dataframe()

Output:

name description tasks url pkg_url format scivision_usable pretrained labels_required institution tags
0 stardist Single class object detection and segementation of star-convex polygons (<TaskEnum.object_detection: 'object-detection'>, <TaskEnum.segmentation: 'segmentation'>) https://github.com/stardist/stardist git+https://github.com/stardist/stardist.git@master image False True True ('epfl',) ('2D', '3D', 'optical-microscopy', 'xray', 'microtomography', 'cell-counting', 'plant-phenotyping', 'climate-change-and-agriculture')
1 PlantCV Open-source image analysis software package targeted for plant phenotyping (<TaskEnum.segmentation: 'segmentation'>, <TaskEnum.thresholding: 'thresholding'>, <TaskEnum.object_detection: 'object-detection'>) https://github.com/danforthcenter/plantcv git+https://github.com/danforthcenter/plantcv@main image False True True ('danforthcenter',) ('2D', 'hyperspectral', 'multispectral', 'near-infrared', 'infrared', 'plant-phenotyping', 'climate-change-and-agriculture')

The catalogs are browsable online:

Contributors

Thanks goes to these wonderful people (emoji key):

Aida Mehonic
Aida Mehonic

📋 📖 🤔
Alan R Lowe
Alan R Lowe

💻 🤔 📖 🚇 🔍
Alden Conner
Alden Conner

🤔 📖 🎨 📋 📣 📆
Alejandro ©
Alejandro ©

💻 🤔 🎨 💡
Beatriz Costa Gomes
Beatriz Costa Gomes

💻 🤔 📖 🎨 💡
Ben Evans
Ben Evans

🤔
Ed Chalstrey
Ed Chalstrey

💻 🤔 📖 🚇
Eriol Fox
Eriol Fox

🤔 🎨
Evangeline Corcoran
Evangeline Corcoran

💻 🤔 📖 🚇
Isabel Fenton
Isabel Fenton

💻 🤔 📖 🚇
James Parkhurst
James Parkhurst

🤔 🔣 🔌
JamesAliScott
JamesAliScott

🤔 🔣
Kasra Hosseini
Kasra Hosseini

💻 🤔 📖 🚇
Martin Rogers
Martin Rogers

🔣 💡 💻 🤔
Miquel Massot
Miquel Massot

💻 🤔 📖 🔌
Robert Blackwell
Robert Blackwell

🤔
Samuel Tonks
Samuel Tonks

💻 🤔 📖 🚇
Scott Hosking
Scott Hosking

🔍 🤔
Seb Hickman
Seb Hickman

💡 📢
louisavz
louisavz

🤔 📣 📝
nbarlowATI
nbarlowATI

🤔 📋 💡
ots22
ots22

💻 🤔 📖 🚇
pwochner
pwochner

🤔 📋 💡
vimode
vimode

🤔 🎨 💻 ️️️️♿️

This project follows the all-contributors specification. Contributions of any kind welcome!

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

scivision-0.7.3.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

scivision-0.7.3-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file scivision-0.7.3.tar.gz.

File metadata

  • Download URL: scivision-0.7.3.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for scivision-0.7.3.tar.gz
Algorithm Hash digest
SHA256 ee5196644978b7ecd6e3b76237110deda10b92d1464f9853bcf7a05ac0531fff
MD5 0d4b8acd5fe3e1887b589f3b9ee41245
BLAKE2b-256 2592470031a89f3e961e02832dc12fd9a4e0164a6d94d94dc15c085fa20517a0

See more details on using hashes here.

File details

Details for the file scivision-0.7.3-py3-none-any.whl.

File metadata

  • Download URL: scivision-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for scivision-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6fd2ca6554bdca819228ad1e0a9c489fd661995bcce122b6994558df2c5739f0
MD5 47713783d994d43725ef79766f4cdde3
BLAKE2b-256 ca371b8dbf43cf4c354b74ffd069de455a6373a3eaf5ebb87d42e21fe2f4be1f

See more details on using hashes here.

Supported by

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