Skip to content

Commit

Permalink
Fix FDA center_x and center_y (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dipet committed Oct 21, 2020
1 parent 1d169e8 commit bb1e9b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion albumentations/augmentations/domain_adaptation.py
Expand Up @@ -37,7 +37,7 @@ def fourier_domain_adaptation(img: np.ndarray, target_img: np.ndarray, beta: flo
amplitude_trg = np.fft.fftshift(amplitude_trg, axes=(0, 1))
height, width = amplitude_src.shape[:2]
border = np.floor(min(height, width) * beta).astype(int)
center_x, center_y = np.floor([height / 2.0, width / 2.0]).astype(int)
center_y, center_x = np.floor([height / 2.0, width / 2.0]).astype(int)

y1, y2 = center_y - border, center_y + border + 1
x1, x2 = center_x - border, center_x + border + 1
Expand Down

0 comments on commit bb1e9b2

Please sign in to comment.