From 11fe7ccb35e054ac8c5872ce4697a7d1edf924d1 Mon Sep 17 00:00:00 2001 From: Rahul Chauhan <66589195+therc01@users.noreply.github.com> Date: Thu, 15 Apr 2021 23:46:13 +0530 Subject: [PATCH 1/3] updated training instructions Updated training instructions and argparser updates also added --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7f91e8b..48ac027 100644 --- a/README.md +++ b/README.md @@ -41,22 +41,26 @@ To run the script you can execute it with the following arguments: ```python parser = argparse.ArgumentParser() -parser.add_argument('-t', '--task', type=str, required=True, - choices=['abnormal', 'acl', 'meniscus']) -parser.add_argument('-p', '--plane', type=str, required=True, - choices=['sagittal', 'coronal', 'axial']) -parser.add_argument('--augment', type=int, choices=[0, 1], default=1) -parser.add_argument('--lr_scheduler', type=int, choices=[0, 1], default=1) -parser.add_argument('--epochs', type=int, default=50) -parser.add_argument('--lr', type=float, default=1e-5) -parser.add_argument('--flush_history', type=int, choices=[0, 1], default=0) -parser.add_argument('--save_model', type=int, choices=[0, 1], default=1) -parser.add_argument('--patience', type=int, choices=[0, 1], default=5) + parser.add_argument('-t', '--task', type=str, required=True, + choices=['abnormal', 'acl', 'meniscus']) + parser.add_argument('-p', '--plane', type=str, required=True, + choices=['sagittal', 'coronal', 'axial']) + parser.add_argument('--prefix_name', type=str, required=True) + parser.add_argument('--augment', type=int, choices=[0, 1], default=1) + parser.add_argument('--lr_scheduler', type=str, + default='plateau', choices=['plateau', 'step']) + parser.add_argument('--gamma', type=float, default=0.5) + parser.add_argument('--epochs', type=int, default=50) + parser.add_argument('--lr', type=float, default=1e-5) + parser.add_argument('--flush_history', type=int, choices=[0, 1], default=0) + parser.add_argument('--save_model', type=int, choices=[0, 1], default=1) + parser.add_argument('--patience', type=int, default=5) + parser.add_argument('--log_every', type=int, default=100) ``` example to train a model to detect acl tears on the sagittal plane for a 20 epochs: -`python -t acl -p sagittal --epochs=20` +`python train.py -t acl -p sagittal --prefix_name demo --epochs=20` Note: Before running the script, add the following (empty) folders at the root of the project: - models From 584cac635026fe96062482cbe91415a9a907de69 Mon Sep 17 00:00:00 2001 From: Rahul Chauhan <66589195+therc01@users.noreply.github.com> Date: Thu, 15 Apr 2021 23:56:53 +0530 Subject: [PATCH 2/3] Updated training instructions --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 48ac027..55adeb2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ example to train a model to detect acl tears on the sagittal plane for a 20 epoc `python train.py -t acl -p sagittal --prefix_name demo --epochs=20` +`--prefix_name` is a required parameter with an argument Note: Before running the script, add the following (empty) folders at the root of the project: - models - logs From c2e5654500a857d68c7864747ab77b7c05633e5c Mon Sep 17 00:00:00 2001 From: Rahul Chauhan <66589195+therc01@users.noreply.github.com> Date: Thu, 15 Apr 2021 23:58:19 +0530 Subject: [PATCH 3/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 55adeb2..c6acd76 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,8 @@ example to train a model to detect acl tears on the sagittal plane for a 20 epoc `python train.py -t acl -p sagittal --prefix_name demo --epochs=20` -`--prefix_name` is a required parameter with an argument +`--prefix_name` is a required parameter with an argument. + Note: Before running the script, add the following (empty) folders at the root of the project: - models - logs