Upload folder using huggingface_hub
Browse files- .gitattributes +2 -0
- README.md +83 -0
- assets/icon.jpg +0 -0
- assets/model_pipe.png +3 -0
- assets/rmis_curve.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/model_pipe.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/rmis_curve.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,86 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: mit
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- pytorch
|
| 6 |
---
|
| 7 |
+
|
| 8 |
+
<h1 align="center">
|
| 9 |
+
FISHER
|
| 10 |
+
</h1>
|
| 11 |
+
|
| 12 |
+
<div align="center">
|
| 13 |
+
<img src="assets/rmis_curve.png" alt="Model Performances on the RMIS Benchmark" style="width:80%; max-width: 1000px">
|
| 14 |
+
</div>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
## Introduction
|
| 18 |
+
|
| 19 |
+
<div align="center">
|
| 20 |
+
<img src="assets/model_pipe.png" alt="Model Performances on the RMIS Benchmark" style="width:100%; max-width: 1500px">
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
FISHER is a **F**oundation model for **I**ndustrial **S**ignal compre**HE**nsive **R**epresentation, which models heterogeneous industrial signals (sound, vibration, voltage, etc.) in a unified manner. FISHER accepts arbitrary sampling rates and models the increment of sampling rate as the concatenation of sub-band information, which first splits a STFT spectrogram into sub-bands before processsing it by the ViT encoder. FISHER is trained by teacher student EMA self-distillation.
|
| 24 |
+
|
| 25 |
+
To evaluate the model, we develop the RMIS benchmark, which will also be open-sourced in the near future. FISHER achieves the SOTA performances on the RMIS benchmark with much more efficient scaling properties.
|
| 26 |
+
|
| 27 |
+
## Inference
|
| 28 |
+
|
| 29 |
+
Please use the following code to infer the signal representation by FISHER.
|
| 30 |
+
|
| 31 |
+
```python
|
| 32 |
+
import torch
|
| 33 |
+
import torchaudio
|
| 34 |
+
import torch.nn.functional as F
|
| 35 |
+
from transformers import AutoModel
|
| 36 |
+
|
| 37 |
+
model = AutoModel.from_pretrained('jiangab/FISHER-tiny-0723', trust_remote_code=True)
|
| 38 |
+
model = model.cuda()
|
| 39 |
+
model.eval()
|
| 40 |
+
|
| 41 |
+
wav, sr = torchaudio.load('/path/to/local/signal.wav')
|
| 42 |
+
# You can replace it with your custom loading function for other signals
|
| 43 |
+
|
| 44 |
+
wav = wav - wav.mean()
|
| 45 |
+
STFT = torchaudio.transforms.Spectrogram(
|
| 46 |
+
n_fft=25 * sr // 1000,
|
| 47 |
+
win_length=None,
|
| 48 |
+
hop_length=10 * sr // 1000,
|
| 49 |
+
power=1,
|
| 50 |
+
center=False
|
| 51 |
+
)
|
| 52 |
+
spec = torch.log(torch.abs(STFT(wav)) + 1e-10)
|
| 53 |
+
spec = spec.transpose(-2, -1) # [1, time, freq]
|
| 54 |
+
spec = (spec + 3.017344307886898) / (2.1531635155379805 * 2)
|
| 55 |
+
|
| 56 |
+
# time-wise cutoff
|
| 57 |
+
if spec.shape[-2] > 1024:
|
| 58 |
+
spec = spec[:, :1024]
|
| 59 |
+
# freq-wise padding
|
| 60 |
+
if spec.shape[-1] < model.cfg.band_width:
|
| 61 |
+
spec = F.pad(spec, (0, model.cfg.band_width - spec.shape[-1]))
|
| 62 |
+
spec = spec.unsqueeze(1).cuda()
|
| 63 |
+
|
| 64 |
+
with torch.no_grad():
|
| 65 |
+
# Use autocast for mixed precision inference. You can disable it for full precision.
|
| 66 |
+
with torch.autocast('cuda'):
|
| 67 |
+
repre = model.extract_features(spec)
|
| 68 |
+
print(repre.shape)
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## Acknowledgements
|
| 72 |
+
|
| 73 |
+
FISHER is developed based on [EAT](https://github.com/cwx-worst-one/EAT) and [fairseq](https://github.com/facebookresearch/fairseq). We thank these authors for open-sourcing their works.
|
| 74 |
+
|
| 75 |
+
## Citation
|
| 76 |
+
|
| 77 |
+
If you find FISHER useful, please cite the following paper.
|
| 78 |
+
|
| 79 |
+
```bibtex
|
| 80 |
+
@article{fan2025fisher,
|
| 81 |
+
title={FISHER: A Foundation Model for Multi-Modal Industrial Signal Comprehensive Representation},
|
| 82 |
+
author={Fan, Pingyi and Jiang, Anbai and Zhang, Shuwei and Lv, Zhiqiang and Han, Bing and Zheng, Xinhu and Liang, Wenrui and Li, Junjie and Zhang, Wei-Qiang and Qian, Yanmin and Chen, Xie and Lu, Cheng and Liu, Jia},
|
| 83 |
+
journal={arXiv preprint arXiv:2507.16696},
|
| 84 |
+
year={2025}
|
| 85 |
+
}
|
| 86 |
+
```
|
assets/icon.jpg
ADDED
|
|
assets/model_pipe.png
ADDED
|
Git LFS Details
|
assets/rmis_curve.png
ADDED
|
Git LFS Details
|