A pure python library that implements abstraction of data.
Project description
pyrebel
A pure python library that implements abstraction of data.
Installation
From PyPI
python3 -m pip install --upgrade pyrebel
From source
git clone https://github.com/ps-nithin/pyrebel
cd pyrebel
python3 -m pip install .
Running demo programs
Demo programs are found in 'demo/' directory.
cd demo/
1. Image abstraction demo
Usage:
python3 pyrebel_main.py --input <filename.png>
Optional arguments
--threshold <value> Selects the threshold of abstraction. Defaults to 5.
For example,
python3 pyrebel_main.py --input images/abc.png --threshold 10
The output is written to 'output.png'
2. Edge detection demo
This is a demo of edge detection achieved using data abstraction.
python3 pyrebel_main_edge.py --input <filename>
For example,
python3 pyrebel_main_edge.py --input images/wildlife.jpg
The output is written to 'output.png'.
Below is a sample input image,
Below is the output image,
3. Pattern recognition demo
This is a demo of pattern recognition achieved using data abstraction.
- Learning
Usage:
python3 pyrebel_main_learn.py --learn /path/to/image/directory/
For example runningpython3 pyrebel_main_learn.py --learn images/train-hand/learns all the images in the directory and links the filename with the signatures. - Recognition
Usage:
python3 pyrebel_main_learn.py --recognize <filename>
For example runningpython3 pyrebel_main_learn.py --recognize images/recognize.pngdisplays the symbols recognized in the file 'images/recognize.png'.
To reset the knowledge base just delete file 'know_base.pkl' in the current working directory. The program expects a single pattern in the input image. Otherwise, a pattern has to be selected by changing variable 'blob_index' accordingly.
Docs here
Read more about abstraction here
Let the data shine!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyrebel-1.0.4.tar.gz.
File metadata
- Download URL: pyrebel-1.0.4.tar.gz
- Upload date:
- Size: 47.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1122d5a4865834f9afe4255a681e6c860f6711ebc3c7e0dbd74dee27a468d1b1
|
|
| MD5 |
7bbddabe07e19b0f2b10a89a90677e4e
|
|
| BLAKE2b-256 |
fe5f479dbabc908d6d95835abc914e26268b334b11d0a4c98272fdd116e8d7aa
|