xiph / rnnoise

Recurrent neural network for audio noise reduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Training on MS-SNSD dataset.

Vatsalparsaniya opened this issue · comments

Hi,

I'm currently working on the MS-SNSD dataset. I'm concerned about training. With a newly trained model, it appears that the model is not effectively removing noise. If someone could provide any original model training logs, such as loss value, or any suggestions for new training data, that would be greatly appreciated. For your convenience, I've attached my training logs. Mentioned logs are related to 5000000 87 matrix size.

Thank you.

epoch denoise_output_loss denoise_output_msse loss vad_output_loss vad_output_msse val_denoise_output_loss val_denoise_output_msse val_loss val_vad_output_loss val_vad_output_msse
0 0.277807862 0.083824538 4.936632633 4.316120148 0.178233564 0.162249416 0.054906495 3.086211443 2.92640543 0.15961656
1 0.14725025 0.050103672 2.701545715 2.457025766 0.150586367 0.13128525 0.046208765 2.479646921 2.332502127 0.152837604
2 0.125322089 0.043398798 2.312531471 2.117510319 0.143163741 0.116749898 0.040676013 2.260505676 2.184876204 0.147582531
3 0.113126785 0.039536335 2.119769096 1.975836754 0.138473868 0.110693999 0.038671717 2.138325214 2.061576605 0.146843165
4 0.10468749 0.036913026 1.989872217 1.884773493 0.137551606 0.102471903 0.035870705 2.019652605 1.988615274 0.144406497
5 0.098515481 0.034943588 1.890122771 1.808653116 0.135145962 0.101427473 0.034957603 1.969513416 1.909164786 0.142007589
6 0.092893325 0.033172369 1.795395017 1.731581211 0.13200216 0.094414122 0.033851106 1.840817332 1.791978717 0.136471659
7 0.090098791 0.032227267 1.725881815 1.64838469 0.127640486 0.093193941 0.032928839 1.771299243 1.677286148 0.129717037
8 0.084921993 0.030699184 1.644946456 1.589991212 0.123496875 0.087600641 0.031323321 1.691031456 1.628561616 0.126098394
9 0.082178704 0.029898372 1.594725609 1.544363976 0.121867754 0.085205704 0.030623959 1.632296324 1.558938384 0.124200784
10 0.079842709 0.029072098 1.554388523 1.51035738 0.120459281 0.086194471 0.030734459 1.630566835 1.535652518 0.122581661
11 0.077727392 0.028335748 1.530058861 1.503953934 0.120508388 0.084612399 0.029853929 1.625444651 1.557000518 0.12362469
12 0.076075248 0.027911277 1.501261234 1.479350448 0.118543155 0.080972508 0.029085949 1.570648432 1.520154238 0.12277019
13 0.073545225 0.027089169 1.457532287 1.442442775 0.117102169 0.081039242 0.029151123 1.585147023 1.547767878 0.123148233
14 0.072017193 0.026581047 1.439532995 1.436959386 0.117526442 0.080219135 0.028541503 1.542036891 1.47790432 0.121833324
15 0.070436485 0.026103597 1.416417956 1.422296762 0.117036775 0.076532096 0.027521361 1.503731489 1.474985957 0.121445864
16 0.068757214 0.025541322 1.38733685 1.397672296 0.11553292 0.075835615 0.026930729 1.494167686 1.469742894 0.121407032
17 0.068221696 0.025328709 1.376618981 1.386901379 0.115429692 0.074705087 0.026826652 1.470400691 1.44477272 0.119538933
18 0.06687554 0.024924258 1.363590002 1.387718916 0.115009278 0.073446862 0.026153978 1.467436433 1.463960767 0.121237278
19 0.06502533 0.024352927 1.333749056 1.364996076 0.113998361 0.072945468 0.026519923 1.442969561 1.425011635 0.119125254
20 0.064428098 0.024164079 1.327728033 1.364855766 0.114265375 0.071529858 0.025686663 1.429666519 1.426673532 0.118306249
21 0.063549414 0.023849962 1.311259747 1.349447489 0.113097042 0.070458069 0.025599465 1.424095035 1.436923504 0.121044591
22 0.061821107 0.023310484 1.285154104 1.331761956 0.112305969 0.071440145 0.0262175 1.41734004 1.403733492 0.119883724
23 0.06237492 0.023483163 1.290254951 1.330843925 0.112772964 0.069816694 0.025331283 1.398447275 1.398370981 0.117302798
24 0.060284805 0.022783566 1.263910651 1.31991744 0.111912303 0.071241751 0.025446629 1.419032097 1.41100049 0.118890956
25 0.059636645 0.022596648 1.24794364 1.300906539 0.110803321 0.06879171 0.024924228 1.4060812 1.434061289 0.120376065
26 0.059274346 0.022472076 1.240952969 1.294134021 0.110357225 0.067974903 0.024804341 1.402045012 1.442286968 0.121957615
27 0.059096206 0.022342756 1.23467052 1.285092831 0.110241853 0.070089288 0.025121268 1.387037396 1.369942665 0.117279232
28 0.058551926 0.022193663 1.232606292 1.291808128 0.110621899 0.068336934 0.024847548 1.377676964 1.386227489 0.118399121
29 0.057078321 0.021772761 1.212597489 1.281222224 0.109737732 0.066819072 0.024233047 1.362702847 1.386599779 0.118223593
30 0.056276508 0.021504421 1.195847511 1.263722062 0.109091923 0.070473634 0.024401575 1.38998425 1.368035555 0.117012046
31 0.057639696 0.02184936 1.206756711 1.258235693 0.108348235 0.067127489 0.024062002 1.35485971 1.364665389 0.116857514
32 0.056365065 0.021476185 1.190656662 1.251490116 0.107960619 0.066850565 0.0242588 1.350646496 1.361740351 0.115812346
33 0.054929797 0.021057999 1.170358181 1.239563107 0.107397266 0.06429822 0.023417788 1.325044394 1.361550093 0.116519935
34 0.054439619 0.020877834 1.170399427 1.249415755 0.107915297 0.065186568 0.023648752 1.32585454 1.345369816 0.11646945
35 0.053885262 0.020714192 1.156339645 1.232352018 0.107047997 0.065487266 0.023502955 1.300282121 1.288180351 0.112204134
36 0.05424149 0.02077391 1.154040813 1.220595479 0.105990626 0.06580478 0.02397698 1.354238153 1.389704823 0.117709421
37 0.054838642 0.020989744 1.158929348 1.218387604 0.10623128 0.063743047 0.023353871 1.301691651 1.325805068 0.114501752
38 0.054011583 0.020710686 1.172326684 1.261689067 0.109077178 0.07156761 0.024920879 1.40762198 1.381138444 0.117226742
39 0.055646159 0.021150418 1.164248466 1.212793827 0.105607592 0.064289041 0.023199927 1.292366505 1.296151161 0.112037733
40 0.052581806 0.020285664 1.167790532 1.281126261 0.109761201 0.064158663 0.0232304 1.410330892 1.534655333 0.129678547
41 0.052528705 0.020233741 1.169872403 1.286321163 0.109520897 0.063294068 0.023193892 1.282368779 1.295990229 0.111499466
42 0.051467013 0.019901626 1.120140314 1.208059192 0.105092637 0.062518999 0.02273605 1.321041226 1.388808012 0.118830107
43 0.051367346 0.019844875 1.10790956 1.185564756 0.104015298 0.062279209 0.022957934 1.28762126 1.326735616 0.11410144
44 0.053755511 0.020579841 1.296956062 1.515858531 0.125821799 0.067373723 0.024013478 1.423170447 1.495900989 0.126706839
45 0.052778229 0.020328367 1.201714635 1.344877958 0.114455827 0.063838996 0.022948263 1.330851793 1.381919622 0.118123442
46 0.05284974 0.020304816 1.170595646 1.281174898 0.11060185 0.063584439 0.02310141 1.327714324 1.38069737 0.1184479
47 0.050626874 0.01965115 1.128409624 1.24122417 0.107545443 0.061165106 0.022409378 1.302204251 1.378035545 0.118057385
48 0.050025597 0.019470917 1.134742737 1.265890956 0.109215096 0.06313099 0.022737723 1.28644383 1.307169557 0.112384647
49 0.049829461 0.019382397 1.11899972 1.238299727 0.107125171 0.060386565 0.022034302 1.266307831 1.321761727 0.113461599
50 0.049147621 0.019166317 1.093360186 1.200634003 0.104635097 0.0613387 0.02234566 1.290529609 1.351138473 0.114968568
51 0.050364699 0.019526904 1.145530462 1.280607104 0.111132912 0.061849728 0.022593461 1.277987838 1.315803885 0.113951303
52 0.04978561 0.019360704 1.112915635 1.226925611 0.107764125 0.060988061 0.02230938 1.272783518 1.322596669 0.114191324
53 0.048467554 0.018943133 1.085205197 1.197838902 0.104975276 0.060201395 0.021957753 1.259278297 1.311296821 0.113411553
54 0.047972228 0.018792083 1.065546274 1.168405652 0.10316918 0.059161965 0.02192119 1.243505001 1.300517082 0.113189794
55 0.047874015 0.018748101 1.069730759 1.178716302 0.103918768 0.058944896 0.02180201 1.245008707 1.307842493 0.113128088
56 0.049497649 0.019166473 1.070096016 1.146949768 0.101513393 0.062867999 0.022271547 1.30668962 1.352711558 0.115792729
57 0.049550354 0.019266907 1.087515354 1.180695534 0.104149312 0.060220022 0.022137268 1.260449529 1.313153982 0.114332795
58 0.047556888 0.018651647 1.069946051 1.185398221 0.104713187 0.059056349 0.021725098 1.254195571 1.323896408 0.114425816
59 0.046943001 0.018449638 1.048458457 1.154678941 0.102717869 0.060988951 0.022028988 1.260731578 1.298294902 0.112788036
60 0.046768203 0.018393315 1.037602067 1.136441469 0.101543702 0.059968986 0.021921033 1.270510793 1.33823216 0.1156734
61 0.047136329 0.018492302 1.064345837 1.182544708 0.104824483 0.070466414 0.024696214 1.414013028 1.415263772 0.120024256
62 0.056599069 0.0213244 1.186549902 1.237646461 0.108224809 0.062825739 0.023086157 1.306119204 1.352221727 0.116400033
63 0.049350023 0.019286456 1.122260451 1.25400126 0.107385017 0.06094633 0.022468258 1.342511654 1.46256268 0.120329596
64 0.047547337 0.018689118 1.116362929 1.278232336 0.107966945 0.059067115 0.02174034 1.278575301 1.372252226 0.115076743
65 0.046434831 0.018291632 1.073754668 1.215248346 0.104587048 0.058644526 0.021595331 1.265408397 1.354354143 0.115512878
66 0.045924958 0.018134071 1.050490499 1.178901672 0.103122875 0.058980059 0.02151422 1.244238377 1.305288196 0.113567896
67 0.045783073 0.018064877 1.039833188 1.160408258 0.1028364 0.057876095 0.021246238 1.2393924 1.317657948 0.114687949
68 0.04537154 0.017943451 1.037867546 1.164692163 0.10271398 0.058253016 0.02165867 1.237176776 1.305672884 0.112012506
69 0.045709226 0.018043771 1.02576828 1.133722663 0.101050094 0.058304597 0.021261116 1.211787581 1.253843427 0.110503748
70 0.045772057 0.018041134 1.030735612 1.142379165 0.102049112 0.058039304 0.021237534 1.234414577 1.304381371 0.113008417
71 0.045924839 0.018054105 1.055251837 1.18833673 0.105941825 0.060657978 0.021602556 1.287168622 1.357496381 0.11832764
72 0.046231955 0.018201023 1.037605882 1.146877408 0.102390692 0.061255027 0.02214992 1.277098179 1.325389743 0.115037121
73 0.04766044 0.018604834 1.033296227 1.109659672 0.100261591 0.060649522 0.021989007 1.280479193 1.344227076 0.117674612
74 0.047141735 0.018483473 1.062138081 1.177688837 0.103984945 0.065932587 0.022638986 1.311932802 1.301448584 0.113051556
75 0.048433039 0.01892077 1.069955945 1.167467833 0.103669532 0.062852837 0.022055503 1.459240913 1.657626748 0.134410232
76 0.045918912 0.018098757 1.034736991 1.147285104 0.102354303 0.057768185 0.021152345 1.219621301 1.280058146 0.112179443
77 0.044629641 0.017701628 1.003587842 1.11075449 0.099846676 0.057266992 0.020946516 1.211366177 1.273556232 0.110988148
78 0.044414859 0.017616907 0.99581176 1.099483848 0.09922196 0.058055464 0.021051383 1.20634973 1.247738957 0.110417947
79 0.044296689 0.01758546 1.03515327 1.180513024 0.104434565 0.05817489 0.020977274 1.237697482 1.308030963 0.113206051
80 0.044322357 0.017585257 1.01997304 1.149624586 0.102091685 0.058181718 0.021047153 1.233620644 1.299724102 0.112936825
81 0.043722969 0.017386308 0.987408221 1.096467495 0.099803999 0.057233438 0.020971036 1.207525611 1.266484857 0.111727774
82 0.043506805 0.017323388 0.999294698 1.124549389 0.101834521 0.056039192 0.020849874 1.266586661 1.40847826 0.123935044
83 0.04441274 0.017606942 1.077052593 1.261928439 0.109909743 0.058557816 0.020981949 1.230921388 1.286752939 0.111315668
84 0.043531176 0.017334253 0.993886948 1.113208532 0.099543475 0.057894494 0.020919226 1.215160608 1.268481612 0.110472575
85 0.043198586 0.0172162 0.983981431 1.100033998 0.099445798 0.058759317 0.021264385 1.217504025 1.255858064 0.110974781
86 0.043804925 0.017410008 1.097091079 1.314111114 0.111110233 0.061358105 0.022200989 1.337431908 1.443718433 0.121837415
87 0.047285058 0.018395772 1.147783875 1.345866919 0.115167208 0.063814893 0.022352593 1.314338803 1.348356009 0.116375968
88 0.04535652 0.017891204 1.052522898 1.193877816 0.10507521 0.058184624 0.021065332 1.229843616 1.291945219 0.112518586
89 0.043807093 0.017421886 1.008706331 1.137212396 0.101327263 0.057586245 0.0209173 1.211767554 1.267742395 0.110647388
90 0.043011062 0.017167462 0.987444222 1.110591292 0.100247458 0.057984903 0.02147533 1.239389181 1.3149966 0.114182211
91 0.042638458 0.017059904 0.984667659 1.112476587 0.09977749 0.056208298 0.0205002 1.242490053 1.356718302 0.116118252
92 0.042503152 0.016988028 1.015791535 1.177417994 0.104280479 0.057145752 0.021027483 1.208381057 1.26973772 0.110749207
93 0.042445373 0.016975291 0.975516737 1.098009825 0.099106967 0.057247568 0.020964945 1.207925558 1.266776919 0.111799084
94 0.042386394 0.016956339 0.99459666 1.137336135 0.102097601 0.059021939 0.020978702 1.256840467 1.329105139 0.11652609
95 0.042034984 0.016841576 0.979869485 1.114895463 0.100781299 0.057448529 0.020935114 1.246025562 1.338929892 0.118296914
96 0.042461839 0.016971108 0.967364013 1.081332326 0.098310448 0.057878722 0.021043083 1.212747335 1.263751268 0.112181552
97 0.042059835 0.016852321 0.957811713 1.070249915 0.098052241 0.058112342 0.020622237 1.20570159 1.244971156 0.110631689
98 0.043939866 0.017396072 1.004796386 1.126598477 0.101687059 0.060085192 0.020965451 1.261831045 1.317746997 0.116085045
99 0.043719262 0.017353401 1.145077109 1.4115448 0.121220998 0.059811551 0.021517342 1.370822191 1.541175961 0.125195146
100 0.04612796 0.017981818 1.095923781 1.265029788 0.108910106 0.058621727 0.021184441 1.260022044 1.343331933 0.116136283
101 0.045165997 0.01778282 1.182202935 1.456794977 0.123187251 0.058920819 0.021090489 1.317341089 1.451958537 0.126024634
102 0.042874701 0.017117508 1.09198451 1.322158694 0.114342265 0.057019807 0.020829793 1.243981481 1.343243122 0.117216095
103 0.041857429 0.016803749 1.033809543 1.226140857 0.10719122 0.056562666 0.020729247 1.21633625 1.297083855 0.113589503
104 0.041549858 0.016692284 1.02452147 1.213705301 0.106355213 0.056342773 0.020634683 1.213629365 1.296056986 0.113253586
105 0.041475032 0.016678115 1.114296079 1.394739389 0.116724767 0.057642937 0.020603992 1.241127729 1.325038314 0.112994641
106 0.041351307 0.016616788 1.008568168 1.185746074 0.104025483 0.057869077 0.020799035 1.235085964 1.308420777 0.113447413
107 0.043069035 0.017150659 1.015565157 1.16537261 0.103432395 0.058579747 0.021166613 1.221810222 1.267635226 0.110924356
108 0.043065611 0.01712325 1.00978446 1.153853536 0.102821603 0.058887884 0.021220945 1.232156754 1.282141685 0.111470513
109 0.041439001 0.016652912 0.973407209 1.113613009 0.100172594 0.057783633 0.020539703 1.225166559 1.290231943 0.112486064
110 0.041386925 0.016613228 0.970720172 1.109266758 0.099693865 0.058738533 0.021023285 1.236696005 1.294178724 0.112508878
111 0.040950559 0.016496433 0.955592871 1.087726474 0.098996311 0.057636548 0.02069092 1.230745673 1.304307342 0.115484796
112 0.040638726 0.016383979 1.007956982 1.19867897 0.106036387 0.056668129 0.02069883 1.224194646 1.310560226 0.114556529
113 0.040685173 0.016397955 1.017938495 1.217701316 0.105578892 0.058753371 0.020905126 1.218465805 1.257385969 0.110180058
114 0.040461782 0.016327631 0.960014403 1.106309891 0.098417662 0.057172079 0.020712003 1.198280215 1.248629928 0.109110363
115 0.040559579 0.01634909 0.949989021 1.084290504 0.097661957 0.056884464 0.020696485 1.175563931 1.208936572 0.107406422
116 0.040239524 0.016246555 0.938097775 1.066896915 0.09663552 0.059344344 0.020644248 1.201380491 1.211360097 0.107272394
117 0.04051042 0.016343938 0.946879148 1.079029322 0.097835302 0.060637195 0.021459866 1.216614723 1.215958118 0.108154595
118 0.046634872 0.018146208 0.997778535 1.05830574 0.096578941 0.071324989 0.024585161 1.350358486 1.269638419 0.112236328
119 0.046490744 0.018144043 1.000546336 1.066673994 0.096626781 0.057188842 0.020751156 1.195331812 1.242266178 0.108954236

Check this out, I learned how to train the model here.
https://github.com/Desklop/RNNoise_Wrapper/blob/master/TRAINING.md

I was wondering how were you able to tabulate that logs?

Thank you for your response, I have already checked that TRAINING.md file and my training part is working good. I'm more concern about hyper parameter setting for new datasets.

I have added CSVLogger callback for tabular logs.

Ok, I will just paste the

csv_logger = CSVLogger('training.log')
model.fit(X_train, Y_train, callbacks=[csv_logger])

onto the training python file?

Hi, if you don't mind can you please help me studying rnnoise? I have some questions about the process but I can't seem to understand well.

Yes, Your csvlogger callback will work.

I'm also looking into rnnoise. For the time being, I just understand rnnoise for training purposes; I have no idea about the 87 features of training. You are welcome to ask questions here, and if I know the solution, I will gladly respond.

The 87 features are here #152

My log file looks like this, how can I make it just like yours?

image

I'm wondering what are the contents of denoise_training file, I can't open it to check its contents and functions.

change CSVLogger('training.log') to CSVLogger('training.csv')

Hi, I want to ask what is the use of

rnnoise-master / src / denoise_training datasets / test_training_set / all_clean.raw datasets / test_training_set / all_noise.raw 5000000 > train_logs / test_training_set / training_test_b_500k.f32

what does the denoise_training file contain? I can't view its contents.

Hi, I want to ask how to measure the accuracy of the model?

I don't recall any accuracy matrix they are using. Also, I'm not sure how we'll be able to determine how accurate this noise removal task will be.

Hi, I want to ask what does the 5000000 87 value mean? I think it pertains with the data set but I can't relate how.

hi @Vatsalparsaniya if you have already trained this model on MS-SNSD dataset, can you please provide link to the training files or weight files if possible ?
thank you

I removed all data because this method did not work for me. However, I have listed down some training steps that may be help you.

install

- sudo apt-get install autoconf
- sudo apt-get install libtool
- sudo apt install ffmpeg

training-steps

  1. clone : https://github.com/Desklop/RNNoise_Wrapper.git
  2. bash ./compile_rnnoise.sh
  3. unzip rnnoise_master_20.11.2020.zip
  4. add data into dataset folder
  5. install req_train.txt
  6. python3 training_utils/prepare_dataset_for_training.py -cf datasets/training_set/clean/ -nf datasets/training_set/noise/ -bca datasets/training_set/all_clean.raw -bna datasets/training_set/all_noise.raw
  7. rnnoise-master/src/denoise_training datasets/training_set/all_clean.raw datasets/training_set/all_noise.raw 5000000 > train_logs/MS_SNSD/training_5000k.f32
  8. python3 rnnoise-master/training/bin2hdf5.py train_logs/MS_SNSD/training_5000k.f32 5000000 87 train_logs/MS_SNSD/training_5000k.h5
  9. run rnn_train_mod.py
  10. python3 rnnoise-master/training/dump_rnn_mod.py train_logs/MS_SNSD/weights_5000k.hdf5 rnnoise-master/src/rnn_data.c rnnoise-master/src/rnn_data.h
  11. cd rnnoise-master
  12. make clean
  13. ./autogen.sh
  14. ./configure
  15. make
  16. cd ..
  17. cp rnnoise-master/.libs/librnnoise.so.0.4.1 train_logs/MS_SNSD/librnnoise_MS_SNSD_5000k.so.0.4.1

hi @Vatsalparsaniya , so basically all i want to know is.. were you able to remove other kind of noises like background tv or any thumping sound or any ?