Implementation of [1] in Python based on the MATLAB code. Some differences exist because scipy does not implement the same solvers and matrix decompositions than MATLAB.
[1]: Xu, Li, Qiong Yan, Yang Xia, and Jiaya Jia. “Structure Extraction from Texture via Relative Total Variation.” ACM Transactions on Graphics 31, no. 6 (November 1, 2012): 139:1-139:10. https://doi.org/10/f96zzh.