Spaces:
Build error
Build error
parokshsaxena commited on
Commit ยท
3a4de36
1
Parent(s): 0246478
changing arm width to dc, short sleeve
Browse files130 unmodified lines13113213313413513613758 unmodified lines196197198199200201202130 unmodified linesHEIGHT = int(1024)POSE_WIDTH = int(WIDTH/2) # int(WIDTH/2)POSE_HEIGHT = int(HEIGHT/2) #int(HEIGHT/2)CATEGORY = "upper_body" # "lower_body"def is_cropping_required(width, height):58 unmodified lineskeypoints = openpose_model(human_img.resize((POSE_WIDTH, POSE_HEIGHT)))model_parse, _ = parsing_model(human_img.resize((POSE_WIDTH, POSE_HEIGHT)))# internally get mask location function is resizing model_parse to 384x512 if width & height not passedmask, mask_gray = get_mask_location('hd', CATEGORY, model_parse, keypoints)mask = mask.resize((WIDTH, HEIGHT))logging.info("Mask location on model identified")else:130 unmodified lines13113213313413513613758 unmodified lines196197198199200201202130 unmodified linesHEIGHT = int(1024)POSE_WIDTH = int(WIDTH/2) # int(WIDTH/2)POSE_HEIGHT = int(HEIGHT/2) #int(HEIGHT/2)ARM_WIDTH = "dc" # "hd" # hd -> full sleeve, dc for half sleeveCATEGORY = "upper_body" # "lower_body"def is_cropping_required(width, height):58 unmodified lineskeypoints = openpose_model(human_img.resize((POSE_WIDTH, POSE_HEIGHT)))model_parse, _ = parsing_model(human_img.resize((POSE_WIDTH, POSE_HEIGHT)))# internally get mask location function is resizing model_parse to 384x512 if width & height not passedmask, mask_gray = get_mask_location(ARM_WIDTH, CATEGORY, model_parse, keypoints)mask = mask.resize((WIDTH, HEIGHT))logging.info("Mask location on model identified")else:
app.py+2-2