Skip to main content

Pixelist 🎨

PyPI version Python 3.8+ License: MIT

A powerful, composable image processing pipeline library for Python that makes working with image filters fun and flexible! 🚀

✨ Features

  • 🔄 Sequential and parallel image processing pipelines
  • 🎯 Easy-to-use filter composition
  • 📊 Built-in visualization support
  • 🛡️ Type-safe with Pydantic validation
  • 🎨 Support for both grayscale and color images
  • 📝 Comprehensive processing history tracking

🚀 Installation

# Basic installation
pip install pixelist

# With visualization support
pip install pixelist[display]

🎯 Quick Start

Here's a simple example to get you started:

from pixelist import ImagePipeline, Filter, ProcessingMode
import numpy as np

# Define some filters
@Filter.make
def threshold(image: np.ndarray) -> np.ndarray:
    return np.where(image > 127, 255, 0)

@Filter.make
def blur(image: np.ndarray) -> np.ndarray:
    return cv2.GaussianBlur(image, (5, 5), 0)

# Create and run a pipeline
pipeline = ImagePipeline([blur, threshold])
results = pipeline.run(
    images=your_image,
    mode=ProcessingMode.WITH_INTERMEDIATE_SHOW_ALL
)

🌟 Advanced Usage

Parallel Processing

If you want to experiment with two probable fits in your workflow, make a parallel workflow between those two! Sequential steps after that parallel step would also run on all previous branches without joining the branches. There might be parallel join, or sql like syntax later on for a fine-grain control on batches, but for now, its as simple as that!

# Create parallel branches in your pipeline
pipeline = ImagePipeline([
    histogram_stretch,
    (prewitt_filter, laplacian_filter)  # Parallel filters
])

Custom Filter Creation

@Filter.make
def my_awesome_filter(image: np.ndarray) -> np.ndarray:
    # Your image processing magic here
    return processed_image

🎨 Visualization

The library includes built-in visualization support:

from pixelist import ImagePipeline, ProcessingMode

pipeline.make(
    images=input_images, # can be a random sample of your dataset
    filters=[
        histogram_stretch # Sequential
        (prewitt_filter, laplacian_filter) # Superposition/Parallel, follows to parallel branches
    ]
    mode=ProcessingMode.WITH_INTERMEDIATE_SHOW_ALL  # Shows and store all intermediate steps,
)

Output Diagram

🛠️ Processing Modes

  • NO_INTERMEDIATE: Just the final result
  • NO_INTERMEDIATE_SHOW_FINAL: Show final result visually
  • WITH_INTERMEDIATE: Keep all intermediate results
  • WITH_INTERMEDIATE_SHOW_ALL: Visual display of all steps
  • WITH_INTERMEDIATE_SHOW_FINAL: Keep all, show final

Final Images are Orange (Leafs of Workflow)

Workflow Diagram

🤝 Contributing

Contributions are welcome! Feel free to:

  • Open issues
  • Submit PRs
  • Suggest improvements
  • Share the love ❤️

📝 License

MIT License - feel free to use in your projects!

🙏 Acknowledgments

Special thanks to:

  • The NumPy and OpenCV communities
  • All our contributors

Made with ❤️ by the AARMN The Limitless

Remember to ⭐ the repo if you like it!

Metadata

Release files for pixelist 0.2.3

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

Source distribution (sdist)

Source distribution for pixelist 0.2.3
File Size Uploaded
pixelist-0.2.3.tar.gz 11.7 kB Details

Built distribution (wheel)

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

Total release size: 21.9 kB

Release files / pixelist-0.2.3.tar.gz

Download URL pixelist-0.2.3.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a814252ea42554403635bc52317a83f518c7ad4796760e093e74160da5bf7242
BLAKE2b-256 checksum
How to use checksums
4357c9e75fbd3011e0050c1bebe6e2f6b284c9ddaf337d328e0aa72cbcf27cf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release files / pixelist-0.2.3-py3-none-any.whl

Download URL pixelist-0.2.3-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74514f2e03c01c86aa17c4089152950d1010a005db40e33acdba11305c334439
BLAKE2b-256 checksum
How to use checksums
73dd77d692f2c9f9a3c2e2137a3559f930ee785ae0755c4daf4376b38ec23ea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

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