wizzseen commited on
Commit
02de75f
·
verified ·
1 Parent(s): 6523a08

Update TryYours-Virtual-Try-On/get_densepose.py

Browse files
TryYours-Virtual-Try-On/get_densepose.py CHANGED
@@ -22,9 +22,9 @@ colormap = {
22
  24 : [248, 251, 14],
23
  }
24
 
25
- img = Image.open('./origin.jpg')
26
  img_w ,img_h = img.size
27
- with open('./data.json', 'r') as f:
28
  json_data = json.load(f)
29
  i = np.array(json_data[0])
30
 
@@ -44,4 +44,4 @@ x,y,w,h=[int(v) for v in box]
44
  bg=np.zeros((img_h,img_w,3))
45
  bg[y:y+h,x:x+w,:] = seg_img
46
  bg_img = Image.fromarray(np.uint8(bg),"RGB")
47
- bg_img.save("./HR-VITON-main/test/test/image-densepose/00001_00.jpg")
 
22
  24 : [248, 251, 14],
23
  }
24
 
25
+ img = Image.open('TryYours-Virtual-Try-On/origin.jpg')
26
  img_w ,img_h = img.size
27
+ with open('TryYours-Virtual-Try-On/data.json', 'r') as f:
28
  json_data = json.load(f)
29
  i = np.array(json_data[0])
30
 
 
44
  bg=np.zeros((img_h,img_w,3))
45
  bg[y:y+h,x:x+w,:] = seg_img
46
  bg_img = Image.fromarray(np.uint8(bg),"RGB")
47
+ bg_img.save("TryYours-Virtual-Try-On/HR-VITON-main/test/test/image-densepose/00001_00.jpg")