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

Uploaded Python 2 Python 3

kwimage-0.5.3-cp37-cp37m-manylinux2010_x86_64.whl (694.4 kB view details)

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

kwimage-0.5.3-cp36-cp36m-manylinux2010_x86_64.whl (696.3 kB view details)

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

kwimage-0.5.3-cp35-cp35m-manylinux2010_x86_64.whl (686.9 kB view details)

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

kwimage-0.5.3-cp27-cp27mu-manylinux2010_x86_64.whl (716.2 kB view details)

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

File details

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

File metadata

  • Download URL: kwimage-0.5.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 153.8 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for kwimage-0.5.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ee06e46b4d1b088573bc07be25053fb869736b30aa06b909ce1ca54f09efc0c0
MD5 3a681a6de889ddc0e0b8ea0f4e89d010
BLAKE2b-256 41d5c7750068abb70ceb6cdf1c58823e8850b702b5e872b7417ede9e0093836c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.5.3-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 694.4 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for kwimage-0.5.3-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8513c60422fe1b9bdda767bee03dd5008b18bb7a31b20819ebc57d609d534bf0
MD5 94d9aa919eee627ff14f53f6f892b691
BLAKE2b-256 9a504bc60794bbd5e843fd1608e2e648cb15025a197b0ae639e09e3d289425e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.5.3-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 696.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.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for kwimage-0.5.3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 999cae365b1a4a33d62c794c8f5f7617d9d44c4331ae49bca7f72d862dcbba47
MD5 798573b08d4a99211fe44a8ca2fd5109
BLAKE2b-256 5981ac866a0096120cb17659792c9f7b5015566e1c868e12fb862d746ea1b7d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.5.3-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 686.9 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.40.2 CPython/3.5.9

File hashes

Hashes for kwimage-0.5.3-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b8f86fe38b83c9a7ee90d26d2a21a0cb8e1ab4f5923a70c9afb328e8c92c4396
MD5 1a70a0e1505cf468ed537e0e30d2727c
BLAKE2b-256 fe6cdb3d7c443f57b50b6ecbbcd87c9127783915998958b92b86579691a1b06f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kwimage-0.5.3-cp27-cp27mu-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 716.2 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.40.2 CPython/2.7.17

File hashes

Hashes for kwimage-0.5.3-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 649fd691a09924c3854bb68803321c7adf9f105de4aba5d79c6425f2614b0f26
MD5 724af07d1e280a987b51dd39e6356811
BLAKE2b-256 42636a1be2b39bd8c78bc7c59170fa6244f66ce8608eda959866bc55c4f0638c

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