Skip to content

Commit

Permalink
Merge pull request #134 from Rudra-Ji/main
Browse files Browse the repository at this point in the history
fix typo
  • Loading branch information
kunncheng authored Oct 21, 2023
2 parents 07dc99a + 28e38f4 commit 6bfbb96
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion third_part/GPEN/face_morpher/facemorpher/warper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def bilinear_interpolate(img, coords):
x0, y0 = int_coords
dx, dy = coords - int_coords

# 4 Neighour pixels
# 4 Neighbour pixels
q11 = img[y0, x0]
q21 = img[y0, x0+1]
q12 = img[y0+1, x0]
Expand Down
2 changes: 1 addition & 1 deletion third_part/face3d/models/template_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def forward(self):

def backward(self):
"""Calculate losses, gradients, and update network weights; called in every training iteration"""
# caculate the intermediate results if necessary; here self.output has been computed during function <forward>
# calculate the intermediate results if necessary; here self.output has been computed during function <forward>
# calculate loss given the input and intermediate results
self.loss_G = self.criterionLoss(self.output, self.data_B) * self.opt.lambda_regression
self.loss_G.backward() # calculate gradients of network G w.r.t. loss_G
Expand Down
2 changes: 1 addition & 1 deletion third_part/face3d/util/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def tensor2im(input_image, imtype=np.uint8):
image_numpy = image_tensor.clamp(0.0, 1.0).cpu().float().numpy() # convert it into a numpy array
if image_numpy.shape[0] == 1: # grayscale to RGB
image_numpy = np.tile(image_numpy, (3, 1, 1))
image_numpy = np.transpose(image_numpy, (1, 2, 0)) * 255.0 # post-processing: tranpose and scaling
image_numpy = np.transpose(image_numpy, (1, 2, 0)) * 255.0 # post-processing: transpose and scaling
else: # if it is a numpy array, do nothing
image_numpy = input_image
return image_numpy.astype(imtype)
Expand Down
2 changes: 1 addition & 1 deletion utils/inference_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def Laplacian_Pyramid_Blending_with_mask(A, B, m, num_levels = 6):
lpB = [gpB[num_levels-1]]
gpMr = [gpM[num_levels-1]]
for i in range(num_levels-1,0,-1):
# Laplacian: subtarct upscaled version of lower level from current level
# Laplacian: subtract upscaled version of lower level from current level
# to get the high frequencies
LA = np.subtract(gpA[i-1], cv2.pyrUp(gpA[i]))
LB = np.subtract(gpB[i-1], cv2.pyrUp(gpB[i]))
Expand Down

0 comments on commit 6bfbb96

Please sign in to comment.