Skip to main content

No project description provided

Project description

GitlabCIPipeline GitlabCICoverage Appveyor Pypi Downloads

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

kwimage-0.5.6-py2.py3-none-any.whl (157.6 kB view details)

Uploaded Python 2 Python 3

kwimage-0.5.6-cp37-cp37m-manylinux2010_x86_64.whl (698.2 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

kwimage-0.5.6-cp36-cp36m-manylinux2010_x86_64.whl (700.1 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

kwimage-0.5.6-cp35-cp35m-manylinux2010_x86_64.whl (690.7 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

kwimage-0.5.6-cp27-cp27mu-manylinux2010_x86_64.whl (720.0 kB view details)

Uploaded CPython 2.7mu manylinux: glibc 2.12+ x86-64

File details

Details for the file kwimage-0.5.6-py2.py3-none-any.whl.

File metadata

  • Download URL: kwimage-0.5.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 157.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for kwimage-0.5.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 78e96521121f572bf6f7f1bef15c52cc13c92631393500ba3f9d7b4b403f921b
MD5 3938b2dedea5a94a06e5db3eaedde462
BLAKE2b-256 3b47da4b828daa9bef910ef00815940dd5ad11f4f977c1af675f233101b10e5c

See more details on using hashes here.

File details

Details for the file kwimage-0.5.6-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: kwimage-0.5.6-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 698.2 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for kwimage-0.5.6-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 023d0102e80023f345bc8ebb0437c9599957dfd1ba61f9a36d3e2c6816145d0d
MD5 1c30d64b6ec40eaa51cd6e35be2e92c1
BLAKE2b-256 01899b3fd5f58d4eff4c7bcd04770c0c3c2b226b2aec88d8f3af4ead83d09414

See more details on using hashes here.

File details

Details for the file kwimage-0.5.6-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: kwimage-0.5.6-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 700.1 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.10

File hashes

Hashes for kwimage-0.5.6-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2d90dd3383e83c81320094360a75e37b1e81a18431c4675a3fc460a127f62c19
MD5 585d11733a6ffcaafe0a2f2384f715f2
BLAKE2b-256 ac60b839a9cffbcae76d1b090cde9dee4167da9b8751d40f3918e76fa47fb0ea

See more details on using hashes here.

File details

Details for the file kwimage-0.5.6-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: kwimage-0.5.6-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 690.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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.5.9

File hashes

Hashes for kwimage-0.5.6-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ccf77e2cb24f579a5cc6a6e99f6cceb9a386acc02b650b7b0a8cea60d395ff42
MD5 c979076a29deecf9e07239ee02b7d248
BLAKE2b-256 15cb0c9f65b28c6f317172779e7d09de403f52582625f878d9290a11e8be5e6b

See more details on using hashes here.

File details

Details for the file kwimage-0.5.6-cp27-cp27mu-manylinux2010_x86_64.whl.

File metadata

  • Download URL: kwimage-0.5.6-cp27-cp27mu-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 720.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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.17

File hashes

Hashes for kwimage-0.5.6-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3d33e58007074f89135c50ef9a38470ca4815cddd60aa60a81d40c6027aca6cb
MD5 0c0121f6adcd0c98cd7f8880239b434a
BLAKE2b-256 1dec248166603e0e0edb4f5102fb5fc28dedd9960aede43218b0d4938dd7b424

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page