Skip to content

Commit 06b485f

Browse files
committed
Minor cleanup.
1 parent a41c6ff commit 06b485f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

posenet/posenet.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,3 @@ def print_scores(self, image_name, pose_scores, keypoint_scores, keypoint_coords
4444
print('Pose #%d, score = %f' % (pi, pose_scores[pi]))
4545
for ki, (s, c) in enumerate(zip(keypoint_scores[pi, :], keypoint_coords[pi, :, :])):
4646
print('Keypoint %s, score = %f, coord = %s' % (posenet.PART_NAMES[ki], s, c))
47-
48-
def close(self):
49-
self.model.close()

posenet/resnet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def preprocess_input(self, image):
1616
input_img = cv2.resize(image, (target_width, target_height), interpolation=cv2.INTER_LINEAR)
1717
input_img = cv2.cvtColor(input_img, cv2.COLOR_BGR2RGB).astype(np.float32) # to RGB colors
1818

19+
# See: https://github.com/tensorflow/tfjs-models/blob/master/body-pix/src/resnet.ts
1920
input_img = input_img + self.image_net_mean
2021
input_img = input_img.reshape(1, target_height, target_width, 3) # NHWC
2122
return input_img, scale

0 commit comments

Comments
 (0)