Spaces:
Sleeping
Sleeping
Update TryYours-Virtual-Try-On/posenet/converter/tfjs2pytorch.py
Browse files
TryYours-Virtual-Try-On/posenet/converter/tfjs2pytorch.py
CHANGED
@@ -96,9 +96,9 @@ def convert(model_id, model_dir, output_stride=16, image_size=513, check=True):
|
|
96 |
checkpoint_path = os.path.join(model_dir, checkpoint_name) + '.pth'
|
97 |
torch.save(m.state_dict(), checkpoint_path)
|
98 |
|
99 |
-
if check and os.path.exists("
|
100 |
# Result
|
101 |
-
input_image = _read_imgfile("
|
102 |
input_image = np.array(input_image, dtype=np.float32)
|
103 |
input_image = input_image.reshape(1, 3, height, width)
|
104 |
input_image = torch.Tensor(input_image)
|
|
|
96 |
checkpoint_path = os.path.join(model_dir, checkpoint_name) + '.pth'
|
97 |
torch.save(m.state_dict(), checkpoint_path)
|
98 |
|
99 |
+
if check and os.path.exists("TryYours-Virtual-Try-On/posenet/converter/images/tennis_in_crowd.jpg"):
|
100 |
# Result
|
101 |
+
input_image = _read_imgfile("TryYours-Virtual-Try-On/posenet/converter/images/tennis_in_crowd.jpg", width, height)
|
102 |
input_image = np.array(input_image, dtype=np.float32)
|
103 |
input_image = input_image.reshape(1, 3, height, width)
|
104 |
input_image = torch.Tensor(input_image)
|