可微计算机视觉在深度学习中的应用
kornia的Python项目详细描述
kornia是PyTorch的可微计算机视觉库。
它由一组程序和可微模块组成,用于解决一般的计算机视觉问题。在其核心,包使用pytorch作为其主要后端,既提高了效率,又利用了反向模式自动微分来定义和计算复杂函数的梯度。
概述
受opencv的启发,这个库由一个包含运算符的包子集组成,这些运算符可以插入到神经网络中来训练模型,以执行图像转换、极线几何、深度估计和低层图像处理(如直接在张量上操作的滤波和边缘检测)。
在粒度级别上,Kornia是一个库,由以下组件组成:
Component | Description |
kornia | a Differentiable Computer Vision library like OpenCV, with strong GPU support |
kornia.color | a set of routines to perform color space conversions |
kornia.contrib | a compilation of user contrib and experimental operators |
kornia.feature | a module to perform feature detection |
kornia.filters | a module to perform image filtering and edge detection |
kornia.geometry | a geometric computer vision library to perform image transformations, 3D linear algebra and conversions using different camera models |
kornia.losses | a stack of loss functions to solve different vision tasks |
kornia.utils | image to tensor utilities and metrics for vision problems |
安装
来自pip:
pip install kornia
来源:
python setup.py install
来自使用pip的源代码:
pip install git+https://github.com/arraiyopensource/kornia
快速使用
importtorchimportkorniaastgmx_rad=tgm.pi*torch.rand(1,3,3)x_deg=tgm.rad2deg(x_rad)torch.allclose(x_rad,tgm.deg2rad(x_deg))# True
示例
运行我们的jupyter笔记本examples来学习使用库。
引用
如果您在研究相关文件中使用Kornia,建议您引用海报。
@misc{Arraiy2018, author={E. Riba, M. Fathollahi, W. Chaney, E. Rublee and G. Bradski}title={torchgeometry: when PyTorch meets geometry}, booktitle={PyTorch Developer Conference}, year={2018}, url={https://drive.google.com/file/d/1xiao1Xj9WzjJ08YY_nYwsthE-wxfyfhG/view?usp=sharing}}
贡献
我们感谢所有的贡献。如果你打算贡献回错误修复,请这样做,没有任何进一步的讨论。如果您计划提供新功能、实用程序功能或扩展,请首先打开一个问题并与我们讨论该功能。请考虑阅读CONTRIBUTING注释。