yangwang825 commited on
Commit
138b9f0
·
1 Parent(s): 20e025e

Update esc50.py

Browse files
Files changed (1) hide show
  1. esc50.py +109 -1
esc50.py CHANGED
@@ -81,4 +81,112 @@ def fast_scandir(path: str, exts: tp.List[str], recursive: bool = False):
81
  subfolders.extend(sf)
82
  files.extend(f) # type: ignore
83
 
84
- return subfolders, files
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  subfolders.extend(sf)
82
  files.extend(f) # type: ignore
83
 
84
+ return subfolders, files
85
+
86
+
87
+ ESC50_LABELS = [
88
+ "airplane",
89
+ "breathing",
90
+ "brushing_teeth",
91
+ "can_opening",
92
+ "car_horn",
93
+ "cat",
94
+ "chainsaw",
95
+ "chirping_birds",
96
+ "church_bells",
97
+ "clapping",
98
+ "clock_alarm",
99
+ "clock_tick",
100
+ "coughing",
101
+ "cow",
102
+ "crackling_fire",
103
+ "crickets",
104
+ "crow",
105
+ "crying_baby",
106
+ "dog",
107
+ "door_wood_creaks",
108
+ "door_wood_knock",
109
+ "drinking_sipping",
110
+ "engine",
111
+ "fireworks",
112
+ "footsteps",
113
+ "frog",
114
+ "glass_breaking",
115
+ "hand_saw",
116
+ "helicopter",
117
+ "hen",
118
+ "insects",
119
+ "keyboard_typing",
120
+ "laughing",
121
+ "mouse_click",
122
+ "pig",
123
+ "pouring_water",
124
+ "rain",
125
+ "rooster",
126
+ "sea_waves",
127
+ "sheep",
128
+ "siren",
129
+ "sneezing",
130
+ "snoring",
131
+ "thunderstorm",
132
+ "toilet_flush",
133
+ "train",
134
+ "vacuum_cleaner",
135
+ "washing_machine",
136
+ "water_drops",
137
+ "wind",
138
+ ]
139
+
140
+ ESC50_LABEL2ID = {
141
+ "dog": 0,
142
+ "rooster": 1,
143
+ "pig": 2,
144
+ "cow": 3,
145
+ "frog": 4,
146
+ "cat": 5,
147
+ "hen": 6,
148
+ "insects": 7,
149
+ "sheep": 8,
150
+ "crow": 9,
151
+ "rain": 10,
152
+ "sea_waves": 11,
153
+ "crackling_fire": 12,
154
+ "crickets": 13,
155
+ "chirping_birds": 14,
156
+ "water_drops": 15,
157
+ "wind": 16,
158
+ "pouring_water": 17,
159
+ "toilet_flush": 18,
160
+ "thunderstorm": 19,
161
+ "crying_baby": 20,
162
+ "sneezing": 21,
163
+ "clapping": 22,
164
+ "breathing": 23,
165
+ "coughing": 24,
166
+ "footsteps": 25,
167
+ "laughing": 26,
168
+ "brushing_teeth": 27,
169
+ "snoring": 28,
170
+ "drinking_sipping": 29,
171
+ "door_wood_knock": 30,
172
+ "mouse_click": 31,
173
+ "keyboard_typing": 32,
174
+ "door_wood_creaks": 33,
175
+ "can_opening": 34,
176
+ "washing_machine": 35,
177
+ "vacuum_cleaner": 36,
178
+ "clock_alarm": 37,
179
+ "clock_tick": 38,
180
+ "glass_breaking": 39,
181
+ "helicopter": 40,
182
+ "chainsaw": 41,
183
+ "siren": 42,
184
+ "car_horn": 43,
185
+ "engine": 44,
186
+ "train": 45,
187
+ "church_bells": 46,
188
+ "airplane": 47,
189
+ "fireworks": 48,
190
+ "hand_saw": 49
191
+ }
192
+ ESC50_ID2LABEL = {v:k for k, v in ESC50_LABEL2ID.items()}