(self, x, y, x1, x2, y1, y2)
| 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): |