You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+2-28
Original file line number
Diff line number
Diff line change
@@ -18,32 +18,6 @@ The automatic generation of radiology reports has the potential to assist radiol
18
18
19
19
After the setup, run "**python create_dataset.py**" in src/dataset/ to create training, val and test csv files, in which each row contains specific information about a single image. See doc string of create_dataset.py for more details.
For training the object detector, specify the training configurations (e.g. batch size etc.) in lines 32 - 49 of src/object_detector/training_script_object_detector.py, then run "**python training_script_object_detector.py**".
32
-
The weights of the trained object detector model will be stored in the folder specified in src/path_datasets_and_weights.py
For the second training stage, first specify the path to the best trained object detector in report generation model (see line 26 of src/full_model/report_generation_model.py), such that the trained object detector will be trained together with the 2 binary classifiers.
37
-
Next, specify the run configurations in src/full_model/run_configurations.py. In particular, set "**PRETRAIN_WITHOUT_LM_MODEL = True**",
38
-
such that the language model is fully excluded from training. See doc string of src/full_model/run_configurations.py for more details.
39
-
Start training by running "**python train_full_model.py**" in src/full_model/.
40
-
41
-
### Full model
42
-
43
-
For the third training stage, again adjust the run configurations in src/full_model/run_configurations.py (e.g., the batch size may have to be lowered, since the full model requires a lot of memory). In particular, set "**PRETRAIN_WITHOUT_LM_MODEL = False**", such that the full model is trained end-to-end. Next, specify the checkpoint of the best pre-trained model of training stage 2 in the main function (line 567) of src/full_model/train_full_model.py, such this pre-trained model is loaded at beginning of training. Start training by running "**python train_full_model.py**" in src/full_model/.
44
-
45
-
During each training stage, the validation metrics and other useful information (such as images with bounding boxes and generated sentences etc.) are logged to tensorboard files saved in the corresponding run folders (specified in path_datasets_and_weights.py). Additionally, for the 3rd training stage, txt files with generated reports and sentences are saved in the run folders.
46
-
47
-
## Testing
48
-
49
-
Specify the run and checkpoint of the best trained full model to be tested in lines 40 - 41 of src/full_model/test_set_evaluation.py, then run "**python test_set_evaluation.py**". Txt files with the test set scores (and generated reports/sentences) will be saved in src/.
23
+
Please read the README_TRAIN_TEST.md for specific information on trainig and testing the model.
3. Full model end-to-end (i.e. all 4 modules together)
8
+
9
+
### Object detector
10
+
11
+
For training the object detector, specify the training configurations (e.g. batch size etc.) in lines 32 - 49 of src/object_detector/training_script_object_detector.py, then run "**python training_script_object_detector.py**".
12
+
The weights of the trained object detector model will be stored in the folder specified in src/path_datasets_and_weights.py
For the second training stage, first specify the path to the best trained object detector in report generation model (see line 26 of src/full_model/report_generation_model.py), such that the trained object detector will be trained together with the 2 binary classifiers.
17
+
Next, specify the run configurations in src/full_model/run_configurations.py. In particular, set "**PRETRAIN_WITHOUT_LM_MODEL = True**",
18
+
such that the language model is fully excluded from training. See doc string of src/full_model/run_configurations.py for more details.
19
+
Start training by running "**python train_full_model.py**" in src/full_model/.
20
+
21
+
### Full model
22
+
23
+
For the third training stage, again adjust the run configurations in src/full_model/run_configurations.py (e.g., the batch size may have to be lowered, since the full model requires a lot of memory). In particular, set "**PRETRAIN_WITHOUT_LM_MODEL = False**", such that the full model is trained end-to-end. Next, specify the checkpoint of the best pre-trained model of training stage 2 in the main function (line 567) of src/full_model/train_full_model.py, such this pre-trained model is loaded at beginning of training. Start training by running "**python train_full_model.py**" in src/full_model/.
24
+
25
+
During each training stage, the validation metrics and other useful information (such as images with bounding boxes and generated sentences etc.) are logged to tensorboard files saved in the corresponding run folders (specified in path_datasets_and_weights.py). Additionally, for the 3rd training stage, txt files with generated reports and sentences are saved in the run folders.
26
+
27
+
## Testing
28
+
29
+
Specify the run and checkpoint of the best trained full model to be tested in lines 40 - 41 of src/full_model/test_set_evaluation.py, then run "**python test_set_evaluation.py**". Txt files with the test set scores (and generated reports/sentences) will be saved in src/.
0 commit comments