Skip to content

Instantly share code, notes, and snippets.

Hack-My-Life

  • Richardson, TX
Block or report user

Report or block Hack-My-Life

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View alter_size
scale_factor = 0.73
def alter_size(mask, percent):
"""Adjust the percent paramater to find the largest
input image size that will work with your dataset
"""
h,w = mask.shape[:2]
return cv2.resize(mask, (int(w * percent), int(h * percent)))
input_img = alter_size(input_img, scale_factor)
style_img = alter_size(style_img, scale_factor)
mask = alter_size(mask, scale_factor)
View gist:aabeac3737dd5b61f7ad1576f7e6c664
scale_factor = 0.73
def alter_size(mask, percent):
"""Adjust the percent paramater to find the largest
input image size that will work with your dataset
"""
h,w = mask.shape[:2]
return cv2.resize(mask, (int(w * percent), int(h * percent)))
input_img = alter_size(input_img, scale_factor)
style_img = alter_size(style_img, scale_factor)
mask = alter_size(mask, scale_factor)
You can’t perform that action at this time.