diff --git a/README.md b/README.md index f55d69335..c84a9f057 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # ADI MAX78000/MAX78002 Model Training and Synthesis -June 25, 2024 +July 2, 2024 -**Note: This branch is compatible with PyTorch 1.8. Please go to the “pytorch-2” branch for PyTorch 2.3 compatibility.** +**Note: This archived branch is compatible with PyTorch 1.8. Please go to the “develop” branch for PyTorch 2 compatibility.** ADI’s MAX78000/MAX78002 project is comprised of five repositories: diff --git a/README.pdf b/README.pdf index 60253bf98..6761f602b 100644 Binary files a/README.pdf and b/README.pdf differ diff --git a/datasets/kws20.py b/datasets/kws20.py index c677627b8..383205641 100644 --- a/datasets/kws20.py +++ b/datasets/kws20.py @@ -487,7 +487,6 @@ def __filter_dtype(self): def __filter_classes(self): initial_new_class_label = len(self.class_dict) new_class_label = initial_new_class_label - self.new_class_dict = {} for c in self.classes: if c not in self.class_dict: if c == '_unknown_': @@ -495,7 +494,6 @@ def __filter_classes(self): raise ValueError(f'Class {c} not found in data') num_elems = (self.targets == self.class_dict[c]).cpu().sum() print(f'Class {c} (# {self.class_dict[c]}): {num_elems} elements') - self.new_class_dict[c] = new_class_label self.targets[(self.targets == self.class_dict[c])] = new_class_label new_class_label += 1 @@ -504,10 +502,6 @@ def __filter_classes(self): self.targets[(self.targets < initial_new_class_label)] = new_class_label self.targets -= initial_new_class_label - self.new_class_dict = {c: self.new_class_dict[c] - initial_new_class_label - for c in self.new_class_dict.keys()} - self.new_class_dict['_unknown_'] = len(self.new_class_dict) - def __filter_librispeech(self): print('Filtering out librispeech elements...') @@ -1002,7 +996,6 @@ def KWS_35_get_unquantized_datasets(data, load_train=True, load_test=True): def KWS_20_msnoise_mixed_get_datasets(data, load_train=True, load_test=True, apply_prob=0.8, snr_range=(-5, 10), - noise_type=MSnoise.class_dict.keys(), desired_probs=None): """ Returns the KWS dataset mixed with MSnoise dataset. Only training set will be mixed @@ -1016,6 +1009,8 @@ def KWS_20_msnoise_mixed_get_datasets(data, load_train=True, load_test=True, noise_type --> All noise types in the noise dataset. """ + noise_type = MSnoise.class_dict + if len(snr_range) > 1: snr_range = range(snr_range[0], snr_range[1]) else: @@ -1058,7 +1053,6 @@ def KWS_12_benchmark_get_datasets(data, load_train=True, load_test=True): def MixedKWS_20_get_datasets_10dB(data, load_train=True, load_test=True, apply_prob=1, snr_range=tuple([10]), - noise_type=MSnoise.class_dict.keys(), desired_probs=None): """ Returns the mixed KWS dataset with MSnoise dataset under 10 dB SNR using signalmixer @@ -1066,6 +1060,8 @@ def MixedKWS_20_get_datasets_10dB(data, load_train=True, load_test=True, additional noise. """ + noise_type = MSnoise.class_dict + if len(snr_range) > 1: snr_range = range(snr_range[0], snr_range[1]) else: diff --git a/requirements.txt b/requirements.txt index a1662a779..8e7a3c26b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,26 +1,26 @@ torch==1.8.1 torchaudio==0.8.1 torchvision==0.9.1 -GitPython>=3.1.18 -Pillow>=7 -PyYAML>=5.1.1 -albumentations>=1.3.0 +GitPython==3.1.43 +Pillow==10.4.0 +PyYAML==6.0.1 +albumentations==1.3.1 faiss-cpu==1.7.4 -batch-face>=1.4.0 -h5py>=3.7.0 +batch-face==1.4.0 +h5py==3.11.0 kornia==0.6.8 -librosa>=0.7.2 -numba<0.50.0 -numpy>=1.22,<1.23 -opencv-python>=4.4.0 -protobuf>=3.20.1,<4.0 +librosa==0.9.2 +numba==0.49.1 +numpy==1.22.4 +opencv-python==4.10.0.84 +protobuf==3.20.3 pycocotools==2.0.7 pyffmpeg==2.0 pytorch-metric-learning==2.3.0 -pytube>=12.1.3 -scipy>=1.3.0 -shap>=0.34.0 -tensorboard>=2.9.0,<2.10.0 -tk>=0.1.0 +pytube==15.0.0 +scipy==1.10.1 +shap==0.44.1 +tensorboard==2.9.0 +tk==0.1.0 torchmetrics==0.6.0 -e distiller