From fbde3ec08f9dfeba9d63b807f4cbb78fefeb1543 Mon Sep 17 00:00:00 2001 From: ruipu huang Date: Fri, 12 Jul 2019 11:11:30 +1000 Subject: [PATCH 1/5] 12 --- src/assignment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assignment.py b/src/assignment.py index f7d1838d..67c2cd14 100644 --- a/src/assignment.py +++ b/src/assignment.py @@ -109,7 +109,7 @@ def hail_taxi(img): hail_taxi(image) # Debugging statement: remove before demonstration. - # print([(POSE_COCO_BODY_PARTS[k], v.x, v.y) for k,v in human.body_parts.items()]) + print([(POSE_COCO_BODY_PARTS[k], v.x, v.y) for k,v in human.body_parts.items()]) # drawing lines on an image image = TfPoseEstimator.draw_humans(image, humans, imgcopy=False) From 9f6402139e12d078f508d9be3e511570dc770e82 Mon Sep 17 00:00:00 2001 From: ruipu huang Date: Wed, 17 Jul 2019 13:18:01 +1000 Subject: [PATCH 2/5] 1 --- src/assignment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assignment.py b/src/assignment.py index 67c2cd14..b88f1b14 100644 --- a/src/assignment.py +++ b/src/assignment.py @@ -106,10 +106,10 @@ def hail_taxi(img): # TODO ensure it only does this when someone is hailing a taxi. # That is, an arm is above their head. - hail_taxi(image) + hail_taxi(image) # Debugging statement: remove before demonstration. - print([(POSE_COCO_BODY_PARTS[k], v.x, v.y) for k,v in human.body_parts.items()]) + print([(POSE_COCO_BODY_PARTS[k], v.x, v.y) for k,v in human.body_parts.items()]) # drawing lines on an image image = TfPoseEstimator.draw_humans(image, humans, imgcopy=False) From 54ec10927a57ebdaa537bee2de3ccbf0f115b94a Mon Sep 17 00:00:00 2001 From: ruipu huang Date: Thu, 18 Jul 2019 12:23:25 +1000 Subject: [PATCH 3/5] 1 --- src/assignment.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/assignment.py b/src/assignment.py index b88f1b14..2f9a9595 100644 --- a/src/assignment.py +++ b/src/assignment.py @@ -106,11 +106,25 @@ def hail_taxi(img): # TODO ensure it only does this when someone is hailing a taxi. # That is, an arm is above their head. - hail_taxi(image) - # Debugging statement: remove before demonstration. - print([(POSE_COCO_BODY_PARTS[k], v.x, v.y) for k,v in human.body_parts.items()]) + Nose = 1 + Rightside = 1 + Leftside = 1 + + for k,v in human.body_parts.items(): + if POSE_COCO_BODY_PARTS[k] == "Nose": + Nose = v.y + elif POSE_COCO_BODY_PARTS[k] == "RElbow" or POSE_COCO_BODY_PARTS[k] == "RWrist": + Rightside = v.y + elif POSE_COCO_BODY_PARTS[k] == "LElbow" or POSE_COCO_BODY_PARTS[k] == "LWrist": + Leftside = v.y + if Leftside < Nose or Rightside < Nose: + hail_taxi(image) + + # Debugging statement: remove before demonstration. + # print([(POSE_COCO_BODY_PARTS[k], v.x, v.y) for k,v in human.body_parts.items()]) + # drawing lines on an image image = TfPoseEstimator.draw_humans(image, humans, imgcopy=False) @@ -122,4 +136,4 @@ def hail_taxi(img): if cv2.waitKey(1) == 27: break - cv2.destroyAllWindows() + cv2.destroyAllWindows() \ No newline at end of file From 61451f87c4a66600aa512a57ea19d4c637b9fe33 Mon Sep 17 00:00:00 2001 From: ruipu huang Date: Thu, 18 Jul 2019 21:39:19 +1000 Subject: [PATCH 4/5] done! --- src/assignment.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/assignment.py b/src/assignment.py index 2f9a9595..548a4725 100644 --- a/src/assignment.py +++ b/src/assignment.py @@ -136,4 +136,13 @@ def hail_taxi(img): if cv2.waitKey(1) == 27: break - cv2.destroyAllWindows() \ No newline at end of file + cv2.destroyAllWindows() + + "username_me": "ruperthuang1", + "username_partner": "JayChen-AQ6666", + "commit_me": "https://github.com/ruperthuang1/tf-pose-estimation/commit/", + "commit_partner": "https://github.com/JayChen-AQ6666/tf-pose-estimation/commit/", + "commit_coauthor": "https://github.com/JayChen-AQ6666/tf-pose-estimation/commit/", + "screenshot_me": "/path/to/your/screenshot.jpg", + "screenshot_partner": "/path/to/partner/screenshot.jpg" +} \ No newline at end of file From 5f07dd96f7df3ab5b104ca6241973bdae053f243 Mon Sep 17 00:00:00 2001 From: JayChen-AQ6666 <51466085+JayChen-AQ6666@users.noreply.github.com> Date: Fri, 19 Jul 2019 11:50:32 +1000 Subject: [PATCH 5/5] Update assignment.py --- src/assignment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assignment.py b/src/assignment.py index 548a4725..2e18ffd2 100644 --- a/src/assignment.py +++ b/src/assignment.py @@ -144,5 +144,5 @@ def hail_taxi(img): "commit_partner": "https://github.com/JayChen-AQ6666/tf-pose-estimation/commit/", "commit_coauthor": "https://github.com/JayChen-AQ6666/tf-pose-estimation/commit/", "screenshot_me": "/path/to/your/screenshot.jpg", - "screenshot_partner": "/path/to/partner/screenshot.jpg" -} \ No newline at end of file + "screenshot_partner": "/path/to/Jay/screenshot.jpg" +}