visualization
Browse files
main.py
CHANGED
@@ -17,16 +17,15 @@ def poses(photo):
|
|
17 |
thickness=2)
|
18 |
|
19 |
print("[INFO]: Visualizing results!")
|
|
|
|
|
|
|
|
|
20 |
|
21 |
# The MMPoseInferencer API employs a lazy inference approach,
|
22 |
# creating a prediction generator when given input
|
23 |
-
result = next(result_generator)
|
24 |
-
|
25 |
-
print("[INFO]: Type of vis is ", type(result['visualization']))
|
26 |
-
|
27 |
-
print("[INFO]: Vis is ", type(result['visualization']))
|
28 |
-
|
29 |
-
return "000000.jpg"
|
30 |
|
31 |
# # specify detection model by alias
|
32 |
# # the available aliases include 'human', 'hand', 'face', 'animal',
|
@@ -41,8 +40,8 @@ def poses(photo):
|
|
41 |
def run():
|
42 |
#https://github.com/open-mmlab/mmpose/blob/main/docs/en/user_guides/inference.md
|
43 |
demo = gr.Interface(fn=poses,
|
44 |
-
inputs=gr.
|
45 |
-
outputs=gr.
|
46 |
|
47 |
|
48 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
17 |
thickness=2)
|
18 |
|
19 |
print("[INFO]: Visualizing results!")
|
20 |
+
print(os.listdir())
|
21 |
+
print(result_generator[0])
|
22 |
+
#print("[INFO]: Type of vis is ", type(result_generator['visualization']))
|
23 |
+
#print("[INFO]: Vis is ", type(result_generator['visualization']))
|
24 |
|
25 |
# The MMPoseInferencer API employs a lazy inference approach,
|
26 |
# creating a prediction generator when given input
|
27 |
+
#result = next(result_generator)
|
28 |
+
return "000000.mp4"
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
# # specify detection model by alias
|
31 |
# # the available aliases include 'human', 'hand', 'face', 'animal',
|
|
|
40 |
def run():
|
41 |
#https://github.com/open-mmlab/mmpose/blob/main/docs/en/user_guides/inference.md
|
42 |
demo = gr.Interface(fn=poses,
|
43 |
+
inputs=gr.Video(source="webcam"),
|
44 |
+
outputs=gr.Video())
|
45 |
|
46 |
|
47 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|