webcam test
Browse files
main.py
CHANGED
@@ -113,16 +113,17 @@ def infer(video, check, kpt_thr, webcam=True):
|
|
113 |
|
114 |
else:
|
115 |
if webcam==True:
|
|
|
116 |
add_dir = str(uuid.uuid4())
|
117 |
vidname = video.split("/")[-1]
|
118 |
-
|
119 |
-
out_file = poses(inferencer, video,
|
120 |
-
fullname = os.path.join(
|
121 |
-
if i == "Estimate human 3d poses":
|
122 |
-
|
123 |
-
|
124 |
-
else:
|
125 |
-
|
126 |
|
127 |
else:
|
128 |
out_files.extend(out_file)
|
@@ -184,4 +185,6 @@ if __name__ == "__main__":
|
|
184 |
|
185 |
|
186 |
# 00000.mp4
|
187 |
-
# 000000.mp4
|
|
|
|
|
|
113 |
|
114 |
else:
|
115 |
if webcam==True:
|
116 |
+
print("WEBCAM")
|
117 |
add_dir = str(uuid.uuid4())
|
118 |
vidname = video.split("/")[-1]
|
119 |
+
vis_out_dir_web = "/".join(["/".join(video.split("/")[:-1]), add_dir])
|
120 |
+
out_file = poses(inferencer, video, vis_out_dir_web, kpt_thr)
|
121 |
+
fullname = os.path.join(vis_out_dir_web, vidname)
|
122 |
+
#if i == "Estimate human 3d poses":
|
123 |
+
# fullname = fullname[:-4]+"mp4" #Change to .mp4
|
124 |
+
# out_files.append(fullname)
|
125 |
+
#else:
|
126 |
+
out_files.append(fullname)
|
127 |
|
128 |
else:
|
129 |
out_files.extend(out_file)
|
|
|
185 |
|
186 |
|
187 |
# 00000.mp4
|
188 |
+
# 000000.mp4
|
189 |
+
|
190 |
+
|