https://github.com/bagustris/machinery-asd
masd: machinery anomalous sound detection
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.6%) to scientific vocabulary
Keywords
Repository
masd: machinery anomalous sound detection
Basic Info
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Anomaly sound detection with CCC Loss function
Downloading dataset
First, you need to download the IDMT and MIMII datasets. I located these data
inside data directory. If you locate them elsewhere, you need to adjust those paths (in baseline.py).
Link for download:
- IDMT: https://zenodo.org/record/7551261
- MIMII Pump: https://www.kaggle.com/datasets/senaca/mimii-pump-sound-dataset
Installation
The code is tested to work on Python 3.8; Python versions higher than 3.8 should work, too, although it is not tested. The following requirements for installation are only to make it work with my GPU and Python versions. As long as all required libraries can be installed, there should be no problem with running the program.
bash
pip install -r requirements.txt # gpu
pip install -r requirements-cpu.txt # cpu
Running the code
IDMT works out of the box with default MSE loss. You only need to run baseline4.py.
```bash $ python baseline5.py ... The error threshold is set to be: 100.9849967956543 precision recall f1-score support
Normal 0.99 0.70 0.82 669
Anomaly 0.77 0.99 0.87 665
accuracy 0.85 1334
macro avg 0.88 0.85 0.84 1334 weighted avg 0.88 0.85 0.84 1334
Confusion Matrix [[468 201] [ 5 660]] AUC: 0.8907133304112299 PAUC: 0.6234260420936694 Execution time: 39060.11 seconds ```
If you want to evaluate the MIMII dataset, then use the argument --dataset mimii. If you want to use CCC loss function, then use argument --loss ccc. Finally, there is an option to use reassigned spectrogram feature in addition to the melspectrogram. Use argument--feature reassigned. By default, loss history, distribution of errors, and confusion matrix are not shown. Use argument--plot to show these figures.
```bash $ python baseline5.py --dataset mimii --loss ccc --feature reassigned
Options:
--dataset DATASET Dataset to use for training and testing {idmt, mimii} --feature FEATURE Feature type to use for training and testing {mel, reassigned} --loss LOSS Loss function to use for training the model {mse, ccc, mae, mape} --plot Flag to plot the training loss (store true if flagged) --seed SEED Seed number (default to 42) ```
Results
Since I utilized GPU for training, the results is not reproducible. However, the results should be similar to the following if using CPU.
```bash # ./baseline5.py # CPU The error threshold is set to be: 107.05306549072266 precision recall f1-score support
Normal 0.95 0.72 0.82 669
Anomaly 0.78 0.96 0.86 665
accuracy 0.84 1334
macro avg 0.86 0.84 0.84 1334 weighted avg 0.86 0.84 0.84 1334
Confusion Matrix [[485 184] [ 27 638]] AUC: 0.8304168492981331 PAUC: 0.553538081692312
# ./run_mimii.sh # CPU The error threshold is set to be: 624.5870361328125 precision recall f1-score support
Normal 0.84 0.78 0.81 138
Anomaly 0.79 0.86 0.82 138
accuracy 0.82 276
macro avg 0.82 0.82 0.81 276 weighted avg 0.82 0.82 0.81 276
Confusion Matrix [[107 31] [ 20 118]] AUC: 0.8997584541062801 PAUC: 0.8226268254126179 ```
Citation
bibtex
B.T. Atmaja, 2024. "Evaluating Hyperparameter Optimization for Machinery Anomalous Sound Detection", In proc. TENCON 2024 Singapore (Accepted, TBA)
References:
Owner
- Name: Bagus Tris Atmaja
- Login: bagustris
- Kind: user
- Location: Tsukuba
- Company: AIST
- Website: http://www.bagustris.blogspot.com
- Twitter: btatmaja
- Repositories: 221
- Profile: https://github.com/bagustris
Researcher @aistairc @VibrasticLab
GitHub Events
Total
- Watch event: 1
- Push event: 1
Last Year
- Watch event: 1
- Push event: 1
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Bagus Tris Atmaja | b****s@o****m | 36 |
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- librosa ==0.9.2
- matplotlib ==3.7.0
- numpy ==1.23.5
- scikit-learn ==1.2.2
- seaborn ==0.12.2
- tensorflow ==2.15.0
- tensorflow-estimator ==2.15.0
- librosa ==0.9.2
- matplotlib ==3.7.0
- numpy ==1.23.5
- scikit-learn ==1.2.2
- seaborn ==0.12.2
- tensorflow ==2.13.1
- tensorflow-estimator ==2.13.1