xiaohaoy commited on
Commit
274f87c
·
verified ·
1 Parent(s): 985410d

Scene-type figure on the final pairs

Browse files
.gitattributes CHANGED
@@ -4,8 +4,3 @@ models/final/*.npz filter=lfs diff=lfs merge=lfs -text
4
  *.safetensors filter=lfs diff=lfs merge=lfs -text
5
  *.pt filter=lfs diff=lfs merge=lfs -text
6
  *.png filter=lfs diff=lfs merge=lfs -text
7
- models/third_party/ImageBind/.assets/bird_audio.wav filter=lfs diff=lfs merge=lfs -text
8
- models/third_party/ImageBind/.assets/bird_image.jpg filter=lfs diff=lfs merge=lfs -text
9
- models/third_party/ImageBind/.assets/car_audio.wav filter=lfs diff=lfs merge=lfs -text
10
- models/third_party/ImageBind/.assets/dog_audio.wav filter=lfs diff=lfs merge=lfs -text
11
- models/third_party/ImageBind/imagebind/bpe/bpe_simple_vocab_16e6.txt.gz filter=lfs diff=lfs merge=lfs -text
 
4
  *.safetensors filter=lfs diff=lfs merge=lfs -text
5
  *.pt filter=lfs diff=lfs merge=lfs -text
6
  *.png filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
README.md CHANGED
@@ -46,13 +46,17 @@ sound of such scenes varies a lot or the model is less sure.
46
 
47
  **10-fold CV results:**
48
 
49
- | Measure | Result |
50
- |---|---|
51
- | Spearman per AQ | pleasant 0.59, eventful 0.68, chaotic 0.66, vibrant 0.56, uneventful 0.66, calm 0.64, annoying 0.58, monotonous 0.60 (mean 0.621) |
52
- | Pearson per AQ | pleasant 0.59, eventful 0.69, chaotic 0.65, vibrant 0.58, uneventful 0.67, calm 0.64, annoying 0.58, monotonous 0.62 (mean 0.626) |
53
- | RMSE / MAE (1-5 scale, mean over 8 AQs) | 0.47 / 0.38 |
54
- | 80% range: coverage / mean width / Winkler | 0.810 / 1.24 / 1.620 |
55
- |||
 
 
 
 
56
 
57
 
58
  ![Place-level average](docs/figures/place_average.png)
 
46
 
47
  **10-fold CV results:**
48
 
49
+ | Dimension | Spearman ρ | Pearson r | RMSE (1–5) | MAE (1–5) | 80% Coverage | 80% Width | Winkler Score |
50
+ |---|---|---|---|---|---|---|---|
51
+ | Eventful | 0.679 | 0.687 | 0.412 | 0.333 | 0.812 | 1.10 | 1.415 |
52
+ | Uneventful | 0.661 | 0.673 | 0.385 | 0.311 | 0.811 | 1.01 | 1.320 |
53
+ | Chaotic | 0.656 | 0.651 | 0.513 | 0.417 | 0.820 | 1.37 | 1.746 |
54
+ | Calm | 0.641 | 0.639 | 0.571 | 0.461 | 0.815 | 1.50 | 1.935 |
55
+ | Monotonous | 0.600 | 0.615 | 0.395 | 0.316 | 0.803 | 1.02 | 1.378 |
56
+ | Pleasant | 0.592 | 0.588 | 0.533 | 0.431 | 0.807 | 1.39 | 1.815 |
57
+ | Annoying | 0.575 | 0.576 | 0.602 | 0.488 | 0.809 | 1.60 | 2.067 |
58
+ | Vibrant | 0.562 | 0.577 | 0.369 | 0.291 | 0.803 | 0.93 | 1.281 |
59
+ | **Mean** | **0.621** | **0.626** | **0.472** | **0.381** | **0.810** | **1.24** | **1.620** |
60
 
61
 
62
  ![Place-level average](docs/figures/place_average.png)
docs/figures/scene_type_contrasts.png CHANGED

Git LFS Details

  • SHA256: 1692124dbe93076e188438861fa94724c234b752e68298590cc92652df1df015
  • Pointer size: 131 Bytes
  • Size of remote file: 156 kB

Git LFS Details

  • SHA256: d516d5c52203e8c9f544649db7834370079acd52b130573cc352d3e076cfcb6c
  • Pointer size: 131 Bytes
  • Size of remote file: 152 kB
runners/run_final_cv.sh CHANGED
@@ -24,7 +24,8 @@ fi
24
  run "2b Full report: every dataset, original datasets, all pooled, per AQ" scripts/model/train_test/report_cv_all.py "$out" \
25
  --score-views "$rev/score_views_final.csv"
26
  run "3 Scene types and transient events (segmentation groups, not a model input)" scripts/model/evaluation/scene_type_validation.py \
27
- --predictions "$out/range_predictions.csv" --manifest "$rev/metadata_manifest.csv" --output "$out/scene_type_validation.json"
 
28
  run "3b Scene-type figure" scripts/model/evaluation/plot_scene_contrasts.py --validation "$out/scene_type_validation.json" \
29
  --output docs/figures/scene_type_contrasts.png
30
  run "3c Place-level average figure" scripts/model/evaluation/plot_place_average.py --predictions "$out/range_predictions.csv" \
 
24
  run "2b Full report: every dataset, original datasets, all pooled, per AQ" scripts/model/train_test/report_cv_all.py "$out" \
25
  --score-views "$rev/score_views_final.csv"
26
  run "3 Scene types and transient events (segmentation groups, not a model input)" scripts/model/evaluation/scene_type_validation.py \
27
+ --predictions "$out/range_predictions.csv" --manifest "$rev/metadata_manifest.csv" --score-views "$rev/score_views_final.csv" \
28
+ --output "$out/scene_type_validation.json"
29
  run "3b Scene-type figure" scripts/model/evaluation/plot_scene_contrasts.py --validation "$out/scene_type_validation.json" \
30
  --output docs/figures/scene_type_contrasts.png
31
  run "3c Place-level average figure" scripts/model/evaluation/plot_place_average.py --predictions "$out/range_predictions.csv" \
scripts/model/evaluation/plot_scene_contrasts.py CHANGED
@@ -32,7 +32,7 @@ for ax, (key, title, g1, g2) in zip(axes, PANELS):
32
  ax.axvline(0, color=GREY, lw=1.2, zorder=0)
33
  for yi, a_, b_ in zip(y, tg, pr): ax.plot([a_, b_], [yi, yi], color=RULE, lw=2, zorder=1)
34
  ax.scatter(tg, y, s=90, color=GREY, zorder=2); ax.scatter(pr, y, s=90, color=BLUE, zorder=3)
35
- ax.set_xlim(-1.0, 1.0); ax.set_xticks([-0.5, 0, 0.5]); ax.set_xticklabels(["−0.5", "0", "+0.5"], color=QUIET)
36
  ax.set_title(f"{title}\n", fontsize=12, fontweight="bold", color=INK, pad=2)
37
  ax.text(0.5, 1.005, f"n {G[g1]['n']:,} vs {G[g2]['n']:,}", transform=ax.transAxes, ha="center", va="bottom", fontsize=10, color=QUIET)
38
  for s in ("top", "right", "left", "bottom"): ax.spines[s].set_visible(False)
 
32
  ax.axvline(0, color=GREY, lw=1.2, zorder=0)
33
  for yi, a_, b_ in zip(y, tg, pr): ax.plot([a_, b_], [yi, yi], color=RULE, lw=2, zorder=1)
34
  ax.scatter(tg, y, s=90, color=GREY, zorder=2); ax.scatter(pr, y, s=90, color=BLUE, zorder=3)
35
+ ax.set_xlim(-1.15, 1.15); ax.set_xticks([-0.5, 0, 0.5]); ax.set_xticklabels(["−0.5", "0", "+0.5"], color=QUIET)
36
  ax.set_title(f"{title}\n", fontsize=12, fontweight="bold", color=INK, pad=2)
37
  ax.text(0.5, 1.005, f"n {G[g1]['n']:,} vs {G[g2]['n']:,}", transform=ax.transAxes, ha="center", va="bottom", fontsize=10, color=QUIET)
38
  for s in ("top", "right", "left", "bottom"): ax.spines[s].set_visible(False)
scripts/model/evaluation/scene_type_validation.py CHANGED
@@ -37,6 +37,7 @@ def parse_args():
37
  default=Path("E:/soundscape_generator_ref40_usotw4/compare_ranges_spread_krr/range_predictions.csv"))
38
  p.add_argument("--manifest", type=Path, default=Path(REV) / "metadata_manifest.csv")
39
  p.add_argument("--seg", type=Path, default=Path("runs_main_all_datasets/backbone_compare/features_baseline_seg19.npz"))
 
40
  p.add_argument("--natural", type=float, default=0.40)
41
  p.add_argument("--urban", type=float, default=0.30)
42
  p.add_argument("--busy", type=float, default=0.10)
@@ -50,6 +51,8 @@ def main():
50
  a = parse_args()
51
  d = pd.read_csv(a.predictions)
52
  d = d[~d.training_dataset.isin(NEW)]
 
 
53
  m = pd.read_csv(a.manifest, low_memory=False, usecols=["view_id", "view_path"])
54
  d = d.merge(m, on="view_id").reset_index(drop=True)
55
  with np.load(a.seg, allow_pickle=True) as z:
 
37
  default=Path("E:/soundscape_generator_ref40_usotw4/compare_ranges_spread_krr/range_predictions.csv"))
38
  p.add_argument("--manifest", type=Path, default=Path(REV) / "metadata_manifest.csv")
39
  p.add_argument("--seg", type=Path, default=Path("runs_main_all_datasets/backbone_compare/features_baseline_seg19.npz"))
40
+ p.add_argument("--score-views", type=Path, default=None, help="CSV with a view_id column: only these pairs count (the report set)")
41
  p.add_argument("--natural", type=float, default=0.40)
42
  p.add_argument("--urban", type=float, default=0.30)
43
  p.add_argument("--busy", type=float, default=0.10)
 
51
  a = parse_args()
52
  d = pd.read_csv(a.predictions)
53
  d = d[~d.training_dataset.isin(NEW)]
54
+ if a.score_views is not None:
55
+ d = d[d.view_id.isin(set(pd.read_csv(a.score_views).view_id))]
56
  m = pd.read_csv(a.manifest, low_memory=False, usecols=["view_id", "view_path"])
57
  d = d.merge(m, on="view_id").reset_index(drop=True)
58
  with np.load(a.seg, allow_pickle=True) as z: