parokshsaxena commited on
Commit
19ca9bb
β€’
1 Parent(s): f158937

removing assert on hard coded dim, making pos height and widht by 8

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. preprocess/openpose/run_openpose.py +1 -1
app.py CHANGED
@@ -123,8 +123,8 @@ pipe.unet_encoder = UNet_Encoder
123
 
124
  WIDTH = 4160 # 768
125
  HEIGHT = 6240 # 1024
126
- POSE_WIDTH = int(WIDTH/2)
127
- POSE_HEIGHT = int(HEIGHT/2)
128
 
129
  @spaces.GPU
130
  def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_steps,seed):
 
123
 
124
  WIDTH = 4160 # 768
125
  HEIGHT = 6240 # 1024
126
+ POSE_WIDTH = int(WIDTH/8)
127
+ POSE_HEIGHT = int(HEIGHT/8)
128
 
129
  @spaces.GPU
130
  def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_steps,seed):
preprocess/openpose/run_openpose.py CHANGED
@@ -44,7 +44,7 @@ class OpenPose:
44
  input_image = HWC3(input_image)
45
  input_image = resize_image(input_image, resolution)
46
  H, W, C = input_image.shape
47
- assert (H == 512 and W == 384), 'Incorrect input image shape'
48
  pose, detected_map = self.preprocessor(input_image, hand_and_face=False)
49
 
50
  candidate = pose['bodies']['candidate']
 
44
  input_image = HWC3(input_image)
45
  input_image = resize_image(input_image, resolution)
46
  H, W, C = input_image.shape
47
+ # assert (H == 512 and W == 384), 'Incorrect input image shape'
48
  pose, detected_map = self.preprocessor(input_image, hand_and_face=False)
49
 
50
  candidate = pose['bodies']['candidate']