semvec/pypi-packages huggingface dataset:
gistqd 0.1.2
A simple CLICK application to style images using palettes or just raw transformations
License: MIT
Requires Python: >=3.13

[![Static Badge](https://img.shields.io/badge/pip-gistqd-blue)](https://pypi.org/project/gistqd/)

`gistqd` is a simple python CLI tool created to apply retro color effects on images with custom palettes or without them. Currently the following transformations are possible:

- ordered dithering – styles image with grid to reduce number of colors to 8
- quantization – reduces number of colors

# Example results

![quatize](https://raw.githubusercontent.com/gigsoll/image-processor/refs/heads/main/images/kyiv_poster.jpg)
![dithering](https://raw.githubusercontent.com/gigsoll/image-processor/refs/heads/main/images/dragon_poster.jpg)

# Usage

## General use of the program

```sh
Usage: python -m cli [OPTIONS] IMAGEPATH COMMAND [ARGS]...

Options:
  -c, --config PATH  path to the config in the file system
  --help             Show this message and exit.

Commands:
  dither    dither image, reducing number of colors to 8 with pattern
  quantize  basically reduce number of colors according to a pallete or...
```

## Dithering options

```sh
Usage: python -m cli IMAGEPATH dither [OPTIONS]

  dither image, reducing number of colors to 8 with pattern

Options:
  -b, --basic              use dithering without color palette
  -p, --palette TEXT       name of the palette from palette folder
  -g, --grid-size INTEGER  size of the grid for dithering, avalible sizes are:
                           2, 4, 8
  --help                   Show this message and exit.
```

## Quantization options

```sh
Usage: python -m cli IMAGEPATH quantize [OPTIONS]

  basically reduce number of colors according to a pallete or number of colors

Options:
  -b, --basic             use automatic colors without color palette
  -p, --palette TEXT      name of the palette from palette folder
  -n, --n-colors INTEGER  number of colors in resulting image
  --help                  Show this message and exit.
```
kde-classifier 0.1.0
Kernel Density Estimation classifier with scikit-learn style API, based on Yang Liu et al. (2020).
License: MIT
Requires Python: >=3.9

# KDEClassifier

A pip-installable distribution of KDEClassifier introduced by:  
Yang Liu, Hongxia He, Zhi-Xiong Xiao, Anquan Ji, Jian Ye, Qifan Sun, Yang Cao.  
See: [https://pubmed.ncbi.nlm.nih.gov/33313714/](https://pubmed.ncbi.nlm.nih.gov/33313714/)

Code adapted from: [http://cao.labshare.cn/KDEClassifier/index.html](http://cao.labshare.cn/KDEClassifier/index.html)

This repository provides two implementations:

* **`kde_classifier.KDEClassifier`** — An enhanced version of the original implementation; vectorized and sklearn-compatible.
* **`tests/KDEClassifier_orig.py`** — the original reference implementation (kept for comparison and tests).

---


## Installation
```bash
pip install kde-classifier
```

## Usage example

```python
from kde_classifier import KDEClassifier

clf = KDEClassifier(mybandwidth=0.7)
clf.fit(X_train, y_train)
probs = clf.predict_proba(X_test)
preds = clf.predict(X_test)
```

`predict_proba` always returns a 2-D array shaped `(n_samples, n_classes)` (even when `n_samples==0`).

---


## Tests

A pytest test file is provided under `tests/` that compares the original implementation with the new one on synthetic datasets. Run tests with:

```bash
pytest -q
```

---