Skip to main content

Eqxvision

PyPI Github GitHub Release Date GitHub

Eqxvision is a package of popular computer vision model architectures built using Equinox.

Installation

Use the package manager pip to install eqxvision.

pip install eqxvision

requires: python>=3.7

optional: torch, only if pretrained models are required.

Documentation

Available at https://eqxvision.readthedocs.io/en/latest/.

Usage

Picking a model and doing a forward pass is as simple as ...

    import jax
    import jax.random as jr
    import equinox as eqx
    from eqxvision.models import alexnet
    from eqxvision.utils import CLASSIFICATION_URLS
    
    
    @eqx.filter_jit
    def forward(net, images, key):
        keys = jax.random.split(key, images.shape[0])
        output = jax.vmap(net, axis_name=('batch'))(images, key=keys)
        ...
        
    net = alexnet(torch_weights=CLASSIFICATION_URLS['alexnet'])
    
    images = jr.uniform(jr.PRNGKey(0), shape=(1,3,224,224))
    output = forward(net, images, jr.PRNGKey(0))

What's New?

  • FCN, DeepLabV3 and LRASPP added as new image segmentation models.
  • Backward incompatible changes to v0.2.0 for loading a pretrained model.
  • Almost all image classification models are ported from torchvision.
  • New tutorial for generating adversarial examples and others coming soon.

Get Started!

Start with any one of these easy to follow tutorials.

Tips

  • Better to use @equinox.filter_jit instead of @jax.jit.
  • Use jax.{v,p}map with axis_name='batch' when using models that use batch normalisation.
  • Don't forget to switch to inference mode for evaluations. (model = eqx.tree_inference(model))
  • Initialise Optax optimisers as optim.init(eqx.filter(net, eqx.is_array)). (See here.)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Development Process

If you plan to modify the code or documentation, please follow the steps below:

  1. Fork the repository and create your branch from dev.
  2. If you have modified the code (new feature or bug-fix), please add unit tests.
  3. If you have changed APIs, update the documentation. Make sure the documentation builds. mkdocs serve
  4. Ensure the test suite passes. pytest tests -vvv
  5. Make sure your code passes the formatting checks. Automatically checked with a pre-commit hook.

Acknowledgements

License

MIT

Metadata

Release files for eqxvision 0.2.8

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

Source distribution (sdist)

Source distribution for eqxvision 0.2.8
File Size Uploaded
eqxvision-0.2.8.tar.gz 44.3 kB Details

Built distribution (wheel)

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

Total release size: 111.0 kB

Release files / eqxvision-0.2.8.tar.gz

Download URL eqxvision-0.2.8.tar.gz
Size 44.3 kB
Tags Source
SHA-256 checksum
How to use checksums
59ee613259dbc7ac52fef23108c93f15b4d909abeed11d2c7e599eb3ea2f89de
BLAKE2b-256 checksum
How to use checksums
b9c5743c0b1b6c884b22f662eeed0f3d0eeea562e8f00c302200a7830237f737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / eqxvision-0.2.8-py3-none-any.whl

Download URL eqxvision-0.2.8-py3-none-any.whl
Size 66.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c45a4418c73a53ec23ec1ed3c33ea28443e3d7a86aba2d25adb6ca6c5e1a7163
BLAKE2b-256 checksum
How to use checksums
ce54fc9189d29fdf6403e64cf67989e9be640783eddb7ccc6dc1f84964db0acc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

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

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

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