Reem commited on
Commit
0000786
·
1 Parent(s): 7c03817
Files changed (3) hide show
  1. A12/service/ui.py +1 -2
  2. app.py +3 -4
  3. outputs/sample_results.json +6 -7
A12/service/ui.py CHANGED
@@ -18,7 +18,7 @@ def run_a12_video_tab(video_path, confidence, smoothing_strategy, smoothing_meth
18
  conf = classification.get("confidence", 0.0)
19
 
20
  summary = f"""
21
- ### A12 Pipeline Results
22
 
23
  - Classification: **{label}**
24
  - Confidence: **{conf:.2f}**
@@ -30,7 +30,6 @@ Outputs:
30
  """
31
 
32
  return (
33
- annotated_video,
34
  animation_video,
35
  csv_path,
36
  result,
 
18
  conf = classification.get("confidence", 0.0)
19
 
20
  summary = f"""
21
+ ### Pipeline Results
22
 
23
  - Classification: **{label}**
24
  - Confidence: **{conf:.2f}**
 
30
  """
31
 
32
  return (
 
33
  animation_video,
34
  csv_path,
35
  result,
app.py CHANGED
@@ -15,7 +15,7 @@ import tempfile
15
  import time
16
 
17
  # Initialize MoveNet pose estimator
18
- pose_estimator = MoveNetPoseEstimator(model_name='lightning')
19
 
20
  # COCO Keypoint definitions (17 keypoints)
21
  KEYPOINT_NAMES = [
@@ -418,7 +418,7 @@ with gr.Blocks(title="MoveNet Pose Estimation") as demo:
418
  )
419
 
420
  # A12 Video Pipeline Tab
421
- with gr.TabItem("🧪 A12 Video Pipeline"):
422
  gr.Markdown(
423
  """
424
  ### Issue #12: App development and pipeline integration
@@ -463,7 +463,7 @@ with gr.Blocks(title="MoveNet Pose Estimation") as demo:
463
  a12_run_btn = gr.Button("Run A12 pipeline", variant="primary")
464
 
465
  with gr.Column():
466
- a12_video_output = gr.Video(label="Annotated cut 2D video")
467
  a12_animation_output = gr.Video(label="3D Skeleton Animation")
468
  a12_keypoints_file = gr.File(label="3D joint CSV")
469
  a12_json_output = gr.JSON(label="Structured output")
@@ -478,7 +478,6 @@ with gr.Blocks(title="MoveNet Pose Estimation") as demo:
478
  a12_smoothing_method
479
  ],
480
  outputs=[
481
- a12_video_output,
482
  a12_animation_output,
483
  a12_keypoints_file,
484
  a12_json_output,
 
15
  import time
16
 
17
  # Initialize MoveNet pose estimator
18
+ #pose_estimator = MoveNetPoseEstimator(model_name='lightning')
19
 
20
  # COCO Keypoint definitions (17 keypoints)
21
  KEYPOINT_NAMES = [
 
418
  )
419
 
420
  # A12 Video Pipeline Tab
421
+ with gr.TabItem("🧪 Video Pipeline"):
422
  gr.Markdown(
423
  """
424
  ### Issue #12: App development and pipeline integration
 
463
  a12_run_btn = gr.Button("Run A12 pipeline", variant="primary")
464
 
465
  with gr.Column():
466
+ #a12_video_output = gr.Video(label="Annotated cut 2D video")
467
  a12_animation_output = gr.Video(label="3D Skeleton Animation")
468
  a12_keypoints_file = gr.File(label="3D joint CSV")
469
  a12_json_output = gr.JSON(label="Structured output")
 
478
  a12_smoothing_method
479
  ],
480
  outputs=[
 
481
  a12_animation_output,
482
  a12_keypoints_file,
483
  a12_json_output,
outputs/sample_results.json CHANGED
@@ -1,10 +1,9 @@
1
  {
2
  "video": "sample.webm",
3
- "total_frames": 110,
4
- "start_frame": 1,
5
- "stop_frame": 72,
6
- "exercise_frames": 72,
7
- "exercise_duration_sec": 2.4,
8
- "quality_label": "GOOD",
9
- "pipeline_version": "A8-A13 finsihed"
10
  }
 
1
  {
2
  "video": "sample.webm",
3
+ "total_frames": 30,
4
+ "recording_quality": "UGLY",
5
+ "recording_confidence": 0.338,
6
+ "recording_threshold": 0.6,
7
+ "pipeline_stopped": true,
8
+ "reason": "Poor recording quality. "
 
9
  }