Skip to main content

NWF for computer vision - ConvVAE, pretrained encoders, continual learning

Project description

nwf-vision

PyPI version Python 3.9+ Tests License: MIT

NWF for computer vision: ConvVAE, pretrained encoders, continual learning on images.

Installation

pip install nwf-vision
# Requires: nwf-core, torch, torchvision

Quick start

from nwf.vision import ConvVAEEncoder
from nwf import Charge, Field
import numpy as np

enc = ConvVAEEncoder(input_shape=(3, 32, 32), latent_dim=64)
enc.fit(images, epochs=10)

z, sigma = enc.encode(images[:5])
field = Field()
for i in range(5):
    field.add(Charge(z=z[i], sigma=sigma[i]), labels=[labels[i]])

Components

  • ConvVAEEncoder - convolutional VAE for images (CIFAR, MNIST)
  • PretrainedVisionEncoder - ResNet/EfficientNet + (z, sigma) head
  • Examples: Split-CIFAR-10, OOD detection, active learning

Run example

pip install nwf-core nwf-vision
python examples/split_cifar.py --epochs 5

Note: if you have nwf-research in PYTHONPATH, it may shadow nwf-core. Use a clean env or install nwf-core in development mode.

License

MIT

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

nwf_vision-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

nwf_vision-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file nwf_vision-0.1.0.tar.gz.

File metadata

  • Download URL: nwf_vision-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for nwf_vision-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b68e9aed380e54df60d1ecedb37e09792288f815abffdd360b64063485a9817
MD5 b9a741c94e0a77c2b12e96a4ded17e58
BLAKE2b-256 16c5ff157984528e5add4a12b415606cbec372766d6663f15c06fcfc90e31890

See more details on using hashes here.

File details

Details for the file nwf_vision-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nwf_vision-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for nwf_vision-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70747dc52fa616eadaef884aa0432baa7b4749f29023bcc6b1e695ca83c7318c
MD5 a509ceab30503f1cf72eae9e46464c92
BLAKE2b-256 8908ab884fcc2869cf9c00a1a075e469aba48d9057114747bfaec2ba3f85ef08

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