Closed junjianli106 closed 3 months ago
想知道为什么extract_features_fp.py中 if level == 1: step = patch_size
您好,按照您的流程,我进行了代码的复现,具体步骤如下:
python create_patches_fp.py --source /homeb/junjianli/data/CAMELYON16/all_slide/40x --save_dir /homeb/junjianli/HAG-MIL-master/feature/camelyon_patches_256_level_2 --patch_size 256 --seg --patch --stitch --patch_level 2
python create_quadtree_wsis.py
CUDA_VISIBLE_DEVICES=0,1 python extract_features_fp.py --data_h5_dir feature/camelyon_patches_256_level_2 --data_slide_dir data/CAMELYON16/all_slide/40x --csv_path feature/camelyon_patches_256_level_2/process_list_autogen.csv --feat_dir camelyon_patches_256_level_2 --batch_size 512 --slide_ext .tif
CUDA_VISIBLE_DEVICES=0,1 python extract_features_fp.py --data_h5_dir /homeb/junjianli/HAG-MIL-master/feature/camelyon_patches_256_level_1_corresponding --data_slide_dir data/CAMELYON16/all_slide/40x --csv_path feature/camelyon_patches_256_level_2/process_list_autogen.csv --feat_dir feature/camelyon_patches_256_level_1_corresponding --batch_size 512 --slide_ext .tif
CUDA_VISIBLE_DEVICES=0,1 python extract_features_fp.py --data_h5_dir feature/camelyon_patches_256_level_0_corresponding --data_slide_dir /homeb/junjianli/data/CAMELYON16/all_slide/40x --csv_path feature/camelyon_patches_256_level_2/process_list_autogen.csv --feat_dir feature/camelyon_patches_256_level_0_corresponding --batch_size 512 --slide_ext .tif
随机种子为6,其余参数都没有变。在3卡V100 (32G)下运行的实验。最后的结果如下: {'test_acc': 0.8604651093482971, 'test_auc': 0.8828520774841309, 'test_f1': 0.8434470891952515, 'test_loss': 0.21523647010326385}
请问,是我哪一步骤有问题吗?或者有那些需要注意的地方,谢谢
Hello, 以下是我能想到的一些可能需要注意的事项:
Sure, these are some of the things that I can come up with when I was doing the experiments:
想知道为什么extract_features_fp.py中 if level == 1: step = patch_size
这里代码可能显得有一些混乱,因为输入的level等于1的时候,实际上是在处理基于level1的patch生成level0patch的情况。
而在level0下,step就应该等于patch size
The code here may appear a bit confusing because when the input level is equal to 1, it is actually handling the generation of level 0 patches based on level 1 patches.
In level 0, the step should be equal to the patch size.
您好,按照您的流程,我进行了代码的复现,具体步骤如下:
python create_patches_fp.py --source /homeb/junjianli/data/CAMELYON16/all_slide/40x --save_dir /homeb/junjianli/HAG-MIL-master/feature/camelyon_patches_256_level_2 --patch_size 256 --seg --patch --stitch --patch_level 2
python create_quadtree_wsis.py
CUDA_VISIBLE_DEVICES=0,1 python extract_features_fp.py --data_h5_dir feature/camelyon_patches_256_level_2 --data_slide_dir data/CAMELYON16/all_slide/40x --csv_path feature/camelyon_patches_256_level_2/process_list_autogen.csv --feat_dir camelyon_patches_256_level_2 --batch_size 512 --slide_ext .tif
CUDA_VISIBLE_DEVICES=0,1 python extract_features_fp.py --data_h5_dir /homeb/junjianli/HAG-MIL-master/feature/camelyon_patches_256_level_1_corresponding --data_slide_dir data/CAMELYON16/all_slide/40x --csv_path feature/camelyon_patches_256_level_2/process_list_autogen.csv --feat_dir feature/camelyon_patches_256_level_1_corresponding --batch_size 512 --slide_ext .tif
CUDA_VISIBLE_DEVICES=0,1 python extract_features_fp.py --data_h5_dir feature/camelyon_patches_256_level_0_corresponding --data_slide_dir /homeb/junjianli/data/CAMELYON16/all_slide/40x --csv_path feature/camelyon_patches_256_level_2/process_list_autogen.csv --feat_dir feature/camelyon_patches_256_level_0_corresponding --batch_size 512 --slide_ext .tif
随机种子为6,其余参数都没有变。在3卡V100 (32G)下运行的实验。最后的结果如下: {'test_acc': 0.8604651093482971, 'test_auc': 0.8828520774841309, 'test_f1': 0.8434470891952515, 'test_loss': 0.21523647010326385}
请问,是我哪一步骤有问题吗?或者有那些需要注意的地方,谢谢