kornia

Geometric Computer Vision Library for Spatial AI

APACHE-2.0 License

Downloads
1.9M
Stars
9.5K
Committers
264

Bot releases are visible (Hide)

kornia - v0.7.2 Latest Release

Published by edgarriba 7 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/commits/v0.7.2

kornia - v0.7.1

Published by edgarriba 10 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.7.0...v0.7.1

Highlights

Image API

In this release we have added a new Image API as placeholder to support a more generic multibackend api. You can export/import from files, numpy and dlapck.

>>> # from a torch.tensor
>>> data = torch.randint(0, 255, (3, 4, 5), dtype=torch.uint8)  # CxHxW
>>> pixel_format = PixelFormat(
...     color_space=ColorSpace.RGB,
...     bit_depth=8,
... )
>>> layout = ImageLayout(
...     image_size=ImageSize(4, 5),
...     channels=3,
...     channels_order=ChannelsOrder.CHANNELS_FIRST,
... )
>>> img = Image(data, pixel_format, layout)
>>> assert img.channels == 3

Object Detection API

We have added the ObjectDetector that includes by default the RT-DETR model. The detection pipeline is fully configurable by supplying a pre-processor, a model, and a post-processor. Example usage is shown below.

from io import BytesIO

import cv2
import numpy as np
import requests
import torch
from PIL import Image
import matplotlib.pyplot as plt

from kornia.contrib.models.rt_detr import RTDETR, DETRPostProcessor, RTDETRConfig
from kornia.contrib.object_detection import ObjectDetector, ResizePreProcessor

model_type = "hgnetv2_x"  # also available: resnet18d, resnet34d, resnet50d, resnet101d, hgnetv2_l
checkpoint = f"https://github.com/kornia/kornia/releases/download/v0.7.0/rtdetr_{model_type}.ckpt"
config = RTDETRConfig(model_type, 80, checkpoint=checkpoint)
model = RTDETR.from_config(config).eval()

detector = ObjectDetector(model, ResizePreProcessor(640), DETRPostProcessor(0.3))

url = "https://github.com/kornia/data/raw/main/soccer.jpg"
img = Image.open(BytesIO(requests.get(url).content))
img = np.asarray(img, dtype=np.float32) / 255
img_pt = torch.from_numpy(img).permute(2, 0, 1)
detection = detector.predict([img_pt])

for cls_score_xywh in detection[0].numpy():
    class_id = int(cls_score_xywh[0])
    score = cls_score_xywh[1]
    x, y, w, h = cls_score_xywh[2:].round().astype(int)
    cv2.rectangle(img, (x, y, w, h), (255, 0, 0), 3)

    text = f"{class_id}, {score:.2f}"
    font = cv2.FONT_HERSHEY_SIMPLEX
    (text_width, text_height), _ = cv2.getTextSize(text, font, 1, 2)
    cv2.rectangle(img, (x, y - text_height, text_width, text_height), (255, 0, 0), cv2.FILLED)
    cv2.putText(img, text, (x, y), font, 1, (255, 255, 255), 2)

plt.imshow(img)
plt.show()

img

Deep Models

As part of the kornia.contrib module, we started building a models module where Deep Learning models for Computer Vision (Semantic Segmentation, Object Detection, etc.) will exist.

From an abstract base class ModelBase, we will implement and make available these deep learning models (eg Segment anything). Similarly, we provide standard structures to be used with the results of these models such as SegmentationResults.

The idea is that we can abstract and standardize how these models will behave with our High level APIs. Like for example interacting with the Visual Prompter backend (today Segment Anything is available).

ModelBase provides methods for loading checkpoints (load_checkpoint), and compiling itself via the torch.compile API. And we plan to increase it according to the needs of the community.

Within this release, we are also making other models available to be used like RT_DETR and tiny_vit.

Example of using these abstractions to implement a model:

# Each model should be a submodule inside the `kornia.contrib.models`, and the Model class itself will be exposed under this
# `models` module.

from kornia.contrib.models.base import ModelBase
from dataclasses import dataclass
from kornia.contrib.models.structures import SegmentationResults
from enum import Enum

class MyModelType(Enum):
    """Map the model types."""
    a = 0
    ...

@dataclass
class MyModelConfig:
    model_type: str | int | SamModelType | None = None
    checkpoint: str | None = None
    ...

class MyModel(ModelBase[MyModelConfig]):
    def __init__(...) -> None:
        ...

    @staticmethod
    def from_config(config: MyModelConfig) -> MyModel:
        """Build the model based on the config"""
        ...

    def forward(...) -> SegmentationResults:
        ...

RT-DETR

In most object detection models, non-maximum suppression (NMS) is necessary to remove overlapping and similar bounding boxes. This post-processing algorithm has high latency, preventing object detectors from reaching real-time speed. DETR is a new class of detectors that eliminate NMS step by using transformer decoder to directly predict bounding boxes. RT-DETR enhances Deformable DETR to achieve real-time speed on server-class GPUs by using an efficient backbone. More details can be seen here

TinyViT

TinyViT is an efficient and high-performing transformer model for images. It achieves a top-1 accuracy of 84.8% on ImageNet-1k with only 21M parameters. See TinyViT for more information.

MobileSAM

MobileSAM replaces the heavy ViT-H backbone in the original SAM with TinyViT, which is more than 100 times smaller in terms of parameters and around 40 times faster in terms of inference speed. See MobileSAM for more details.

To use MobileSAM, simply specify "mobile_sam" in the SamConfig:

from kornia.contrib.visual_prompter import VisualPrompter
from kornia.contrib.models.sam import SamConfig

prompter = VisualPrompter(SamConfig("mobile_sam", pretrained=True))

LightGlue matcher

Added the LightGlue LightGlue-based matcher in kornia API. This is based on the original code from paper β€œLightGlue: Local Feature Matching at Light Speed”. See [LSP23] for more details.

The LightGlue algorithm won a money prize in the Image Matching Challenge 2023 @ CVPR23: https://www.kaggle.com/competitions/image-matching-challenge-2023/overview

See a working example integrating with COLMAP: https://github.com/kornia/kornia/discussions/2469
image

New Sensors API

New kornia.sensors module to interface with sensors like Camera, IMU, GNSS etc.

We added CameraModel , PinholeModel , CameraModelBase for now.

Usage example:

Define a CameraModel

>>> # Pinhole Camera Model
>>> cam = CameraModel(ImageSize(480, 640), CameraModelType.PINHOLE, torch.Tensor([328., 328., 320., 240.]))
>>> # Brown Conrady Camera Model
>>> cam = CameraModel(ImageSize(480, 640), CameraModelType.BROWN_CONRADY, torch.Tensor([1.0, 1.0, 1.0, 1.0,
... 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]))
>>> # Kannala Brandt K3 Camera Model
>>> cam = CameraModel(ImageSize(480, 640), CameraModelType.KANNALA_BRANDT_K3, torch.Tensor([1.0, 1.0, 1.0,
... 1.0, 1.0, 1.0, 1.0, 1.0]))
>>> # Orthographic Camera Model
>>> cam = CameraModel(ImageSize(480, 640), CameraModelType.ORTHOGRAPHIC, torch.Tensor([328., 328., 320., 240.]))
>>> cam.params
tensor([328., 328., 320., 240.])

Added kornia.geometry.solvers submodule

New module for geometric vision solvers that include the following:

This is part of an upgrade of the find_fundamental to support the 7POINT algorithm.

Image terminal printing

Added kornia.utils.print_image API for printing any given image tensors or image path to terminal.

>>> kornia.utils.print_image("panda.jpg")

Screenshot 2023-07-26 at 11 39 00 PM

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.12...v0.7.0

kornia - v0.6.12 ImagePrompter API (SAM), Guided Filter and bugfixes

Published by edgarriba over 1 year ago

Highlights

ImagePrompter API

In this release we have added a new ImagePrompter API that settles the basis as a foundational api for the task to query geometric information to images inspired by LLM. We leverage the ImagePrompter API via the Segment Anything (SAM) making the model more accessible, packaged and well maintained for industry standards.

Check the full tutorial: https://github.com/kornia/tutorials/blob/master/nbs/image_prompter.ipynb

import kornia as K
from kornia.contrib.image_prompter import ImagePrompter
from kornia.geometry.keypoints import Keypoints
from kornia.geometry.boxes import Boxes

image: Tensor = K.io.load_image("soccer.jpg", ImageLoadType.RGB32, "cuda")

# Load the prompter
prompter = ImagePrompter(config, device="cuda")

# set the image: This will preprocess the image and already generate the embeddings of it
prompter.set_image(image)

# Generate the prompts
keypoints = Keypoints(torch.tensor([[[500, 375]]], device="cuda")) # BxNx2
# For the keypoints label: 1 indicates a foreground point; 0 indicates a background point
keypoints_labels = torch.tensor([[1]], device="cuda") # BxN
boxes = Boxes(
    torch.tensor([[[[425, 600], [425, 875], [700, 600], [700, 875]]]], device="cuda"), mode='xyxy'
)

# Runs the prediction with all prompts
prediction = prompter.predict(
    keypoints=keypoints,
    keypoints_labels=keypoints_labels,
    boxes=boxes,
    multimask_output=True,
)

image

Guided Blurring

Blur images by preserving edges via Bilateral and Guided Blurring
-> https://kornia.readthedocs.io/en/latest/filters.html#kornia.filters.guided_blur

image

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.11...v0.6.12

kornia - v0.6.11 DISK local features, new augmentations and bugfixes

Published by ducha-aiki over 1 year ago

Highlights

In this release we have added DISK, which is the best free local feature for 3D reconstruction. (part of winning solutions in IMC2021 together with SuperGlue).
Thanks to @jatentaki for the great work and relicensing the DISK to Apache 2!

import kornia.feature as KF

disk = KF.DISK.from_pretrained('depth').to(device)
with torch.inference_mode():
    inp = torch.cat([img1, img2], dim=0)
    features1, features2 = disk(inp, 2048, 
                                pad_if_not_divisible=True)
    kps1, descs1 = features1.keypoints, features1.descriptors
    kps2, descs2 = features2.keypoints, features2.descriptors
    dists, idxs = KF.match_smnn(descs1, descs2, 0.98)

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.10...v0.6.11

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.9...v0.6.10

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.8...v0.6.9

Highlights

NeRF API

In this release in we include an experimental kornia.nerf submodule with a high level API that implements a vanilla Neural Radiance Field (NeRF). Read more about the roadmap of this project: https://github.com/kornia/kornia/issues/1936 // contribution done by @YanivHollander

from kornia.nerf import NerfSolver
from kornia.geomtry.camera import PinholeCamera

 camera: PinholeCamera = create_one_camera(5, 9, device, dtype)
 img = create_red_images_for_cameras(camera, device)

 nerf_obj = NerfSolver(device=device, dtype=dtype)
 num_img_rays = 15
 nerf_obj.init_training(camera, 1.0, 3.0, False, img, num_img_rays, batch_size=5, num_ray_points=10, lr=1e-2)
 nerf_obj.run(num_epochs=10)

 img_rendered = nerf_obj.render_views(camera)[0].permute(2, 0, 1)

ezgif com-gif-maker

Improvements, docs and tutorials soon!

Edge Detection

Added kornia.contrib.EdgeDetection API that implements dexined: https://github.com/xavysp/DexiNed

import kornia as K
from kornia.contrib import EdgeDetection

edge_detection = EdgeDetector().to(device)

# preprocess
img = K.image_to_tensor(frame, keepdim=False).to(device)
img = K.color.bgr_to_rgb(img.float())

# detect !
with torch.no_grad():
    edges = edge_detection(img)

img_vis = K.tensor_to_image(edges.byte())

amiga_edge

Image matching bugfixes:

After testing kornia LoFTR and AdaLAM under big load, our users and we have experiences some bugs in corners cases, such as big images or no input correspondences, which caused pipeline to crash. Not anymore!

Various kornia demos in gradio by community:

See demos in our HuggingFace space: https://huggingface.co/kornia

RANSAC improvements

We have added homography-from-line-segments solver, as well as various speed-ups. We are not yet at OpenCV RANSAC quality level, more improvements to come :) But the line-solver is pretty unique! We also have example in our tutorials https://kornia-tutorials.readthedocs.io/en/latest/line_detection_and_matching_sold2.html

Apple Silicon M1 support is closer, CI improvements

We are slowly working on being able to run kornia on M1. So far we have added possibility to test locally on M1 and mostly report Pytorch MPS backend crashes in various use-cases. Once this work is finished, we may provide some workarounds to have kornia-M1

Quaternion improvements

Implemented Quaternion.slerp to interpolate between quaternions using quaternion arithmetic -- contributed by @cjpurackal

import torch
from kornia.geometry.quaternion import Quaternion

q0 = Quaternion.identity(batch_size=1)
q1 = Quaternion(torch.tensor([[1., .5, 0., 0.]]))
q2 = q0.slerp(q1, .3)

More augmentations!

What's Changed

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.7...v0.6.8

kornia - v0.6.7 SOLD2, AdaLAM, Quaternion, Mosaic Aug and Edge-aware Blur

Published by edgarriba about 2 years ago

Highlights

SOLD2 line segment detector & descriptor

Contributed by SOLD2 original authors

Geometry-aware matchers: AdaLAM & FGINN

AdaLAM works particularly well with kornia.feature.KeyNetAffNetHardNet. AdaLAM is adopted from original author's implementation.

import matplotlib.pyplot as plt
import cv2
import kornia as K
import kornia.feature as KF
import numpy as np
import torch
from kornia_moons.feature import *

def load_torch_image(fname):
    img = K.image_to_tensor(cv2.imread(fname), False).float() /255.
    img = K.color.bgr_to_rgb(img)
    return img

device = K.utils.get_cuda_device_if_available()

fname1 = 'kn_church-2.jpg'
fname2 = 'kn_church-8.jpg'

img1 = load_torch_image(fname1)
img2 = load_torch_image(fname2)


feature = KF.KeyNetAffNetHardNet(5000, True).eval().to(device)

input_dict = {"image0": K.color.rgb_to_grayscale(img1), # LofTR works on grayscale images only 
              "image1": K.color.rgb_to_grayscale(img2)}

hw1 = torch.tensor(img1.shape[2:])
hw2 = torch.tensor(img1.shape[2:])

adalam_config = {"device": device}

with torch.inference_mode():
    lafs1, resps1, descs1 = feature(K.color.rgb_to_grayscale(img1))
    lafs2, resps2, descs2 = feature(K.color.rgb_to_grayscale(img2))
    dists, idxs = KF.match_adalam(descs1.squeeze(0), descs2.squeeze(0),
                                  lafs1, lafs2, # Adalam takes into account also geometric information
                                  config=adalam_config,
                                  hw1=hw1, hw2=hw2) # Adalam also benefits from knowing image size

More - in our Tutorials section

Geometry conversions

Converting camera pose from (R,t) to actually pose in world coordinates can be a pain. We are relieving you from it, by implementing various conversion functions, such as camtoworld_to_worldtocam_Rt, worldtocam_to_camtoworld_Rt, camtoworld_graphics_to_vision_4x4, etc. The conversions come with two variants: for (R,t) tensor tuple, or with since extrinsics mat4x4.

Quaternion API

More geometry-related stuff! We have added Quaternion API to make work with rotation representations easy. Checkout the PR

>>> q = Quaternion.identity(batch_size=4)
>>> q.data
Parameter containing:
tensor([[1., 0., 0., 0.],
        [1., 0., 0., 0.],
        [1., 0., 0., 0.],
        [1., 0., 0., 0.]], requires_grad=True)
>>> q.real
tensor([[1.],
        [1.],
        [1.],
        [1.]], grad_fn=<SliceBackward0>)
>>> q.vec
tensor([[0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.]], grad_fn=<SliceBackward0>)

Mosaic Augmentation

We recently included the RandomMosaic to mosaic image transforms and combine them into one output image. The output image is composed of the parts from each sub-image.

The mosaic transform steps are as follows:

  • Concate selected images into a super-image.
  • Crop out the outcome image according to the top-left corner and crop size.
>>> mosaic = RandomMosaic((300, 300), data_keys=["input", "bbox_xyxy"])
>>> boxes = torch.tensor([[
...     [70, 5, 150, 100],
...     [60, 180, 175, 220],
... ]]).repeat(8, 1, 1)
>>> input = torch.randn(8, 3, 224, 224)
>>> out = mosaic(input, boxes)
>>> out[0].shape, out[1].shape
(torch.Size([8, 3, 300, 300]), torch.Size([8, 8, 4]))

Edge-aware blurring

Thanks to @nitaifingerhut

!wget https://github.com/kornia/data/raw/main/drslump.jpg

import torch
import kornia
import cv2
import matplotlib.pyplot as plt

# read the image with OpenCV
img: np.ndarray = cv2.imread('./drslump.jpg')
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

# convert to torch tensor
data: torch.tensor = kornia.image_to_tensor(img, keepdim=False)/255.  # BxCxHxW
data-=0.2*torch.rand_like(data).abs()

plt.figure(figsize=(12,8))
edge_blurred = kornia.filters.edge_aware_blur_pool2d(data, 19)
plt.imshow(kornia.tensor_to_image(torch.cat([data, edge_blurred],axis=3)))

What's Changed

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.6...v0.6.7

kornia - v0.6.6 ParametrizedLine API and load_image macos and windows

Published by edgarriba over 2 years ago

Highlights

ParametrizedLine API

First of integrations to revamp kornia.geometry to align with Eigen and Sophus.
Docs: https://kornia.readthedocs.io/en/latest/geometry.line.html?#kornia.geometry.line.ParametrizedLine
See: example: https://github.com/kornia/kornia/blob/master/examples/geometry/fit_line2.py

Figure_1

Support for macos and windows in load_image

Automated the packaging infra in kornia_rs to handle multi architecture builds. Arm64 soon :)
See: https://github.com/kornia/kornia-rs

    # load the image using the rust backend          
    img: Tensor = K.io.load_image(file_name, K.io.ImageLoadType.RGB32)
    img = img[None]  # 1xCxHxW / fp32 / [0, 1]

HuggingFacce integration

Created Kornia AI org under the HuggingFace platform.
Starting to port the tutorials under HuggingFace kornia org to rapidly show live docs and make community.
Link: https://huggingface.co/kornia

Demos:

What's new ?

New Contributors

Full Changelog: https://github.com/kornia/kornia/compare/v0.6.5...v0.6.6

πŸš€ [0.6.5] - 2022-05-16

πŸ†• New Features

  • Create kornia.io and implement load_image with rust (#1701)
  • Implement diamond_square and plasma augmentations: RandomPlasmaBrightness, RandomPlasmaContrast, RandomPlasmaShadow (#1700)
  • Added RandomRGBShift augmentation (#1694)
  • Added STE gradient estimator (#1666)
  • More epipolar geometry metrics (+linalg utility) (#1674)
  • Add Lovasz-Hinge/Softmax losses (#1682)
  • Add adjust_sigmoid and adjust_log initial implementation (#1685)
  • Added distribution mapper (#1667)

🐞 Bug fixes

  • Fixes filter2d's output shape shrink when padding='same' (#1661)
  • fix: added eps in geometry/rotmat_to_quaternion (#1665)
  • [fix] receive num_features as an arg to KeyNetDetector constructor (#1686

⚑ Improvements

  • Add reduction option to MS_SSIMLoss (#1655)
  • Making epipolar metrics work with volumetric tensors (#1656)
  • Add get_safe_device util (#1662)
  • Added antialiasing option to Resize augmentation (#1687)
  • Use nearest neighbour interpolation for masks (#1630)
  • grayscale to rgb for torch.uint8 (#1705)

πŸ‘©β€πŸ’» πŸ‘¨β€πŸ’» We would like to thank all contributors for this new release !
@Jonas1312 @nitaifingerhut @qwertyforce @ashnair1 @ducha-aiki @z0gSh1u @simon-schaefer @shijianjian @edgarriba @HJoonKwon @ChristophReich1996 @Tanmay06 @dobosevych @miquelmarti @Oleksandra2020

If we forgot someone let us know 😎

πŸš€ [0.6.4] - 2022-03-21

πŸ†• New Features

  • Adds MS-SSIMLoss reconstruction loss function (#1551)
  • Added HyNet descriptor (#1573)
  • Add KeyNet detector (#1574)
  • Add RandomPlanckianJitter in color augmentations (#1607)
  • Add Jina AI QAbot to Kornia documentation (#1628)
  • Add draw_convex_polygon (#1636)

🐞 Bug fixes

  • RandomCrop fix and improvement (#1571)
  • Fix draw_line produce wrong output for coordinates larger than uint8
  • Fix mask bug for loftr (#1580)
  • Fix gradient bug for distance_transform (#1584)
  • Fix translation sampling in AffineGenerator3D (#1581)
  • Fix AugmentationSequential bbox keypoints transformation fix (#1570)
  • Fix CombineTensorPatches (#1558)
  • Fix overblur in AA (#1612)

❗ Changes

  • Deprecated return_transform, enabled 3D augmentations in AugmentionSequential (#1590)

⚑ Improvements

  • Making compute_correspond_epilines work with fundamental and point of volumetric tensor (#1585)
  • Update batch shape when augmentations change size of image (#1609)
  • Remap accepts arbitrary grid size (#1617)
  • Rename variables named 'input' to 'sample' (in tests). (#1614)
  • Remove half log2 in extract_patches (#1616)
  • Add orientation-preserving option for AffNet and make it default (#1620)
  • Add option for sampling_method in 2d perspective transform generation (#1591) (#1592)
  • Fix adjust brightness (#1586)
  • Added default params for laf construction from xy and new tensor shape check (#1633)
  • Make nms2d jittable (#1637)
  • Add fn to automatically compute padding (#1634)
  • Add pillow_like option for ColorJitter to match torchvision. (#1611)

πŸ‘©β€πŸ’» πŸ‘¨β€πŸ’» We would like to thank all contributors for this new release !
@ducha-aiki @edgarriba @shijianjian @juliendenize @ashnair1 @KhaledSharif @Parskatt @shazhou2015 @JoanFM @nrupatunga @kristijanbartol @miquelmarti @riegerfr @nitaifingerhut @dichen-cd @lamhoangtung @hasibzunair @wendy-xiaozong @rsomani95 @huuquan1994 @twsl

If we forgot someone let us know 😎

πŸš€ [0.6.3] - 2022-01-30

πŸ†• New Features

  • Update CI to pytorch 1.10.1 (#1518)
  • Added Hanning kernel, prepare for KCF tracking (#1519)
  • Add distance transform implementation (#1490)
  • Add Resize augmentation module (#1545)

🐞 Bug fixes

  • Precompute padding parameters when RandomCrop aug in container (#1494)
  • Padding error with RandomCrop #1520
  • Fix correct shape after cropping when forwarding parameters (#1533)
  • Fixed #1534 nested augmentation sequential bug (#1536)
  • Fixes to device in augmentations (#1546)
  • Bugfix for larger MotionBlur kernel size ranges (#1543)
  • Fix RandomErasing applied to mask keys (#1541)

❗ Changes

  • Restructure augmentation package (#1515)

⚑ Improvements

  • Add missing keepdims with fixed type (#1488)
  • Allow to pass a second K to distort and undistort points (#1506)
  • Augmentation Sequential with a list of bboxes as a batch (#1497)
  • Adde Devcontainer for development (#1515)
  • Improve the histogram_matching function (#1532)

πŸ‘©β€πŸ’» πŸ‘¨β€πŸ’» We would like to thank all contributors for this new release !
@ducha-aiki @edgarriba @shijianjian @julien-blanchon @lferraz @miquelmarti @twsl @nitaifingerhut @eungbean @aaroswings @huuquan1994 @rsomani95

If we forgot someone let us know 😎

πŸš€ [0.6.2] - 2021-12-03

πŸ†• New Features

  • Add face detection API (#1469)
  • Add ObjectDetectorTrainer (#1414)
  • Add container operation weights and OneOf documentation (#1443)
  • Add oriented contraint check to Homography RANSAC (#1453)
  • Add background color selection in warp_perspective (#1452)
  • Add draw_line image utility (#1456)
  • Add Bounding Boxes API (#1304)
  • Add histogram_matching functionality (#1395)

🐞 Bug fixes

  • fix catch type for torch.svd error (#1431)
  • Fix for nested AugmentationSequential containers (#1467)
  • Use common bbox format xywh (#1472)

❗ Changes

  • Add padding_mode for RandomElasticTransform augmentation (#1439)
  • Expose inliers sum to HomographyTracker (#1463)

⚑ Improvements

  • Switch to one-way error RANSAC for speed-up (#1454)
  • Few improvements on homography tracking (#1434)
  • Enable all bandit tests, add separate hook for tests (#1437)
  • Merge homography_warp to warp_perspective (#1438)
  • Random generator refactor (#1459)

πŸ‘©β€πŸ’» πŸ‘¨β€πŸ’» We would like to thank all contributors for this new release !
@ducha-aiki @edgarriba @chinhsuanwu @chinhsuanwu @dobosevych @shijianjian @rvorias @rvorias @fmiotello @hal-314 @trysomeway @miquelmarti @calmdown13 @twsl Abdelrhman-Hosny

If we forgot someone let us know 😎

kornia - Kornia 0.6.1 - Packaging hotfix

Published by edgarriba almost 3 years ago

πŸš€ Release Note (0.6.1)

  • Fixes PyPI tarball missing required files #1421
  • hotfix: remove mutable object in constructor #1423

πŸš€ Release Note (0.6.0)

Release time: 2021-10-22

πŸ†• New Features

  • Add Training API (#1307)
  • Added combine patches (#1309)
  • Add semantic segmentation trainer (#1323)
  • Add vanilla LO-RANSAC (#1335)
  • Add Lambda function module (#1346)
  • Add support for YUV420 and YUV422 to complement current YUV444 (#1360)
  • Add raw to rgb color conversion (#1380)
  • Implement separable_filter2d (#1385)
  • Add MobileViT to contrib (#1388)
  • Add solve_pnp_dlt (#1349)
  • Add function image_list_to_tensor to utils (#1393)
  • Add undistort_image function (#1303)
  • Create kormia.metrics submodule (#1325)
  • Add Image Stitching API (#1358)
  • Add Homography Tracker API (#1389)

❗ Changes

  • Refactor library namespaces [pre-release][0.6-rc1] (#1412)
  • Deprecate PyTorch 1.6/1.7 and add 1.9.1 (#1399)

⚑ Improvements

  • Improve bbox_to_mask (#1351)
  • Refactor unfold->conv for morphology backbone (#1107)
  • Improve focal loss for numerical stability (#1362)
  • Add more border_type options for filter2D (#1375)
  • Replace deprecated torch.qr (#1376)
  • Add special case hardcoded implementtion for local features speed up (#1387)
  • Enable non/batched connected components (#1193)
  • Remove warnings during testing (#1401)

🐞 Bug fixes

  • Fix binary focal loss (#1313)
  • Fix kornia.geometry.subpix.spatial_soft_argmax imports (#1318)
  • Fixed a simple typo in init.py (#1319)
  • Fix path to dev requirements file in a setup_dev_env.sh (#1324)
  • Fix bug in create_meshgrid3d along depth (#1330)
  • Fix anisotropic scale error (#1340)
  • Fix rgb_to_hsv for onnx (#1329)
  • Fixed useless return in ransac.py (#1352)
  • Fixed classificationhead typo and leave out some of the guesswork (#1354)
  • Fix clahe differentiability and tests (#1356)
  • Fixes singular matrix inverse/solve for RANSAC and ConvQuad3d (#1408)
  • Change intermediate datatype to fix imgwarp (#1413)

πŸ‘©β€πŸ’» πŸ‘¨β€πŸ’» We would like to thank all contributors for this new release !
@AK391 @cclauss @edgarriba @ducha-aiki @isaaccorley @justanhduc @jatentaki @shijianjian @shiyangc-intusurg @SravanChittupalli @thatbrguy @nvshubhsharma @PWhiddy @oskarflordal @tacoelho @YanivHollander @jhacsonmeza

If we forgot someone let us know 😎

πŸš€ Release Note (0.5.11)

Release time: 2021-09-19

πŸ†• New Features

  • Add Vision Transformer (ViT) (#1296)
  • Add ImageRegistrator API (#1253)
  • Add LoFTR inference (#1218)
  • Added differentiable Hausdorff Distance (HD) loss (#1254)
  • Add PadTo to kornia.augmentation (#1286)

⚑ Code refactor

  • Return all learned modules by default in eval() mode (#1266)
  • Enable ImageSequential and VideoSequential to AugmentationSequential (#1231)
  • Specify that angles are in radians (#1287)
  • Removed deprecated codes for v6.0 (#1281)

🐞 Bug fixes

  • Fix save_pointcloud_ply fn counting point with inf coordinates (#1263)
  • Fixes torch version parse and add temporal packaging dependency (#1284)
  • Fix issue of image_histogram2d (#1295)

πŸ‘©β€πŸ’» πŸ‘¨β€πŸ’» We would like to thank all contributors for this new release !
@Abdelrhman-Hosny @ducha-aiki @edgarriba @EStorm21 @lyhyl @shijianjian @thatbrguy

If we forgot someone let us know 😎

Kornia release

[0.5.8] - 2021-08-06

Added

  • Add the connected components labeling algorithm (#1184)

Fixed

  • Partial fix for horizontal and vertical flips (#1166)
  • Fix even kernel and add test (#1183)
  • Fix wrong source points for RandomThinPlateSpline (#1187)
  • Fix RandomElasticTransform ignores same_on_batch (#1189)
  • Fixed bugs in patchsequential. Remove fill_diagonal operation for better ONNX support (#1178)

Changed

  • Differentiable image histogram using kernel density estimation (#1172)

Contributors

@bkntr @bsuleymanov @ducha-aiki @edgarriba @hal-314 @kingsj0405 @shijianjian

If we forgot someone let us know 😎

Kornia 0.5.7 release

[0.5.7] - 2021-07-27

Added

  • Grayscale to RGB image conversion. (#1162)
  • Add keepdim param to tensor_to_image function. (#1168)

Fixed

  • Fix checks on wrong tensor shape condition in depth.py (#1164)

Contributors

@bsuleymanov @dhernandez0 @ducha-aiki

If we forgot someone let us know 😎

Kornia 0.5.6 release

[0.5.6] - 2021-07-12

Added

  • Added mix augmentations in containers (#1139)

Fixed

  • Fixed non-4-dim input error for sequential (#1146)

Changed

  • Moving bbox-related functionality to bbox module (#1103)
  • Optimized version of hls_to_rgb and rgb_to_hls (#1154)

Removed

  • Remove numpy dependency (#1136)

Contributors

@dkoguciuk @edgarriba @lferraz @shijianjian

If we forgot someone let us know 😎

Package Rankings
Top 0.62% on Pypi.org
Top 7.29% on Conda-forge.org
Top 9.18% on Proxy.golang.org
Badges
Extracted from project README
PyPI version Downloads Slack Twitter License PyPI python pytorch