泊松融合调研
目录
裁剪加速,速度提升2倍多
cuda版:
效果没测,官方效果不错:
效果不好,parosky/poissonblending
裁剪加速,速度提升2倍多
import os
import sys
import os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
current_dir = os.path.dirname(os.path.abspath(__file__))paths = [os.path.abspath(__file__).split('scripts')[0]]
print('current_dir',current_dir)
paths.append(os.path.abspath(os.path.join(current_dir, 'src')))
import time
for path in paths:sys.path.insert(0, path)os.environ['PYTHONPATH'] = (os.environ.get('PYTHONPATH', '') + ':' + path).strip(':')import cv2
import torch
import numpy as np
import scipy.sparse as sp
from scipy.sparse.linalg import spsolve
from tqdm i