-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于AIIB2023数据集的处理 #48
Comments
你代码 有点问题,用我这个 from light_training.preprocessing.preprocessors.default_preprocessor import DefaultPreprocessor
import numpy as np
import pickle
import json
base_dir = "/data/xingzhaohu/aiib23/data/raw_data/AIIB23_Train_T1"
image_dir = "img"
gt_dir = "gt"
def process_train():
# fullres spacing is [0.5 0.70410156 0.70410156]
# median_shape is [602.5 516.5 516.5]
preprocessor = DefaultPreprocessor(base_dir=base_dir,
image_dir=image_dir,
label_dir=gt_dir,
)
out_spacing = [0.5, 0.70410156, 0.70410156]
output_dir = "./data/fullres/train/"
with open("./data_analysis_result.txt", "r") as f:
content = f.read().strip("\n")
print(content)
content = eval(content)
foreground_intensity_properties_per_channel = content["intensity_statistics_per_channel"]
preprocessor.run(output_spacing=out_spacing,
output_dir=output_dir,
all_labels=[1],
foreground_intensity_properties_per_channel=foreground_intensity_properties_per_channel
)
def plan():
preprocessor = DefaultPreprocessor(base_dir=base_dir,
image_dir=image_dir,
label_dir=gt_dir,
)
preprocessor.run_plan()
if __name__ == "__main__":
#
# plan()
process_train()
# process_val()
# process_test()
|
你先运行plan函数会在当前目录下得到 data_analysis_result.txt 第二步预处理 会用到这个文件。 |
非常感谢。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,前辈。
我想请教一下,如何用你的训练框架处理AIIB2023数据集。
我尝试性的试了一下。以下是我的处理以及报错详情。
The text was updated successfully, but these errors were encountered: