MCPcopy Create free account
hub / github.com/drinkingcoder/NeuralMarker / get_gaussian_weights

Method get_gaussian_weights

core/utils/forward_warp.py:65–71  ·  view source on GitHub ↗
(self, x, y, x1, x2, y1, y2)

Source from the content-addressed store, hash-verified

63
64
65 def get_gaussian_weights(self, x, y, x1, x2, y1, y2):
66 w11 = torch.exp(-((x - x1)**2 + (y - y1)**2))
67 w12 = torch.exp(-((x - x1)**2 + (y - y2)**2))
68 w21 = torch.exp(-((x - x2)**2 + (y - y1)**2))
69 w22 = torch.exp(-((x - x2)**2 + (y - y2)**2))
70
71 return w11, w12, w21, w22
72
73
74 def sample_one(self, img, shiftx, shifty, weight):

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected