No project description provided
Project description
The kwimage module handles low-level image operations at a high level.
The kwimage module builds on kwarray and provides tools commonly needed when addressing computer vision problems. This includes functions for reading images, non-maximum-suppression, image warp transformations, and run-length-encoding.
The top-level API is:
from .algo import (available_nms_impls, daq_spatial_nms, non_max_supression,)
from .im_alphablend import (ensure_alpha_channel, overlay_alpha_images,
overlay_alpha_layers,)
from .im_core import (atleast_3channels, ensure_float01, ensure_uint255,
make_channels_comparable, num_channels,)
from .im_cv2 import (convert_colorspace, draw_boxes_on_image,
draw_text_on_image, gaussian_patch, imscale, imresize,)
from .im_demodata import (grab_test_image, grab_test_image_fpath,)
from .im_io import (imread, imwrite,)
from .im_runlen import (decode_run_length, encode_run_length, rle_translate,)
from .im_stack import (stack_images, stack_images_grid,)
from .structs import (Boxes, Coords, Detections, Heatmap, Mask, MaskList,
MultiPolygon, Points, PointsList, Polygon, PolygonList,
smooth_prob,)
from .util_warp import (subpixel_accum, subpixel_align, subpixel_getvalue,
subpixel_maximum, subpixel_minimum, subpixel_set,
subpixel_setvalue, subpixel_slice, subpixel_translate,
warp_points, warp_tensor,)
The most notable feature of the kwimage module are the kwimage.structs objects. This includes the primitive Boxes, Mask, and Coords objects, The semi-primitive Points, Polygon structures, and the composite Heatmap and Detections structures (note: Heatmap is just a composite of array-like structures).
The primitive and semi-primitive objects store and manipulate annotation geometry, and the composite structures combine primitives into a single object that jointly manipulates the primitives using warp operations.
The Detections structure is a meta-structure that associates the other more primitive components, and allows a developer to compose them into something that represents objects of interest. The details of this composition are left up to the end-application.
The Detections object can also be “rasterized” and converted into a Heatmap object, which represents the same information, but is in a form that is more suitable for use when training convolutional neural networks. Likewise, the output of neural networks can be directly encoded in a kwimage.Heatmap object. The Heatmap.detect method can then be used to convert the dense heatmap representation into a spare Detections representation that is more suitable for use in an object-detection system. We note that the detect function is not a special detection algorithm. The detection algorithm (which is outside the scope of kwimage) produces the heatmap, and the detect method effectively “inverts” the rasterize procedure of Detections by finding peaks in the heatmap, and running non-maximum suppression.
This module contains data structures for image annotation primitives:
Boxes
Mask
Coords
And composites of these primitives:
Detections
Polygon
MultiPolygon
PolygonList
MaskList
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 Distributions
Built Distributions
File details
Details for the file kwimage-0.5.1-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.1-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 671.0 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cff6a823f7a303847597fefbd081457d246712162e5a5d44990f864a81289cb1 |
|
MD5 | 427e71084275325964b814a631dbc99c |
|
BLAKE2b-256 | ad65c19aa33369a62eae0f14ab1980f9d81bc228779d1b4e9afc700e1511530b |
File details
Details for the file kwimage-0.5.1-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.1-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 672.9 kB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b83eeaccd81e8ef17309ae130753d96c27f0b715668c45f240e0f01903b9c130 |
|
MD5 | 1e69746d6a7012ecda5742dcbdaae93c |
|
BLAKE2b-256 | fa94d0215c67be74aabaf893399a0cb406ed93b60e055ca89ba3fe8acd292ccd |
File details
Details for the file kwimage-0.5.1-cp35-cp35m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.1-cp35-cp35m-manylinux2010_x86_64.whl
- Upload date:
- Size: 663.5 kB
- Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.5.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c673fa057ca3400e6c3e34e85d2d96e8857690f3c00353f216604cfd5442767 |
|
MD5 | fa6988ddfe1db0c52fd467fd8bfc8dc7 |
|
BLAKE2b-256 | bb9e50164c3e299d89078011cfba994603247f853f57a86ed90876acca9162e3 |
File details
Details for the file kwimage-0.5.1-cp27-cp27mu-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.1-cp27-cp27mu-manylinux2010_x86_64.whl
- Upload date:
- Size: 692.8 kB
- Tags: CPython 2.7mu, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/2.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02802984ba9b727497fea68d0e4516156bdcb36e8ed316cba407cb22a2e70f8d |
|
MD5 | aeb7bd401382d530ccd30309511fb8f8 |
|
BLAKE2b-256 | 4537360081be608373efde8314bc469f334b8d8ce2da48da2bbb1ce89047d293 |