Blended tiling with Numpy
Project description
blended-tiling-numpy
This library is adapted from https://github.com/ProGamerGov/blended-tiling to work with numpy arrays. All credit for design goes to Ben Egan. Basic functionality works, but there may be edge errors.
This library adds support for splitting NCHW tensor inputs like images & activations into overlapping tiles of equal size, and then blending those overlapping tiles together after they have been altered.
This tiling solution is intended for situations where one wishes to render / generate outputs that are larger than what their computing device can support. Tiles can be separately rendered and periodically blended together to maintain tile feature coherence.
Setup:
Installation Requirements
- Python >= 3.6
- Numpy
Installation via pip:
pip install blended-tiling-numpy
Dev / Manual install:
git clone https://github.com/rymuelle/blended-tiling-numpy
cd blended-tiling-numpy
pip install -e .
# Notebook installs also require appending to environment variables
# import sys
# sys.path.append('/content/blended-tiling-numpy')
Documentation
TilingModule
The base blended tiling module.
blended_tiling_numpy.TilingModule(tile_size=(224, 224), tile_overlap=(0.25, 0.25), base_size=(512, 512))
Initialization Variables
tile_size(int or tuple of int): The size of tiles to use. A single integer to use for both the height and width dimensions, or a list / tuple of dimensions with a shape of:[height, width]. The chosen tile sizes should be less than or equal to the sizes of the full NCHW tensor (base_size).tile_overlap(int or tuple of int): The amount of overlap to use when creating tiles. A single integer to use for both the height and width dimensions, or a list / tuple of dimensions with a shape of:[height, width]. The chosen overlap percentages should be in the range [0.0, 0.50] (0% - 50%).base_size(int or tuple of int): The size of the NCHW tensor being split into tiles. A single integer to use for both the height and width dimensions, or a list / tuple of dimensions with a shape of:[height, width].
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blended_tiling_numpy-0.0.1.dev7.tar.gz.
File metadata
- Download URL: blended_tiling_numpy-0.0.1.dev7.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23663e4afb944b52f8edbe1fca853f51df8cf7b60dff7f53b7aec7ea3a6eec98
|
|
| MD5 |
331104004f3792374435d8fb03b8c431
|
|
| BLAKE2b-256 |
a8cd8ed06e3a2cbca3a9119b4f11df79c18e84095fe1c368fbf5e2cf9d5b12e0
|
File details
Details for the file blended_tiling_numpy-0.0.1.dev7-py3-none-any.whl.
File metadata
- Download URL: blended_tiling_numpy-0.0.1.dev7-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00feba31ebc307bf722fed338aa15253a432598566ee1f5104280f7903687b6f
|
|
| MD5 |
9b3a4bd65182cb1f7d33f548d38bb8b7
|
|
| BLAKE2b-256 |
d7aaf8edf266317e93eec97d3f6a8d583c7497230c86b792a7f7621a2957f7e3
|