Closed yangdongchao closed 2 years ago
Hi, I am glad you like it.
can you run:
import os
dir = '/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/logs/2022-01-30T16-28-24_vas_transformer/samples_2022-01-31T16-04-14/VAS_validation'
classes = [d.name for d in os.scandir(dir) if d.is_dir()]
print(len(classes))
Hi, I am glad you like it.
can you run:
import os dir = '/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/logs/2022-01-30T16-28-24_vas_transformer/samples_2022-01-31T16-04-14/VAS_validation' classes = [d.name for d in os.scandir(dir) if d.is_dir()] print(len(classes))
I am sorry to bother you. Thank you very much for your reply. I make a mistake, I set the root path on .yaml file, but I forget the value in .ymal file will be convered by command "input1.params.root=$EXPERIMENTPATH/samples$NOW/$SAMPLES_FOLDER". It means that I always get the wrong path, because the command "$NOW" always get the current time.
Hi, thanks for your code, I have generate audios according to your code. But I get a mistake on the last steps, when I try to get the Quality Assessment. When I run evaluate.py, the following error is occurred.
Extracting features from input_1 Traceback (most recent call last): File "/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/evaluate.py", line 231, in
main()
File "/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/evaluate.py", line 194, in main
featuresdict_1 = get_featuresdict(feat_extractor, device, cfg.input1, is_ddp, cfg.extraction_cfg)
File "/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/evaluate.py", line 60, in get_featuresdict
input = get_dataset_class(dataset_cfg)
File "/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/evaluate.py", line 48, in get_dataset_class
dataset_class = instantiate_from_config(dataset_cfg)
File "/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/train.py", line 130, in instantiate_from_config
return get_obj_from_str(config['target'])(config.get('params', dict()))
File "/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/evaluation/datasets/fakes.py", line 41, in init
super().init(root, loader, extensions=extensions, transform=transform,
File "/root/anaconda3/envs/specvqgan/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 126, in init
classes, class_to_idx = self._find_classes(self.root)
File "/root/anaconda3/envs/specvqgan/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 164, in _find_classes
classes = [d.name for d in os.scandir(dir) if d.is_dir()]
FileNotFoundError: [Errno 2] No such file or directory: '/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/logs/2022-01-30T16-28-24_vas_transformer/samples_2022-01-31T16-04-14/VAS_validation'
I am very sure the path (/apdcephfs/share_1316500/donchaoyang/code3/SpecVQGAN/logs/2022-01-30T16-28-24_vas_transformer/samples_2022-01-31T16-04-14/VAS_validation) exists , and the directory save the sample audio mel in previous stage. Becuase I want to evaluate VAS dataset, so this direcory includes 8 different classes sub-direcory.