Personal research · public DCASE/MIMII data
Acoustic Vision System (AVS)
Problem
Unplanned machine failures cause costly factory downtime, and the audible/inaudible acoustic signatures of impending faults are hard to localize and classify in noisy, reverberant factory environments. AVS addresses industrial machine anomaly detection by combining acoustic imaging (sound-source localization via beamforming) with deep-learning-based anomalous-sound classification, targeting predictive-maintenance use cases. It is a personal R&D project: the methodology and architecture are validated on the public MIMII / DCASE 2020 Task 2 datasets, an open unsupervised anomalous-sound-detection benchmark, rather than on any client or production line.
What I built
- Built solo, end-to-end (backend + frontend): the full acoustic-vision pipeline from 4-channel microphone-array input through MVDR beamforming and STFT spectrogram processing to deep-learning inference and a real-time beamforming/anomaly visualization dashboard.
- Deep learning: fine-tuned an Audio Spectrogram Transformer (AST, ~87M params) with LoRA, using 0.68%-1.35% trainable parameters depending on machine type (~0.6M-1.18M) so the encoder stays frozen, with K-NN / Mahalanobis anomaly scoring over the AST embeddings.
- Self-evaluated under the open DCASE 2020 Task 2 protocol at mean AUC ~0.94 across Fan/Pump/Slider/Valve. This is a project evaluation on public benchmark data, not an official challenge submission or leaderboard result.
Design decisions
-
AST + LoRA over full fine-tuning
Context: per-machine anomaly training data is limited and dominated by normal samples, so fully fine-tuning a large (~87M-parameter) transformer risks overfitting. Options considered: train from scratch, full fine-tuning, and LoRA adaptation. Decision: use the Audio Spectrogram Transformer (AST, MIT/ast-finetuned-audioset-10-10-0.4593) with LoRA (default rank r=16, alpha=32, targeting the query/value projections), freezing the pretrained encoder. Rationale: LoRA uses 0.68%-1.35% trainable parameters depending on machine type (~589k / 0.68% at the default rank; ~1.18M / 1.35% at the higher rank used for the harder Fan machine), giving parameter-efficient adaptation without retraining the full encoder.
AST + LoRA uses 0.68%-1.35% trainable parameters depending on machine type: the ~87M-parameter encoder stays frozen while a ~0.6M-1.18M LoRA adapter is trained for each machine type. -
MVDR over Delay-and-Sum beamforming
Context: factory environments contain multiple simultaneous noise sources and strong reverberation. Options considered: Delay-and-Sum (DAS), MVDR, and MUSIC (all three are implemented in signal_processing/beamforming.py). Decision: Minimum Variance Distortionless Response (MVDR) beamforming as the primary localizer. Rationale: MVDR provides adaptive null steering to suppress interfering noise sources while preserving the signal of interest, which DAS cannot do; a coarse-to-fine grid refinement brings beamforming to real-time (RTF 0.03).
-
Multimodal fusion of acoustic features with YOLOv8 visual detection
Decision: fuse beamforming-derived acoustic localization with a YOLOv8 (yolov8n via Ultralytics) visual object-detection stream through an Uncertainty-Aware Multimodal Fusion (UAMF) layer, so anomalous-sound events can be spatially associated with equipment in the camera view. Rationale: associating the spatial acoustic estimate with visual detections (uncertainty-weighted Bayesian fusion) lets the system overlay 2D sound-source localization onto the camera image to identify the responsible machine/region; when Ultralytics is unavailable the detector falls back to a mock for pipeline testing.
-
STFT mel-spectrogram front end for the transformer
Decision: convert raw microphone-array audio into STFT/mel-spectrogram patches (via torchaudio/librosa, 16 kHz, AST 768-dim features) as the input representation for the AST model. Rationale: spectrograms expose distinctive time-frequency patterns that let the transformer's self-attention extract features distinguishing normal from anomalous machine operation; SpecAugment (freq/time masking) is applied during training. Anomaly scoring is done with a K-NN (k=5) / Mahalanobis ensemble over the AST embeddings rather than a learned classifier head.

Time-frequency (STFT) spectrogram analysis contrasting acoustic signatures of normal vs. anomalous machine operation, highlighting the distinctive time-frequency patterns used by the model to detect subtle anomalies.
In operation


Engineering foothold
| Claim | Evidence |
|---|---|
| Self-evaluation under the DCASE 2020 Task 2 protocol reaches mean AUC ~0.94 across four machine types (Fan 0.88, Pump 0.93, Slider 0.98, Valve 0.99). | results/DCASE2020_EVALUATION_SUMMARY.md and results/dcase2020_results.csv (per-machine-ID DCASE protocol): Fan 0.8846 (sota_optimized), Pump 0.9326, Slider 0.9819, Valve 0.9936. This is a project self-evaluation on the public benchmark, not an official challenge submission or leaderboard result. |
| AST + LoRA uses 0.68%-1.35% trainable parameters depending on machine type: ~0.6M-1.18M of an ~87M-parameter AST encoder. | results/SOTA_SUMMARY_20251225.md: 'trainable_params: 589,824 (0.68% of total)'; results/FULL_MODE_FINAL_REPORT.md: 'LoRA: 1.35% trainable parameters (1.18M / 87.4M)'; anomaly_detection/pretrained_encoder.py default lora_r=16, alpha=32, target query/value. |
| MVDR adaptive beamforming chosen over Delay-and-Sum for null steering in reverberant, multi-source factory audio. | signal_processing/beamforming.py implements Delay-and-Sum, MVDR, and MUSIC; README Signal Processing section. (No measured dB SNR-vs-DAS figure is published in the repo.) |
| Inference ~12 ms/sample on an RTX 4090 (batched throughput). | README.md Project Status / GPU Optimization tables report '12ms/sample inference' at RTF 0.03 on an RTX 4090; results/PHASE5_BENCHMARK_SUMMARY.md reports 49-76 files/sec at batch size 16 (~13-20 ms/file) and K-NN scoring <10 ms. The 12 ms figure is the batched/throughput-derived best case (single-sample latency runs higher). |
| ~88k lines of code across 160+ source files. | find . -name '*.py' (excluding archive/) = 166 files, total 87,520 LOC; README states '88,000+ lines across 160+ files'. |
| Automated test suite of 1,036 tests (995 passed, 41 skipped for optional dependencies). | The project-overview doc and FULL_MODE_TEST_PLAN.md: '1,036 total | 995 passed, 41 skipped (optional deps)'; HONEST_PROJECT_ASSESSMENT confirms 1,036. |
| Trained and evaluated on the open MIMII / DCASE 2020 datasets (18,019 wav files); per-machine normal-sample counts are in the thousands. | results/FULL_MODE_FINAL_REPORT.md 'MIMII (18,019 wav files)'; results/sota_final_results_20251225.md dataset stats (e.g. Fan 4,075 normal test); archive/research/DATASET_COMPLETION_REPORT.md per-machine 4k-5.5k wav files. MIMII / DCASE 2020 Task 2 are public benchmark datasets. |
Tech stack
- Deep Learning
- PyTorch 2.0+, Audio Spectrogram Transformer (AST, MIT/ast-finetuned-audioset-10-10-0.4593), LoRA adaptation (PEFT), K-NN / Mahalanobis ensemble scoring, YOLOv8 (yolov8n, Ultralytics)
- Audio Processing & DSP
- torchaudio, librosa, STFT / mel-spectrogram processing, MVDR beamforming (Delay-and-Sum, MVDR, MUSIC implemented), GCC-PHAT / TDOA localization
- Acoustic Imaging Hardware
- Microphone array (default 4-channel config), Camera (for acoustic-visual overlay), Array geometric calibration
- Benchmark & Evaluation
- DCASE 2020 Task 2 (unsupervised anomalous sound detection, open benchmark), MIMII dataset (18,019 wav files, public), 1,036 automated tests (995 passed / 41 skipped)
- Compute
- NVIDIA RTX 4090 (~12 ms/sample batched inference, RTF 0.03)
- Application
- Real-time visualization dashboard (beamforming heatmaps + anomaly results), Uncertainty-Aware Multimodal Fusion (UAMF)