30 / docs /seld233_validation.md
schmittzhuattencent's picture
Add files using upload-large-folder tool
65ae8ca verified
|
Raw
History Blame Contribute Delete
2.39 kB
# SELD233 Spatial Validation
## Purpose
Validate the implemented `audio + spatial + text` path with a synthetic `B=3`
FOA batch whose waveform lengths differ per sample.
The validation script prints:
- processor outputs and placeholder expansion results
- `FOA -> 7ch` feature shapes
- SELD backbone hidden-state shapes
- `2.5 Hz` spatial-token shapes
- the final multimodal token tensor shape implied by the expanded prompt
If the full Qwen model is loaded, it also builds the actual multimodal
`inputs_embeds` tensor after audio and spatial injection.
## Script
- [validate_seld233_spatial_random_foa.py](/apdcephfs_cq10/share_1603164/user/schmittzhu/code/spur-qwen-2.5-omni/scripts/validate_seld233_spatial_random_foa.py)
## Recommended Run
Shape-only validation without loading the full Qwen model:
```bash
python scripts/validate_seld233_spatial_random_foa.py \
--model-id /apdcephfs_cq10/share_1603164/user/schmittzhu/model/Qwen2.5-Omni-7B \
--baseline-repo-path /apdcephfs_cq10/share_1603164/user/schmittzhu/code/DCASE2024_seld_baseline \
--seld233-checkpoint-path /apdcephfs_cq10/share_1603164/user/schmittzhu/code/DCASE2024_seld_baseline/3_1_dev_split0_multiaccdoa_foa_model.h5 \
--seld233-feature-stats-dir /apdcephfs_cq10/share_1603164/user/schmittzhu/data/seld_feat_label/starss23_plus_foa_16k_29cls
```
Full multimodal embedding construction on a single device:
```bash
python scripts/validate_seld233_spatial_random_foa.py \
--model-id /apdcephfs_cq10/share_1603164/user/schmittzhu/model/Qwen2.5-Omni-7B \
--baseline-repo-path /apdcephfs_cq10/share_1603164/user/schmittzhu/code/DCASE2024_seld_baseline \
--seld233-checkpoint-path /apdcephfs_cq10/share_1603164/user/schmittzhu/code/DCASE2024_seld_baseline/3_1_dev_split0_multiaccdoa_foa_model.h5 \
--seld233-feature-stats-dir /apdcephfs_cq10/share_1603164/user/schmittzhu/data/seld_feat_label/starss23_plus_foa_16k_29cls \
--load-qwen-model \
--device cuda:0 \
--dtype bfloat16
```
## Expected Core Shapes
For 20-second padded inputs:
- `spatial_audio`: `[B, 320000, 4]`
- `features`: `[B, 7, 1000, 64]`
- `hidden_states`: `[B, 200, 128]`
- `spatial_tokens`: `[B, T_spat_max, 256]`
`T_spat_max` depends on the longest valid sample in the batch.
## Current Limits
- `use_audio_in_video=False` only
- `image + spatial` not implemented
- `return_audio=True` not implemented for the spatial subclass