Metadata-Version: 2.4
Name: nwf-vision
Version: 0.1.0
Summary: NWF for computer vision - ConvVAE, pretrained encoders, continual learning
Author: Belousov Roman Sergeevich
License: MIT
Project-URL: Homepage, https://github.com/romero19912017-ui/nwf-vision
Project-URL: Repository, https://github.com/romero19912017-ui/nwf-vision
Project-URL: Documentation, https://romero19912017-ui.github.io/nwf-vision/
Keywords: nwf,vision,continual-learning,vae,cifar
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: nwf-core>=0.2.1
Requires-Dist: numpy>=1.21
Requires-Dist: torch>=1.10
Requires-Dist: torchvision>=0.11
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Provides-Extra: all
Requires-Dist: nwf-vision[dev]; extra == "all"

# nwf-vision

[![PyPI version](https://badge.fury.io/py/nwf-vision.svg)](https://pypi.org/project/nwf-vision/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![Tests](https://github.com/romero19912017-ui/nwf-vision/actions/workflows/test.yml/badge.svg)](https://github.com/romero19912017-ui/nwf-vision/actions/workflows/test.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

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

## Installation

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

## Quick start

```python
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

```bash
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
