Adaptive-Boxes
Python Library for rectangular decomposition of 2D binary images.
See the CUDA GPU version: adaptive-boxes-gpu
Quick Start
Install adabox from PiP:
pip install adaptive-boxes
Call adaptive-boxes library
from adabox import proc
from adabox.plot_tools import plot_rectangles, plot_rectangles_only_lines
Call others too:
import numpy as np
import matplotlib.pyplot as plt
Load data in .csv format. File should contain data with columns: [x1_position x2_position flag].
Initially, flag = 0 (See sample_data folder).
# Input Path
in_path = './sample_data/sample_2.csv'
# Load Demo data with columns [x_position y_position flag]
data_2d = np.loadtxt(in_path, delimiter=",")
If you want to see data, plot using:
# Plot demo data
plt.scatter(data_2d[:, 0], data_2d[:, 1])
plt.axis('scaled')
Decompose data in rectangles, it returns a list of rectangles and a separation value needed to plot them.
rectangles = []
# Number of random searches, more is better!
searches = 2
(rectangles, sep_value) = proc.decompose(data_2d, searches)
print('Number of rectangles found: ' + str(len(rectangles)))
Plot resulting rectangles
plot_rectangles(rectangles, sep_value)
or
plot_rectangles_only_lines(rectangles, sep_value)
Output
Adabox applied over: ./sample_data/ files. Click in the images to expand.
Hi-res images
File: sample_1.csv
File: sample_2.csv
Repo Content
Each folder contains the next information:
- data: Files with voxel information in Blender (
.plyextension) - proto: Prototype scripts
- results: Results of the heuristic process (
.jsonextension) - lib: library scripts
More info
Metadata
Release files for adaptive-boxes 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adaptive-boxes-0.0.4.tar.gz | 9.3 kB | Without provenance | Details for adaptive-boxes-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adaptive_boxes-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for adaptive_boxes-0.0.4-py3-none-any.whl |
Total release size: 19.2 kB
Release files / adaptive-boxes-0.0.4.tar.gz
| Download URL | adaptive-boxes-0.0.4.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8734c9b468347d42f8b50ecf5b11de96a322c5c16ffc2a9652539210bf12206
|
|
BLAKE2b-256 checksum How to use checksums |
a1ef7152a15d75e08a5df3c79c8ff870e4667880d47fdeb94b5d699c25ebcf79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
|
Release files / adaptive_boxes-0.0.4-py3-none-any.whl
| Download URL | adaptive_boxes-0.0.4-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5dd27465dcde77c08656b44915a8c72b615f24baedc363783b68aecae663d08
|
|
BLAKE2b-256 checksum How to use checksums |
0ba2a85de10bd21464888514025a7c6dc482754e2e5f532928af18ecb92e29d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
|
Security for adaptive-boxes 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.