jiangab commited on
Commit
c1b34f6
·
verified ·
1 Parent(s): 93b42dd

Update the usage instructions.

Browse files
Files changed (1) hide show
  1. README.md +31 -52
README.md CHANGED
@@ -560,12 +560,12 @@ configs:
560
 
561
  RMIS is a benchmark dataset collection for evaluating representation learning on **multi-modal industrial signals**. It brings together the datasets used in the RMIS benchmark, covering **anomaly detection** and **fault diagnosis** across four modalities: **sound, vibration, voltage, and current**.
562
 
563
- This Hugging Face repository is meant to provide the **benchmark datasets themselves** in an easy-to-load format. If you are looking for the full benchmark codebase, evaluation pipeline, or leaderboard, please refer to the [RMIS GitHub repository](https://github.com/jianganbai/RMIS).
564
 
565
  RMIS is closely related to **FISHER**:
566
 
567
  - **FISHER** is the foundation model proposed for industrial signal representation.
568
- - **RMIS** is the benchmark used to evaluate FISHER and other signal models.
569
  - This Hugging Face repository hosts the **dataset side** of RMIS, while the GitHub repository hosts the **benchmark code and evaluation pipeline**.
570
 
571
  In the current release, the dataset includes **19 configurations**:
@@ -582,73 +582,52 @@ The split names follow the benchmark tasks:
582
  - `ad`: anomaly detection subsets
583
  - `fd`: fault diagnosis subsets
584
 
585
- Please note that this repository focuses on **dataset hosting and loading**. Detailed benchmark construction, preprocessing rationale, evaluation protocol, and model integration are documented in the RMIS GitHub repository.
586
 
587
- ## Usage
588
-
589
- Load one subset with `datasets`:
590
-
591
- ```python
592
- from datasets import load_dataset
593
-
594
- ds = load_dataset("jiangab/RMIS", "dcase20", split="ad")
595
- print(ds)
596
- print(ds[0])
597
- ```
598
-
599
- If you want decoded waveforms instead of deferred audio objects:
600
-
601
- ```python
602
- from datasets import load_dataset, Audio
603
 
604
- ds = load_dataset("jiangab/RMIS", "dcase20", split="ad")
605
- ds = ds.cast_column("audio", Audio(sampling_rate=16000))
606
 
607
- sample = ds[0]
608
- audio = sample["audio"]["array"]
609
- sr = sample["audio"]["sampling_rate"]
610
- print(audio.shape, sr)
611
  ```
612
 
613
- Load another configuration in the same way:
614
-
615
- ```python
616
- from datasets import load_dataset
617
 
618
- # fault diagnosis example
619
- fds = load_dataset("jiangab/RMIS", "umged_vib", split="fd")
620
- print(fds.column_names)
 
 
 
621
  ```
622
 
623
- If you want to download the **entire dataset repository at once** instead of loading one configuration at a time, you can download the whole Hugging Face dataset repo locally:
624
-
625
- ```python
626
- from huggingface_hub import snapshot_download
627
 
628
- local_dir = snapshot_download(
629
- repo_id="jiangab/RMIS",
630
- repo_type="dataset",
631
- )
632
- print(local_dir)
633
  ```
634
 
635
- You can also use the Hugging Face CLI:
636
 
637
- ```bash
638
- hf download jiangab/RMIS --repo-type dataset
639
- ```
640
 
641
- Please note that `load_dataset` is typically used **one configuration at a time**, while whole-repository download is useful when you want all released subsets stored locally.
642
 
643
- ## Recommended usage in the RMIS project
644
 
645
- If your goal is to **benchmark a model on RMIS**, this dataset repository is only one part of the workflow. A typical setup is:
646
 
647
- 1. Load a subset from this Hugging Face dataset repository.
648
- 2. Extract signal representations with your model.
649
- 3. Evaluate the representations with the RMIS benchmark pipeline from the GitHub repository.
650
 
651
- In other words, this repository provides the **benchmark data**, while the RMIS codebase provides the **standardized evaluation**.
652
 
653
  ## Acknowledgements
654
 
 
560
 
561
  RMIS is a benchmark dataset collection for evaluating representation learning on **multi-modal industrial signals**. It brings together the datasets used in the RMIS benchmark, covering **anomaly detection** and **fault diagnosis** across four modalities: **sound, vibration, voltage, and current**.
562
 
563
+ This Hugging Face repository mainly hosts the **benchmark datasets themselves**. If you are looking for the full benchmark codebase, evaluation pipeline, preprocessing details, or leaderboard, please refer to the [RMIS GitHub repository](https://github.com/jianganbai/RMIS).
564
 
565
  RMIS is closely related to **FISHER**:
566
 
567
  - **FISHER** is the foundation model proposed for industrial signal representation.
568
+ - **RMIS** is the benchmark used to evaluate FISHER and other signal foundation models.
569
  - This Hugging Face repository hosts the **dataset side** of RMIS, while the GitHub repository hosts the **benchmark code and evaluation pipeline**.
570
 
571
  In the current release, the dataset includes **19 configurations**:
 
582
  - `ad`: anomaly detection subsets
583
  - `fd`: fault diagnosis subsets
584
 
585
+ Please note that this repository mainly serves as a **data hosting and distribution** endpoint. For RMIS-specific preprocessing, path organization, evaluation protocol, and model integration, please refer to the RMIS GitHub repository.
586
 
587
+ ## Recommended usage in the RMIS project
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
588
 
589
+ If you want to use these datasets inside the **RMIS benchmark workflow**, please first download the [RMIS GitHub repository](https://github.com/jianganbai/RMIS), install its dependencies, and then run the provided script from that repository.
 
590
 
591
+ ```shell
592
+ git clone https://github.com/jianganbai/RMIS.git
593
+ cd RMIS/
594
+ pip install -r requirements.txt
595
  ```
596
 
597
+ Then use the following command to download and extract the Hugging Face data into RMIS-compatible local wav folders:
 
 
 
598
 
599
+ ```shell
600
+ [HF_ENDPOINT=https://hf-mirror.com] python -m utils.scripts.download_and_extract_hf_data \
601
+ --output_dir OUTPUT_DIR \
602
+ [--subset SUBSET [SUBSET ...]] \
603
+ [--remove_parquet_after_extract] \
604
+ [--force_reextract]
605
  ```
606
 
607
+ For example:
 
 
 
608
 
609
+ ```shell
610
+ python -m utils.scripts.download_and_extract_hf_data \
611
+ --output_dir datasets_hf \
612
+ --subset iiee mafaulda_sound \
613
+ --remove_parquet_after_extract
614
  ```
615
 
616
+ Here `--output_dir` is required, while `HF_ENDPOINT`, `--subset`, `--remove_parquet_after_extract`, and `--force_reextract` are optional. If `--subset` is omitted, the script processes all RMIS subsets.
617
 
618
+ In the RMIS project, the Hugging Face route is mainly intended to treat this repository as a **cloud storage backend** and materialize the data into the same local wav-style directory layout used by the other RMIS download paths.
 
 
619
 
620
+ ## Additional usage
621
 
622
+ If you are interested in more customized workflows, you may also directly use the metadata and parquet assets attached to this Hugging Face repository to develop your own data loading, conversion, or preprocessing utilities.
623
 
624
+ However, for most users who want to reproduce RMIS experiments, the recommended path is still:
625
 
626
+ 1. Download the RMIS GitHub repository.
627
+ 2. Follow the benchmark instructions there.
628
+ 3. Use the provided Hugging Face download-and-extract script when you prefer the Hugging Face storage route.
629
 
630
+ For more details about RMIS, including benchmark construction, evaluation, and usage, please refer to the [RMIS GitHub repository](https://github.com/jianganbai/RMIS).
631
 
632
  ## Acknowledgements
633