Closed dby124 closed 6 years ago
I suspect the problem is because you have a whitespace in your path "DCASE挑战赛相关资料/DCASE 2018". Try removing the whitespace or replacing that it with underscore. Meanwhile I will see how to update the system to be more robust for this use case.
Try if commit f696043765c3a576575364ed9c840a5770b69680 fixed this issue.
After I updated the code and deleted the whitespace, another error reported as following:
[I] Evaluation
[I] ========================================
Traceback (most recent call last):
File "D:/学习/DCASE挑战赛相关资料/DCASE_2018/dcase2018_baseline/task1/task1a_1.py", line 1161, in
In 1028 code line of the function named do_evaluation, I tried to print the item information like the following:
for item_id, item in enumerate(estimated_scene_list):
print("输出待分割文件名:", item_id, item.filename)
# print("输出分割后文件名:", os.path.split(item.filename))
# estimated_scene_list[item_id]['filename'] = os.path.split(item.filename)[-1]
# estimated_scene_list[item_id]['file'] = item.filename
Then the result was shown as following:
输出待分割文件名: 0 D:/学习/DCASE挑战赛相关资料/DCASE_2018/dcase2018_baseline/task1/datasets/TUT-urban-acoustic-scenes-2018-development/audio/airport-barcelona-203-6122-a.wav 输出待分割文件名: 1 None 输出待分割文件名: 2 D:/学习/DCASE挑战赛相关资料/DCASE_2018/dcase2018_baseline/task1/datasets/TUT-urban-acoustic-scenes-2018-development/audio/airport-barcelona-203-6123-a.wav 输出待分割文件名: 3 None 输出待分割文件名: 4 D:/学习/DCASE挑战赛相关资料/DCASE_2018/dcase2018_baseline/task1/datasets/TUT-urban-acoustic-scenes-2018-development/audio/airport-barcelona-203-6124-a.wav 输出待分割文件名: 5 None 输出待分割文件名: 6 D:/学习/DCASE挑战赛相关资料/DCASE_2018/dcase2018_baseline/task1/datasets/TUT-urban-acoustic-scenes-2018-development/audio/airport-barcelona-203-6125-a.wav .......
Maybe there some problem in the loop.
In 1028 code line of the function named do_evaluation, I tried to print the item information like the following:
print(type(estimated_scene_list))
print(estimated_scene_list)
for item_id, item in enumerate(estimated_scene_list):
print(item_id)
# estimated_scene_list[item_id]['filename'] = os.path.split(item.filename)[-1]
# estimated_scene_list[item_id]['file'] = item.filename
Then the result was shown as following: <class 'dcase_util.containers.metadata.MetaDataContainer'> MetaDataContainer :: Class Filename : D:\学习\DCASE挑战赛相关资料\DCASE_2018\dcase2018_baseline\task1\system\task1a\recognizer\46f887e4a2427de3106f\7c08a3edb431ddfa3e1f\f7937d1167990f25fb2f\res_fold_1.txt Items : 5036 Unique Files : 2518 Scene labels : 10 Event labels : 0 Tags : 0 Identifiers : 0 Source labels : 0
Meta data Source Onset Offset Scene Event Tags Identifier
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
- - - - - - -
D:/学习/DCASE挑战赛相关资料.. - - airport - - -
finally, I changed 1019 code line of the function named do_evaluation like the following:
estimated_scene_list = dcase_util.containers.MetaDataContainer().load(
filename=fold_results_filename,
# file_format=dcase_util.utils.FileFormat.CSV,
# fields=['filename', 'scene_label'],
# csv_header=False,
# delimiter='\t'
)
Then the result is true.
[I] Evaluation
[I] ========================================
[I]
[I] Scene | Accuracy
[I] ----------------- | ----------------------
[I] airport | 55.8%
[I] bus | 63.2%
[I] metro | 42.9%
[I] metro_station | 61.0%
[I] park | 78.9%
[I] public_square | 42.1%
[I] shopping_mall | 49.1%
[I] street_pedestrian | 42.9%
[I] street_traffic | 81.7%
[I] tram | 52.5%
[I] ----------------- | ----------------------
[I] Average | 57.0%
[I]
[I] DONE [0:00:01.955004]
This issue was closed as the problem was solved by the user. Feel free to reopen issue if needed.
When I run the task1a.py, there is an error reported as following:
[I] Testing [I] ======================================== [I] Fold [1] [I] DONE [0:00:00.017001] [I] [I] Evaluation [I] ======================================== [E] MetaDataContainer: Unknown row format [['LIST', 'STRING']], row [['D:/学习/DCASE挑战赛相关资料/DCASE', '2018/dcase2018_baseline/task1/datasets/TUT-urban-acoustic-scenes-2018-development/audio/airport-barcelona-203-6122-a.wav\tairport']] (metadata.py:1415) NoneType: None MetaDataContainer: Unknown row format [['LIST', 'STRING']], row [['D:/学习/DCASE挑战赛相关资料/DCASE', '2018/dcase2018_baseline/task1/datasets/TUT-urban-acoustic-scenes-2018-development/audio/airport-barcelona-203-6122-a.wav\tairport']]
There seems exist an error when read audio/airport-barcelona-203-6122-a.wav\tairport.