Rename and modify file

#1
by mandarmgd-03 - opened
Files changed (1) hide show
  1. readme → readme.md +10 -32
readme → readme.md RENAMED
@@ -29,34 +29,26 @@ The project contains:
29
  │ ├── Spin mode/
30
  └── saved_models/ # Saved trained models (.h5) + label_meta.json
31
 
32
- yaml
33
- Copy code
34
-
35
  ---
36
 
37
  ## ⚙️ Installation
38
 
39
- 1. Clone the repository and move into it:
40
  ```bash
41
  git clone <repo-url>
42
  cd washing-machine-classifier
43
  Create a virtual environment (recommended):
44
 
45
- bash
46
- Copy code
47
  python -m venv .venv
48
  source .venv/bin/activate # Linux/Mac
49
  .venv\Scripts\activate # Windows
50
- Install dependencies:
51
 
52
- bash
53
- Copy code
54
  pip install -r requirements.txt
55
- 🎶 Data Preparation
 
56
  Place your raw audio dataset in the following structure:
57
 
58
- css
59
- Copy code
60
  Washing machine/
61
  ├── 00 - Abnormal/
62
  │ ├── Bearing noise/
@@ -66,16 +58,12 @@ Washing machine/
66
  └── Spin mode/
67
  Convert .wav files to Mel-Spectrograms:
68
 
69
- bash
70
- Copy code
71
  python dl.py
72
  This will generate the MelSpectrograms/ dataset.
73
 
74
- 🏋️ Training Models
75
  Run:
76
 
77
- bash
78
- Copy code
79
  python dl.py
80
  Trains Stage 1 model (Normal vs Abnormal).
81
 
@@ -91,16 +79,12 @@ normal_model.h5
91
 
92
  label_meta.json (class name order)
93
 
94
- 🔮 Inference
95
  1) Test a single audio file
96
- bash
97
- Copy code
98
  python extractaudio.py
99
  Update the audio_file path in the script before running.
100
 
101
  2) Run the Gradio Web App
102
- bash
103
- Copy code
104
  python app.py
105
  Upload a .wav file.
106
 
@@ -108,15 +92,13 @@ View prediction result and generated spectrogram in the browser.
108
 
109
  Example output:
110
 
111
- markdown
112
- Copy code
113
  🎯 Final Prediction: Normal → Spin mode
114
 
115
  Confidence Scores:
116
  --------------------
117
  Stage 1 (Normal): 0.9876
118
  Stage 2 (Spin mode): 0.9451
119
- 📊 Model Details
120
  Input: Mel-spectrogram images (224x224x3)
121
 
122
  Backbone: Simple CNN (Conv2D + MaxPooling + Dense + Dropout)
@@ -131,7 +113,7 @@ Optimizer: Adam
131
 
132
  Metrics: Accuracy
133
 
134
- 🚀 Future Improvements
135
  Replace simple CNN with MobileNetV2 / EfficientNet for better accuracy.
136
 
137
  Add data augmentation (noise injection, pitch/time shift).
@@ -140,11 +122,9 @@ Deploy as a FastAPI service for production.
140
 
141
  Containerize with Docker.
142
 
143
- 📦 Requirements
144
  See requirements.txt:
145
 
146
- css
147
- Copy code
148
  tensorflow
149
  librosa
150
  matplotlib
@@ -153,12 +133,10 @@ fastapi
153
  uvicorn[standard]
154
  python-multipart
155
  gradio
 
156
  👨‍💻 Author
157
  Developed by Anvit – Washing-machine sound anomaly detection with hierarchical deep learning.
158
 
159
- yaml
160
- Copy code
161
-
162
  ---
163
 
164
 
 
29
  │ ├── Spin mode/
30
  └── saved_models/ # Saved trained models (.h5) + label_meta.json
31
 
 
 
 
32
  ---
33
 
34
  ## ⚙️ Installation
35
 
36
+ 1) Clone the repository and move into it:
37
  ```bash
38
  git clone <repo-url>
39
  cd washing-machine-classifier
40
  Create a virtual environment (recommended):
41
 
 
 
42
  python -m venv .venv
43
  source .venv/bin/activate # Linux/Mac
44
  .venv\Scripts\activate # Windows
 
45
 
46
+ Install dependencies:
 
47
  pip install -r requirements.txt
48
+
49
+ Data Preparation
50
  Place your raw audio dataset in the following structure:
51
 
 
 
52
  Washing machine/
53
  ├── 00 - Abnormal/
54
  │ ├── Bearing noise/
 
58
  └── Spin mode/
59
  Convert .wav files to Mel-Spectrograms:
60
 
 
 
61
  python dl.py
62
  This will generate the MelSpectrograms/ dataset.
63
 
64
+ Training Models
65
  Run:
66
 
 
 
67
  python dl.py
68
  Trains Stage 1 model (Normal vs Abnormal).
69
 
 
79
 
80
  label_meta.json (class name order)
81
 
82
+ Inference
83
  1) Test a single audio file
 
 
84
  python extractaudio.py
85
  Update the audio_file path in the script before running.
86
 
87
  2) Run the Gradio Web App
 
 
88
  python app.py
89
  Upload a .wav file.
90
 
 
92
 
93
  Example output:
94
 
 
 
95
  🎯 Final Prediction: Normal → Spin mode
96
 
97
  Confidence Scores:
98
  --------------------
99
  Stage 1 (Normal): 0.9876
100
  Stage 2 (Spin mode): 0.9451
101
+ Model Details
102
  Input: Mel-spectrogram images (224x224x3)
103
 
104
  Backbone: Simple CNN (Conv2D + MaxPooling + Dense + Dropout)
 
113
 
114
  Metrics: Accuracy
115
 
116
+ Future Improvements
117
  Replace simple CNN with MobileNetV2 / EfficientNet for better accuracy.
118
 
119
  Add data augmentation (noise injection, pitch/time shift).
 
122
 
123
  Containerize with Docker.
124
 
125
+ Requirements
126
  See requirements.txt:
127
 
 
 
128
  tensorflow
129
  librosa
130
  matplotlib
 
133
  uvicorn[standard]
134
  python-multipart
135
  gradio
136
+
137
  👨‍💻 Author
138
  Developed by Anvit – Washing-machine sound anomaly detection with hierarchical deep learning.
139
 
 
 
 
140
  ---
141
 
142