时间:2024.10.20
一、DOTA-v2.0数据集上传结果至官网BUG: No space left on device
IOError at /evaluation1/
[Errno 28] No space left on device
二、解决方法,法一
上传的结果文件太大了,把服务器磁盘占满了。
将结果中精度过小的数据删除,以减小文件大小。代码如下:
import os# 定义文件夹路径和目标阈值
folder_path = r"/root/rediffdet_dota2.0/"
threshold = 0.04# 遍历文件夹中的每个文件
for filename in os.listdir(folder_path):if filename.endswith(".txt"):input_file_path = os.path.join(folder_path, filename)output_file_path = os.path.join(folder_path, f"filtered_{filename}")with open(input_file_path, 'r') as input_file, open(output_file_path, 'w') as output_file:for line in input_file:parts = line.split()if len(parts) > 1:try:# 检查第二个字段是否大于阈值if float(parts[1]) > threshold:output_file.write(line)except ValueError:print(f"无法转换为浮点数: {parts[1]},行内容: {line.strip()}")print(f'{input_file}')print("筛选完成,结果保存在新的文件中。")
过滤精度较小结果前,文件的大小:
过滤精度较小结果后,文件的大小:
三、解决方法,法二
等一段时间,DOTA-v2.0官方服务器好像会定时清除缓存文件。