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,)
NOTE: THE KWIMAGE STRUCTS WILL EVENTUALLY MOVE TO THE KWANNOT REPO
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.2-py2.py3-none-any.whl
.
File metadata
- Download URL: kwimage-0.5.2-py2.py3-none-any.whl
- Upload date:
- Size: 150.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a1c0716e9c4a606bed6fabe4f457d8a72e1be13e46d28fe5c55beb63a2ea66b |
|
MD5 | 997c8fa2c644f07f07ee0a3311840325 |
|
BLAKE2b-256 | e1b4598a501c23e36cf3e5dc8fdf8957981718a0f462163e1b467909471b0808 |
File details
Details for the file kwimage-0.5.2-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.2-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 691.1 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a810ebd9121627bc3f064011c76f3c577cbac6cdffbb85dc0abea3e20e9610f |
|
MD5 | be846d3af3c92ea401267c948f06fb77 |
|
BLAKE2b-256 | 48730489569256d3b2a985d001fd80a56bcba62cec0bacf9d61d3bbadebc0fc3 |
File details
Details for the file kwimage-0.5.2-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.2-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 693.1 kB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c78401bbda94e8761ace9988e1416989c8a0461f770759584cab5c865c09074 |
|
MD5 | ce6531aa3a0baf034d2bcf31af7faa08 |
|
BLAKE2b-256 | 5c4d257cb4b7c7474a67ba6ace2a24b2157588dc1f9ac14c3f7e8dcee2e89623 |
File details
Details for the file kwimage-0.5.2-cp35-cp35m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.2-cp35-cp35m-manylinux2010_x86_64.whl
- Upload date:
- Size: 683.7 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.39.0 CPython/3.5.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3810d489f1d4aebd4650dc2a561b54bc4cd4c058eefe183b72b7f29e985b831e |
|
MD5 | 88191627d61758852f4c867893aca1cd |
|
BLAKE2b-256 | 585f927fa974f327fbac9b2c504f9d562fb45f66f4a2c983feb7d03dbef332ef |
File details
Details for the file kwimage-0.5.2-cp27-cp27mu-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kwimage-0.5.2-cp27-cp27mu-manylinux2010_x86_64.whl
- Upload date:
- Size: 713.0 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.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/2.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050de4a2ad7e0817632c429e97a029d74b5ffc3125510299201e82709941936a |
|
MD5 | 5e707c2f29db32aafda8f009240daa15 |
|
BLAKE2b-256 | 8958dc6917125e24417970901e5ba11f4c5a7f63315341cf66a3555b210b2289 |