Spaces:
Running

BaiYeBuTingXuan commited on
Commit
9d709c2
·
1 Parent(s): bd8120a

repair the display of track&metrics

Browse files
Files changed (1) hide show
  1. src/display/metric_guide.py +57 -42
src/display/metric_guide.py CHANGED
@@ -1,46 +1,61 @@
1
- """Reader-facing explanations of the existing metric and material contracts."""
2
 
3
 
4
  def metric_guide(task_name: str) -> str:
5
- text = ""
6
- text = text + """
7
- **Physical Motion Fidelity (PMF) ↑**
8
- compares frequency-domain energy distributions of a prediction and reference video to measure motion fidelity.
9
- Higher scores indicate more faithful physical motion.
10
- For computational efficiency, all evaluation videos are resized to a resolution of 256×256 pixels.
11
- Please refer to [PhysInOne](https://arxiv.org/abs/2604.09415) for more details.
12
- """
13
-
14
- text = text + """
15
- **PSNR ↑ / SSIM ↑ / LPIPS ↓** measure image reconstruction quality, structural similarity, and perceptual distance, respectively. LPIPS utilizes AlexNet.
16
-
17
- **PhysIQ**:
18
- - **SP IoU — Spatial IoU ↑;
19
- - **ST IoU — Spatiotemporal IoU ↑;
20
- - **WS IoU — Weighted Spatial IoU ↑.
21
-
22
- See the [Physics-IQ paper](https://arxiv.org/abs/2501.09038) for details of these the motion-mask metrics.
23
- """
24
- if task_name == "task_future_prediction":
25
- text = text + """
26
- """
 
 
 
 
 
 
27
  if task_name == "propertyEstimation":
28
- text = text + """
29
- **Reinitialized Simulation** refers to randomly changing the initial positions and orientations of the objects and comparing the simulation results across all viewpoint observations.
30
-
31
- **Physical material parameters:**
32
- - **Newtonian fluids:** μ denotes viscosity and κ denotes bulk modulus.
33
- - **Non-Newtonian fluids:** μ denotes shear modulus, κ denotes bulk modulus, τ_Y denotes the yield-stress threshold for plastic flow, and η denotes plastic viscosity.
34
- - **Elastic solids:** E denotes Young's modulus, ν is Poisson's ratio.
35
- - **Plasticine:** E, ν and τ_Y describe elastic stiffness, transverse response and the onset of permanent deformation.
36
- - **Sand:** θ_fric is the internal friction angle controlling granular yielding and flow.
37
-
38
- Please refer to the appendix of [PhysInOne](https://arxiv.org/abs/2604.09415) for additional details.
39
-
40
- **Physical Parameters Estimation:**.
41
- The table reports the mean \(\pm \) population standard deviation. All values are scaled by a factor of 100, except for the friction angle (θ_fric).
42
- """
43
- if task_name == "motionTransfer":
44
- text += """
45
- """
46
- return text
 
 
 
 
 
 
 
 
 
 
1
+ from textwrap import dedent
2
 
3
 
4
  def metric_guide(task_name: str) -> str:
5
+ parts = [
6
+ dedent("""
7
+ **Physical Motion Fidelity (PMF) ↑** compares frequency-domain
8
+ energy distributions of a prediction and reference video to
9
+ measure motion fidelity. Higher scores indicate more faithful
10
+ physical motion.
11
+
12
+ For computational efficiency, all evaluation videos are resized
13
+ to a resolution of 256×256 pixels.
14
+
15
+ Please refer to [PhysInOne](https://arxiv.org/abs/2604.09415 )
16
+ for more details.
17
+
18
+ **PSNR ↑ / SSIM ↑ / LPIPS ↓** measure image reconstruction
19
+ quality, structural similarity, and perceptual distance,
20
+ respectively. LPIPS utilizes AlexNet.
21
+
22
+ **PhysIQ:**
23
+
24
+ - **SP IoU — Spatial IoU ↑**
25
+ - **ST IoU — Spatiotemporal IoU ↑**
26
+ - **WS IoU — Weighted Spatial IoU ↑**
27
+
28
+ See the [Physics-IQ paper](https://arxiv.org/abs/2501.09038 )
29
+ for details of these motion-mask metrics.
30
+ """).strip()
31
+ ]
32
+
33
  if task_name == "propertyEstimation":
34
+ parts.append(
35
+ dedent("""
36
+ **Reinitialized Simulation** refers to randomly changing
37
+ the initial positions and orientations of the objects and
38
+ comparing the simulation results across all viewpoint
39
+ observations.
40
+
41
+ **Physical material parameters:**
42
+
43
+ - **Newtonian fluids:** μ denotes viscosity and κ denotes bulk modulus.
44
+ - **Non-Newtonian fluids:** μ denotes shear modulus, κ denotes bulk modulus, τ_Y denotes the yield-stress threshold for plastic flow, and η denotes plastic viscosity.
45
+ - **Elastic solids:** E denotes Young's modulus and ν denotes Poisson's ratio.
46
+ - **Plasticine:** E, ν, and τ_Y describe elastic stiffness, transverse response, and the onset of permanent deformation.
47
+ - **Sand:** θ_fric is the internal friction angle controlling granular yielding and flow.
48
+
49
+ Please refer to the appendix of
50
+ [PhysInOne](https://arxiv.org/abs/2604.09415 )
51
+ for additional details.
52
+
53
+ **Physical Parameters Estimation:**
54
+
55
+ The table reports the mean ± population standard deviation.
56
+ All values are scaled by a factor of 100, except for the
57
+ friction angle (θ_fric).
58
+ """).strip()
59
+ )
60
+
61
+ return "\\n\\n".join(parts)