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

Uploaded Python 2 Python 3

kwimage-0.6.1-cp38-cp38-manylinux2010_x86_64.whl (719.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

kwimage-0.6.1-cp37-cp37m-manylinux2010_x86_64.whl (708.3 kB view details)

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

kwimage-0.6.1-cp36-cp36m-manylinux2010_x86_64.whl (710.2 kB view details)

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

kwimage-0.6.1-cp35-cp35m-manylinux2010_x86_64.whl (700.8 kB view details)

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

kwimage-0.6.1-cp27-cp27mu-manylinux2010_x86_64.whl (730.1 kB view details)

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

File details

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

File metadata

  • Download URL: kwimage-0.6.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 167.7 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for kwimage-0.6.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f3deea692d40a6f9f304b82b65dcab4c12a4c38448b176b37575015269bc4d82
MD5 98a7dc5873926e8a9b33ebac5cc31fc5
BLAKE2b-256 e27c629a14780c073a7ddbd35b6a120392b38e92eb0981e451845b59cf421729

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 719.2 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for kwimage-0.6.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 db3674f436eb8a7ce46087fdbf5bf42ad1cddd68cb7da2569d37974231704fff
MD5 6e06ccc2723b8a9351368a084aad8e2d
BLAKE2b-256 5d7c473eb75593253840f5bb5b2605f22c15f5fa346b6ee2e10643ca78c0e66f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 708.3 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for kwimage-0.6.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bd48ad5ab62a5fef9abaff92a5fadec65f67984226a711fed26bb736b1f4b135
MD5 8a3ac21f4a6d9abde4c0334d945e05a2
BLAKE2b-256 348dd5b135bc120fa3b78abc9118426da7796cff57b4b555aa3d5c0227f48a12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.1-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 710.2 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10

File hashes

Hashes for kwimage-0.6.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a5df4447293044241d219f33fecfe368d0f21e00ac7952aad10e67bf9ff42ae7
MD5 325cbc5096be0c61651a0b9e20565a90
BLAKE2b-256 a5b1f6aaa4ff616c189061593df0ec08b3bbddff74526e32e02c5423aaa1dc61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.1-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 700.8 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.5.9

File hashes

Hashes for kwimage-0.6.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e27d7e5492c310add4be4385afa4ff690582b4b3099defcdf8da07d524154878
MD5 370101450119c0cee2d9949039414adf
BLAKE2b-256 cd448bc24d015d8dbe6f87e176d12985323f555e4fe4ab4960de19a91d58caa2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.6.1-cp27-cp27mu-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 730.1 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.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for kwimage-0.6.1-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 18c1115ae9707142c60d6accc4ef413eb41773a2010f842658ce5f1beac66ea8
MD5 9d9d58477b51ebd5a636b10cf7c8f4f0
BLAKE2b-256 52ce7d08d97ca269f7bf5daa91092629eca4a3210b18dad178ebec72ada68b01

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