zejunyang commited on
Commit
96ea347
1 Parent(s): 62d19bd

update model

Browse files
NTED/NTED_module.py CHANGED
@@ -43,8 +43,8 @@ class NTED():
43
 
44
  self.data_loader = DemoDataset()
45
 
46
- mp_hands = mp.solutions.hands
47
- self.hands = mp_hands.Hands(static_image_mode=True, max_num_hands=2, min_detection_confidence=0.1)
48
 
49
  self.ref_img = cv2.imread('example/ref_img.png')
50
  self.ref_img = cv2.resize(self.ref_img, (352, 512))
@@ -84,9 +84,9 @@ class NTED():
84
 
85
  body_pose, bbox = self.openpose_module.detect_body_pose(img.copy())
86
 
87
- hand_pose = self.hand_pose_est(img.copy())
88
 
89
- data = self.data_loader.load_item(self.ref_img, body_pose[0], hand_pose)
90
 
91
  output = self.net_G(
92
  data['reference_image'],
 
43
 
44
  self.data_loader = DemoDataset()
45
 
46
+ # mp_hands = mp.solutions.hands
47
+ # self.hands = mp_hands.Hands(static_image_mode=True, max_num_hands=2, min_detection_confidence=0.1)
48
 
49
  self.ref_img = cv2.imread('example/ref_img.png')
50
  self.ref_img = cv2.resize(self.ref_img, (352, 512))
 
84
 
85
  body_pose, bbox = self.openpose_module.detect_body_pose(img.copy())
86
 
87
+ # hand_pose = self.hand_pose_est(img.copy())
88
 
89
+ data = self.data_loader.load_item(self.ref_img, body_pose[0], None)
90
 
91
  output = self.net_G(
92
  data['reference_image'],
NTED/fashion_512.yaml CHANGED
@@ -70,7 +70,7 @@ gen:
70
  type: NTED.extraction_distribution_model::Generator
71
  param:
72
  size: 512
73
- semantic_dim: 30
74
  channels:
75
  16: 512
76
  32: 512
@@ -124,6 +124,6 @@ data:
124
  val:
125
  batch_size: 4
126
  distributed: True
127
- hand_keypoint: True
128
 
129
 
 
70
  type: NTED.extraction_distribution_model::Generator
71
  param:
72
  size: 512
73
+ semantic_dim: 20
74
  channels:
75
  16: 512
76
  32: 512
 
124
  val:
125
  batch_size: 4
126
  distributed: True
127
+ hand_keypoint: False
128
 
129
 
NTED/nted_checkpoint.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:359d3d3bac365afe04aa8b906f1dc8891f0dd87ff1dfe5e60059b4fb9bb96af8
3
- size 284375285
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7aad6b43e6f0187aac3696dbc4d2a531fef7ab3fe5824d1d1fff9ed7e97245a
3
+ size 170512367
app.py CHANGED
@@ -18,7 +18,7 @@ gr.Interface(fn=pose_transfer,
18
  title="谷小雨姿态驱动图像",
19
  examples=[["example/exp1.png"], ["example/exp2.png"], ["example/exp3.png"],\
20
  ["example/exp4.png"], ["example/exp5.png"], ["example/exp6.png"]],
21
- ).launch(server_name='0.0.0.0')
22
 
23
  '''
24
  TODO
 
18
  title="谷小雨姿态驱动图像",
19
  examples=[["example/exp1.png"], ["example/exp2.png"], ["example/exp3.png"],\
20
  ["example/exp4.png"], ["example/exp5.png"], ["example/exp6.png"]],
21
+ ).launch(share=True) # (server_name='0.0.0.0')
22
 
23
  '''
24
  TODO