文章目录
-
- transport
-
- 1. [计算最优传输(Computational Optimal Transport)](https://zhuanlan.zhihu.com/p/94978686)
- 2. 离散测度 (Discrete measures), 蒙日(Monge)问题, Kantorovich Relaxation (松弛的蒙日问题)
- 3. scipy.stats.wasserstein_distance 距离计算
- 4. 转化为线性方程求解 Wasserstein距离 , KL散度的对比分析
- 5. pytorch 通过Sinkhorn 方法计算 Wasserstein距离
- 6. sinkhorn 原理:
- 7. 解决方案
- 8. KL散度
- 9. book
- pot lib
- 8. 求质心
- 9. Debiased Sinkhorn barycenter 无偏质心
- 10 unbalanced OT
- 11. Partial optimal transport 部分转换
transport
https://github.com/rpetit/color-transfer
Rabin, J., & Papadakis, N. (2014). Non-convex relaxation of optimal transport for color transfer.
https://github.com/RachelBlin/Colorization-optimal-transport
Adaptive color transfer with relaxed optimal transport" by Rabin et. al.
A non parametric approach for histogram
segmentation 一种根据直方图分布的图像分割算法。
Optimal Transportation for Example-Guided Color Transfer 颜色转换
https://github.com/search?q=Optimal+Transport
1. 计算最优传输(Computational Optimal Transport)
介绍距离矩阵 和 概念
2. 离散测度 (Discrete measures), 蒙日(Monge)问题, Kantorovich Relaxation (松弛的蒙日问题)
最优运输(Optimal Transfort):从理论到填补的应
3. scipy.stats.wasserstein_distance 距离计算
转化为累计直方图的差异。
還看不懂Wasserstein Distance嗎?看看這篇

4. 转化为线性方程求解 Wasserstein距离 , KL散度的对比分析
5. pytorch 通过Sinkhorn 方法计算 Wasserstein距离
想要算一算Wasserstein距离?这里有一份PyTorch实战
6. sinkhorn 原理:
7. 解决方案

8. KL散度

https://zhuanlan.zhihu.com/p/527799934
9. book
Computational Optimal Transport
https://arxiv.org/pdf/1803.00567v4.pdf
pot lib
1 问题目标
将一个分布转移到另一个分布,做最小的功

主要应用:
1)测量两个分布的相似性,尤其是对于没有相同因变量(support)的分布
2)获得两个分布的mapping 关系。
- Wasserstein distance between distributions
用于测量两个分布的距离或相似度。 <C, P>
-
mapping
OT问题的一个非常有趣的方面是OT映射本身。当计算离散分布之间的最佳传输时,一个输出是OT矩阵,它将为您提供每个分布中样本之间的对应关系. -
ot.optim.cg
是一个通用的OT问题求解器,可以利用各种平滑连续约束。
generic OT solver ot.optim.cg that can solve OT problems with any smooth/continuous regularization term making it particularly practical for research purpose. -
规模大的问题用 geomloss, 兼容pytorch
2 ot.emd 方法
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-oPVkY2KA-1681721618643)(2023-04-12-13-11-15.png)]
# a and b are 1D histograms (sum to 1 and positive)
# M is the ground cost matrix
T = ot.emd(a, b, M) # exact linear program
exact linear program 求精确解,复杂度是 O^3
一维例子:
两个直方图以及他们的cost 矩阵

得到的结果

二维例子:
2D point, 每个点的概率相同(uniform)

得到的结果和转换关系:

无论是一维还是二维,都是一些位置,另外就是把每个位置的值当作土堆的质量
3. ot.dist
采用不同的距离评价标准:
a, b = ot.unif(n), ot.unif(n) # uniform distribution on samples
# loss matrix
M1 = ot.dist

本文介绍了计算最优传输的概念,包括离散测度、蒙日问题和KantorovichRelaxation。讨论了scipy.stats.wasserstein_distance的计算以及如何通过线性方程求解Wasserstein距离。重点讲解了PyTorch中使用Sinkhorn算法计算Wasserstein距离的方法,以及正则化优化技术,如EntropicRegularization。此外,还涵盖了质心计算、无偏Sinkhorn质心和不平衡OT。文章提供了多个Python库(如potlib)和实际应用示例,如颜色转换和图像分割。

1722

被折叠的 条评论
为什么被折叠?



