Kwimage

Latest version: v0.11.2

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 13

0.11.2

Added
* Added `area` property to `Segmentation`
* Added `box` property to `Segmentation`
* Added `box` method to `Mask`
* Added `none_policy` to `SegmentationList.coerce`
* Added `remove_holes` to `Polygon` and `MultiPolygon`
* Added `draw_polyline_on_image` to `im_draw.py`
* Handle `Polygon.draw_on` where the input image is None.


Deprecated
* Deprecate `Mask.to_boxes`
* Deprecate `Mask.bounding_box`

Changed

* `kwimage.Polygon.to_mask` will now pick dimensions to fit the polygon if they are unspecified.
* `kwimage.Detections.to_coco` now handles the case where an entry in data or meta is None
* Generic spatial list objects used by `kwimage.Detections` now implement the
full MutableSequence API, and may explicitly inherit from it in the future.

Fixed
* Fixed issue in `Detections.from_coco_annots` where column arrays would not be
aligned if an annotation was missing specific data.
* Fixed an issue that disallowed empty masks / heatmaps in some cases
* Issue where `Boxes.draw_on` would not allocate a correctly sized image when it was not given.
* Fix `Polygon.draw` where `facecolor='none'`.
* `Polygon.circle` now produces polygons with the correct specified number of sides.
* Rare case where Boxes.warp with None would warp by a null matrix instead of identity.

0.11.1

Added
* `Points.to_shapely` and `Coords.to_shapely`
* `Points.from_shapely` and `Coords.from_shapely`
* `Points.wkt` and `Coords.wkt`
* classes arg to `Points.coerce`


Changed
* `kwcoco.CategoryTree` now returns other metadata with it when converting to COCO dictionaries
* Made `Points.to_coco` allow conversion to coco without category ids, by dropping them

Fixed
* Issue in Points.coerce where unspecified keypoints categories were interpreted as specified with length zero.

0.11.0

Added

* `warp_affine` can now be used with `backend='itk'`.

* `kwimage.Points` now contains a "new-v2" style of coco keypoints that it can handle.

Fixed
* Fix issue of coercing detections when segmentations are null.

* Patched issue where checkerboard would produce the wrong sized image, fix is not perfect.


Changed

* Move `warp_affine`, `warp_projective`, and `warp_image` into their own module
to support the using multiple backends for the underlying operation.

* Module init now uses lazy imports

* Default `grab_test_image` interpolation changed from lanczos to linear.

* cv2 is now officially optional, but a large amount of functionality will not be available without it.

0.10.2

Added
* Add classmethod `PolygonList.random`
* Add method `PolygonList.to_boxes`

Fixed
* `kwimage.Polygon.draw` facecolor argument now properly handles coercible colors.
* `kwimage.PolygonList.draw` now handles setlim correctly
* `kwimage.Boxes.coerce` now handles the format argument correctly.

0.10.1

Added:
* Added `canonical` flag to Boxes to speed up creation time when input is known to be good.
* Added `bayer_value` argument to `kwimage.checkerboard`.

Changed
* kwimage.Boxes and kwimage.Box now use `__slots__`

Fixed:
* Passing a list of alphas to `Detections.draw_on` now works correctly.
* Usage of distutils
* Issue in checkerboard function where the next multiple of X was not computed correctly.

0.10.0

Added

* Support for numpy 2.0 on Python 3.9+
* Add "opacity" argument to `kwimage.Color.adjust`.
* Add `__json__` to `kwimage.Boxes`
* Allow user to specify backend order in `load_image_shape`.
* Add the superstar test image
* `kwimage.Color.nearest_named` for finding the approximate name of a color.

Removed
* Removed support for Python 3.6 and 3.7


Changed
* Demodata is now more robust to networking outages. If no mirror can be
reached, it generates random data to replace the real image.

Fixed
* Fix issue with Boxes.draw when Boxes is empty
* Allow heatmap.draw to do something if classes are not defined.

Page 1 of 13

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.