Skip to content

Commit 0872a8f

Browse files
committed
add comment
1 parent 2afcf4a commit 0872a8f

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

eval.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
-----
1111
Copyright 2018 - 2018 Shanghai Jiao Tong University, Machine Vision and Intelligence Group
1212
'''
13+
1314
import warnings
1415
warnings.filterwarnings('ignore')
1516

@@ -53,7 +54,8 @@
5354
PATH_PREFIX = "/home/yuliang/code/DeepPose-pytorch/results/{}".format(modeltype)
5455
full_name="/home/yuliang/code/DeepPose-pytorch/models/{}/{}".format(modeltype, filename)
5556
# full_name = "/home/yuliang/code/DeepPose-pytorch/models/demo/mobilenetv2_224x224-robust.t7"
56-
full_name = "/home/yuliang/code/DeepPose-pytorch/models/demo/resnet18_227x227.t7"
57+
# full_name = "/home/yuliang/code/DeepPose-pytorch/models/demo/resnet18_227x227.t7"
58+
full_name = "/home/yuliang/code/DeepPose-pytorch/models/demo/mobilenet-best.t7"
5759
ROOT_DIR = "/home/yuliang/code/deeppose_tf/datasets/mpii"
5860

5961
if modeltype == 'resnet':
@@ -66,8 +68,8 @@
6668
# load dataset
6769
test_dataset = PoseDataset(csv_file=os.path.join(ROOT_DIR,'test_joints.csv'),
6870
transform=transforms.Compose([
69-
Rescale((input_size, input_size)), # for resnet18
70-
# Wrap((input_size,input_size)), # for mobilenet
71+
# Rescale((input_size, input_size)), # for resnet18 and mobilenet
72+
Wrap((input_size,input_size)), # only for mobilenet-best
7173
Expansion(),
7274
ToTensor()
7375
]))

run_webcam.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,10 @@
4242
image = crop_camera(image)
4343

4444
while True:
45-
fps_time = time.time()
4645
ret_val , image = cam.read()
4746
image = crop_camera(image)
4847
humans = e.inference(image, args.model)
4948
image = ResEstimator.draw_humans(image, humans, imgcopy=False)
50-
51-
cv2.putText(image,
52-
"FPS: %f" % (1.0 / (time.time() - fps_time)),
53-
(10, 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5,
54-
(0, 255, 0), 2)
5549
cv2.imshow('tf-pose-estimation result', image)
5650
if cv2.waitKey(1) == 27: # ESC
5751
break

0 commit comments

Comments
 (0)