Skip to content

Commit

Permalink
updated dataset paths
Browse files Browse the repository at this point in the history
  • Loading branch information
onermustafaumit committed Feb 4, 2022
1 parent 989a8d1 commit 5048823
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions gland_classification/four_resolutions_model/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
parser = argparse.ArgumentParser(description='Train a CNN to classify image patches into different genetic ITH groups')

parser.add_argument('--init_model_file', default='',help='Initial model file (optional)', dest='init_model_file')
parser.add_argument('--image_dir_high', default='../../Images/cropped_patches__complete_and_partial_glands__50__25__512', help='Image directory', dest='image_dir_high')
parser.add_argument('--image_dir_medium', default='../../Images/cropped_patches__complete_and_partial_glands__50__50__512', help='Image directory', dest='image_dir_medium')
parser.add_argument('--image_dir_low', default='../../Images/cropped_patches__complete_and_partial_glands__50__100__512', help='Image directory', dest='image_dir_low')
parser.add_argument('--image_dir_low2', default='../../Images/cropped_patches__complete_and_partial_glands__50__200__512', help='Image directory', dest='image_dir_low2')
parser.add_argument('--slide_list_filename_test', default='../dataset/slide_ids_list_gland_classification_test.txt', help='slide list test', dest='slide_list_filename_test')
parser.add_argument('--image_dir_high', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_25_512', help='Image directory', dest='image_dir_high')
parser.add_argument('--image_dir_medium', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_50_512', help='Image directory', dest='image_dir_medium')
parser.add_argument('--image_dir_low', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_100_512', help='Image directory', dest='image_dir_low')
parser.add_argument('--image_dir_low2', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_200_512', help='Image directory', dest='image_dir_low2')
parser.add_argument('--slide_list_filename_test', default='../dataset/slide_ids_list_gland_classification_46_slides_test_saved.txt', help='slide list test', dest='slide_list_filename_test')
parser.add_argument('--dataset_type', default='test', help='', dest='dataset_type')
parser.add_argument('--num_classes', default='2', type=int, help='Number of classes', dest='num_classes')
parser.add_argument('--batch_size', default='32', type=int, help='Batch size', dest='batch_size')
Expand Down
14 changes: 7 additions & 7 deletions gland_classification/four_resolutions_model/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

parser.add_argument('--model_dir', default='saved_models/', help='Directory to save models', dest='model_dir')
parser.add_argument('--init_model_file', default='',help='Initial model file (optional)', dest='init_model_file')
parser.add_argument('--image_dir_high', default='../../Images/cropped_patches__complete_and_partial_glands__50__25__512', help='Image directory', dest='image_dir_high')
parser.add_argument('--image_dir_medium', default='../../Images/cropped_patches__complete_and_partial_glands__50__50__512', help='Image directory', dest='image_dir_medium')
parser.add_argument('--image_dir_low', default='../../Images/cropped_patches__complete_and_partial_glands__50__100__512', help='Image directory', dest='image_dir_low')
parser.add_argument('--image_dir_low2', default='../../Images/cropped_patches__complete_and_partial_glands__50__200__512', help='Image directory', dest='image_dir_low2')
parser.add_argument('--slide_list_filename_train', default='../dataset/slide_ids_list_gland_classification_train.txt', help='slide list train', dest='slide_list_filename_train')
parser.add_argument('--slide_list_filename_valid', default='../dataset/slide_ids_list_gland_classification_valid.txt', help='slide list valid', dest='slide_list_filename_valid')
parser.add_argument('--slide_list_filename_test', default='../dataset/slide_ids_list_gland_classification_test.txt', help='slide list test', dest='slide_list_filename_test')
parser.add_argument('--image_dir_high', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_25_512', help='Image directory', dest='image_dir_high')
parser.add_argument('--image_dir_medium', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_50_512', help='Image directory', dest='image_dir_medium')
parser.add_argument('--image_dir_low', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_100_512', help='Image directory', dest='image_dir_low')
parser.add_argument('--image_dir_low2', default='../../Images/gland_classification/cropped_patches__complete_and_partial_glands_50_200_512', help='Image directory', dest='image_dir_low2')
parser.add_argument('--slide_list_filename_train', default='../dataset/slide_ids_list_gland_classification_46_slides_train_saved.txt', help='slide list train', dest='slide_list_filename_train')
parser.add_argument('--slide_list_filename_valid', default='../dataset/slide_ids_list_gland_classification_46_slides_valid_saved.txt', help='slide list valid', dest='slide_list_filename_valid')
parser.add_argument('--slide_list_filename_test', default='../dataset/slide_ids_list_gland_classification_46_slides_test_saved.txt', help='slide list test', dest='slide_list_filename_test')
parser.add_argument('--patch_size', default='512', type=int, help='Patch size', dest='patch_size')
parser.add_argument('--num_classes', default='2', type=int, help='Number of classes', dest='num_classes')
parser.add_argument('--pretrained', default=False, help='Pretrain model on ImageNet', dest='pretrained')
Expand Down
4 changes: 2 additions & 2 deletions gland_segmentation/mask_rcnn/predict_masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def str2bool(v):
parser = argparse.ArgumentParser(description='Gland detection at the slide level')

parser.add_argument('--init_model_file', default='', help='File path of trained Mask R-CNN model', dest='init_model_file')
parser.add_argument('--image_dir', default='../../Images/cropped_patches__complete_and_partial_glands__50__50__512/', help='Directory consisting of cropped patches with centred glands', dest='image_dir')
parser.add_argument('--slide_list_filename', default='../dataset/slide_ids_list_gland_segmentation_test.txt', help='List of slide ids in training, validation or test set', dest='slide_list_filename') #only one patient is being tested
parser.add_argument('--image_dir', default='../../Images/gland_segmentation/cropped_patches__complete_and_partial_glands_50_50_512/', help='Directory consisting of cropped patches with centred glands', dest='image_dir')
parser.add_argument('--slide_list_filename', default='../dataset/slide_ids_list_gland_segmentation_99_slides_test_saved.txt', help='List of slide ids in training, validation or test set', dest='slide_list_filename') #only one patient is being tested
parser.add_argument('--batch_size', type=int, default=8, help='Batch size', dest='batch_size')
parser.add_argument('--num_classes', type=int, default=1, help='Number of classes', dest='num_classes')
parser.add_argument('--pretrained', type=str2bool, default=False, help=' Use pretrained model on COCO dataset', dest='pretrained')
Expand Down
4 changes: 2 additions & 2 deletions gland_segmentation/mask_rcnn/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def str2bool(v):
parser = argparse.ArgumentParser(description='Train Mask R-CNN model for gland segmentation')

parser.add_argument('--init_model_file', default='', help='File path of trained Mask R-CNN model', dest='init_model_file')
parser.add_argument('--image_dir', default='../../Images/cropped_patches__complete_and_partial_glands__50__50__512/', help='Directory consisting of cropped patches with centred glands', dest='image_dir')
parser.add_argument('--slide_list_filename', default='../dataset/slide_ids_list_gland_segmentation_test.txt', help='List of slide ids in training, validation or test set', dest='slide_list_filename')
parser.add_argument('--image_dir', default='../../Images/gland_segmentation/cropped_patches__complete_and_partial_glands_50_50_512/', help='Directory consisting of cropped patches with centred glands', dest='image_dir')
parser.add_argument('--slide_list_filename', default='../dataset/slide_ids_list_gland_segmentation_99_slides_test_saved.txt', help='List of slide ids in training, validation or test set', dest='slide_list_filename')
parser.add_argument('--patch_size', type=int, default=512, help='Patch size', dest='patch_size')
parser.add_argument('--num_classes', type=int, default=1, help='Number of classes', dest='num_classes')
parser.add_argument('--pretrained', type=str2bool, default=False, help=' Use pretrained model on COCO dataset', dest='pretrained')
Expand Down
6 changes: 3 additions & 3 deletions gland_segmentation/mask_rcnn/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def str2bool(v):
parser = argparse.ArgumentParser(description='Train Mask R-CNN to segment glands in cropped patches')

parser.add_argument('--init_model_file', default='',help='File path of Mask R-CNN model to be loaded at the start of training (optional)', dest='init_model_file')
parser.add_argument('--image_dir', default='../../Images/cropped_patches__complete_and_partial_glands__50__50__512/', help='Directory consisting of cropped patches with centred glands', dest='image_dir')
parser.add_argument('--slide_list_filename_train', default='../dataset/slide_ids_list_gland_segmentation_train.txt', help='List of slide ids in training set', dest='slide_list_filename_train')
parser.add_argument('--slide_list_filename_valid', default='../dataset/slide_ids_list_gland_segmentation_valid.txt', help='List of slide ids in validation set', dest='slide_list_filename_valid')
parser.add_argument('--image_dir', default='../../Images/gland_segmentation/cropped_patches__complete_and_partial_glands_50_50_512/', help='Directory consisting of cropped patches with centred glands', dest='image_dir')
parser.add_argument('--slide_list_filename_train', default='../dataset/slide_ids_list_gland_segmentation_99_slides_train_saved.txt', help='List of slide ids in training set', dest='slide_list_filename_train')
parser.add_argument('--slide_list_filename_valid', default='../dataset/slide_ids_list_gland_segmentation_99_slides_valid_saved.txt', help='List of slide ids in validation set', dest='slide_list_filename_valid')
parser.add_argument('--patch_size', type=int, default=512, help='Patch size', dest='patch_size')
parser.add_argument('--num_classes', type=int, default=1, help='Number of classes', dest='num_classes')
parser.add_argument('--pretrained', type=str2bool, default=False, help=' Use pretrained model on COCO dataset?', dest='pretrained')
Expand Down

0 comments on commit 5048823

Please sign in to comment.