Skip to main content

No project description provided

Project description

GitlabCIPipeline GitlabCICoverage Appveyor Pypi Downloads ReadTheDocs

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.

Read the docs at: http://kwimage.readthedocs.io/en/master/

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 three image annotation primitives:

  • Boxes # technically this could be made out of Coords and renamed to VectorCoords

  • Mask # likewise this could be renamed to RasterCoords

  • Coords #

These primative structures are used to define these metadata-containing composites:

  • Detections

  • Polygon

  • Heatmap

  • MultiPolygon

  • PolygonList

  • MaskList

All of these structures have a self.data attribute that holds a pointer to the underlying data representation.

Some of these structures have a self.format attribute describing the underlying data representation.

Most of the compositie strucutres also have a self.meta attribute, which holds user-level metadata (e.g. info about the classes).

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.6.2-py2.py3-none-any.whl (171.4 kB view details)

Uploaded Python 2 Python 3

kwimage-0.6.2-cp38-cp38-manylinux2010_x86_64.whl (723.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

kwimage-0.6.2-cp37-cp37m-manylinux2010_x86_64.whl (712.5 kB view details)

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

kwimage-0.6.2-cp36-cp36m-manylinux2010_x86_64.whl (714.3 kB view details)

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

kwimage-0.6.2-cp35-cp35m-manylinux2010_x86_64.whl (704.5 kB view details)

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

kwimage-0.6.2-cp27-cp27mu-manylinux2010_x86_64.whl (735.5 kB view details)

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

File details

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

File metadata

  • Download URL: kwimage-0.6.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 171.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for kwimage-0.6.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 45dd83ae0503fb47612b4d193e0a6badaa8c0e3e2605374caa1ed92cc30e0bba
MD5 661895f786457a1ca047f4424457f908
BLAKE2b-256 6d518929970463d7f9e0adc98f211037d146de4fcba0d83071175e0f65844ede

See more details on using hashes here.

File details

Details for the file kwimage-0.6.2-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: kwimage-0.6.2-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 723.0 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for kwimage-0.6.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8d7af5605f64b8458d2d484216918017c429751c6410f855b4ecfba67be0fa37
MD5 7101d8ca7cf24080357aeaa2dafd1d87
BLAKE2b-256 b9766876a413657b4014312adc1716fc4959b9a15c1bf3afe3ebf6a78bc9b328

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.2-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 712.5 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.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for kwimage-0.6.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 11638ad2c9212c4fc26a0b8e66fe6c617339a92db5f4bb2b9b6491049aa1882b
MD5 41e492679de15950f5960893ba090ff3
BLAKE2b-256 e08de5b07528c319f163caf6440a87fe2db6a50b2c29f2ab9b53dd1fb0bfc95d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.2-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 714.3 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.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

File hashes

Hashes for kwimage-0.6.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a0a7ee41db9bd2b938568384cf16165558c7fd3b7550be4ae6c21bad73ed1430
MD5 130d88791a6fd3cf0ed2bb7ca3838bd1
BLAKE2b-256 771d7bee4bc2cd6f1d6f53c08a33f16e47b7b29134e92a323b3cda50d71910aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.2-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 704.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.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.5.9

File hashes

Hashes for kwimage-0.6.2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 68251674f9e22f37813474aa2378cdf6c9bbe8fdcffbe68bfb0e4ce2ca04f4d1
MD5 05ca8318ba68e594ea935d9fd4ed7167
BLAKE2b-256 f0b889884d61a8276e43895d151ad8e8028a5f5257fae48e93ded77f49c8e008

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.2-cp27-cp27mu-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 735.5 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.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.18

File hashes

Hashes for kwimage-0.6.2-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4e65ad713fd2ea9c43e27af65e33f14cb691bb4fcb2fccb94dce5263f3c2f077
MD5 fbebfc6da4c4e2a2533d4ce4d043154d
BLAKE2b-256 e8f0af92fb7c0c88b3089c9d88e8c4190907312bee6fe8cad29c82a882e75a71

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