├── .gitignore ├── AutoLabelClassifier ├── __init__.py ├── finetune.py ├── label.py ├── main.py └── preprocess.py ├── LICENSE ├── Makefile ├── README.md ├── conf ├── config.yaml └── deepspeed.yaml ├── example_data ├── example_output.csv └── example_reports.csv ├── label_process_simple.png ├── notebooks ├── classify_cancer.ipynb ├── classify_spon.ipynb ├── classify_stenosis.ipynb ├── compare_llm_results_cln.ipynb └── simple_report_classification.ipynb ├── requirements.txt ├── scripts ├── 01_rep_preprocessing │ ├── create_sample_for_ncimi_expert_labeling.py │ ├── preprocess_cauda_equina_labels.py │ ├── preprocess_osclmric_global_labels.py │ ├── preprocess_osclmric_ivd_level_labels.py │ ├── select_cauda_equina_ex.py │ ├── select_herniation_ex.py │ ├── select_spon_ex.py │ ├── sep_clinical_history_full_ncimi_reports.py │ ├── sep_conclusion_full_ouh_reports.py │ ├── sep_conclusion_ncimi_test_reports.py │ ├── split_train_test_herniation_reports.py │ ├── split_train_test_osclmric_reports.py │ └── split_train_test_spon_reports.py ├── 02_llms │ ├── 01_training │ │ └── run_lora_conclusion_training.py │ └── 02_inference │ │ ├── call_gpt_api.py │ │ ├── run_base_one_step_scores.py │ │ ├── run_base_two_step_scores.py │ │ ├── run_con_lora_base_two_step_scores.py │ │ └── run_con_lora_two_step_scores.py └── 03_img_preprocessing │ ├── 01a_run_spinenet_osclmric.py │ ├── 01b_run_spinenet_ncimi.py │ ├── 02a_train_test_split_osclmric.py │ ├── 02b_resnet_encodings_osclmric.py │ ├── 02c_spinenet_encodings_osclmric.py │ ├── 03a_train_test_split_ncimi.py │ ├── 03b_resnet_encodings_ncimi.py │ ├── 04a_train_test_split_spon.py │ ├── 04b_resnet_encodings_spon.py │ └── 04c_spinenet_encodings_spon.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/.gitignore -------------------------------------------------------------------------------- /AutoLabelClassifier/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.1" 2 | -------------------------------------------------------------------------------- /AutoLabelClassifier/finetune.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/AutoLabelClassifier/finetune.py -------------------------------------------------------------------------------- /AutoLabelClassifier/label.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/AutoLabelClassifier/label.py -------------------------------------------------------------------------------- /AutoLabelClassifier/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/AutoLabelClassifier/main.py -------------------------------------------------------------------------------- /AutoLabelClassifier/preprocess.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/AutoLabelClassifier/preprocess.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/README.md -------------------------------------------------------------------------------- /conf/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/conf/config.yaml -------------------------------------------------------------------------------- /conf/deepspeed.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/conf/deepspeed.yaml -------------------------------------------------------------------------------- /example_data/example_output.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/example_data/example_output.csv -------------------------------------------------------------------------------- /example_data/example_reports.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/example_data/example_reports.csv -------------------------------------------------------------------------------- /label_process_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/label_process_simple.png -------------------------------------------------------------------------------- /notebooks/classify_cancer.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/notebooks/classify_cancer.ipynb -------------------------------------------------------------------------------- /notebooks/classify_spon.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/notebooks/classify_spon.ipynb -------------------------------------------------------------------------------- /notebooks/classify_stenosis.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/notebooks/classify_stenosis.ipynb -------------------------------------------------------------------------------- /notebooks/compare_llm_results_cln.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/notebooks/compare_llm_results_cln.ipynb -------------------------------------------------------------------------------- /notebooks/simple_report_classification.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/notebooks/simple_report_classification.ipynb -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/requirements.txt -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/create_sample_for_ncimi_expert_labeling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/create_sample_for_ncimi_expert_labeling.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/preprocess_cauda_equina_labels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/preprocess_cauda_equina_labels.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/preprocess_osclmric_global_labels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/preprocess_osclmric_global_labels.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/preprocess_osclmric_ivd_level_labels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/preprocess_osclmric_ivd_level_labels.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/select_cauda_equina_ex.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/select_cauda_equina_ex.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/select_herniation_ex.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/select_herniation_ex.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/select_spon_ex.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/select_spon_ex.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/sep_clinical_history_full_ncimi_reports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/sep_clinical_history_full_ncimi_reports.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/sep_conclusion_full_ouh_reports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/sep_conclusion_full_ouh_reports.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/sep_conclusion_ncimi_test_reports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/sep_conclusion_ncimi_test_reports.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/split_train_test_herniation_reports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/split_train_test_herniation_reports.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/split_train_test_osclmric_reports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/split_train_test_osclmric_reports.py -------------------------------------------------------------------------------- /scripts/01_rep_preprocessing/split_train_test_spon_reports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/01_rep_preprocessing/split_train_test_spon_reports.py -------------------------------------------------------------------------------- /scripts/02_llms/01_training/run_lora_conclusion_training.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/02_llms/01_training/run_lora_conclusion_training.py -------------------------------------------------------------------------------- /scripts/02_llms/02_inference/call_gpt_api.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/02_llms/02_inference/call_gpt_api.py -------------------------------------------------------------------------------- /scripts/02_llms/02_inference/run_base_one_step_scores.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/02_llms/02_inference/run_base_one_step_scores.py -------------------------------------------------------------------------------- /scripts/02_llms/02_inference/run_base_two_step_scores.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/02_llms/02_inference/run_base_two_step_scores.py -------------------------------------------------------------------------------- /scripts/02_llms/02_inference/run_con_lora_base_two_step_scores.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/02_llms/02_inference/run_con_lora_base_two_step_scores.py -------------------------------------------------------------------------------- /scripts/02_llms/02_inference/run_con_lora_two_step_scores.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/02_llms/02_inference/run_con_lora_two_step_scores.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/01a_run_spinenet_osclmric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/01a_run_spinenet_osclmric.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/01b_run_spinenet_ncimi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/01b_run_spinenet_ncimi.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/02a_train_test_split_osclmric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/02a_train_test_split_osclmric.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/02b_resnet_encodings_osclmric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/02b_resnet_encodings_osclmric.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/02c_spinenet_encodings_osclmric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/02c_spinenet_encodings_osclmric.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/03a_train_test_split_ncimi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/03a_train_test_split_ncimi.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/03b_resnet_encodings_ncimi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/03b_resnet_encodings_ncimi.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/04a_train_test_split_spon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/04a_train_test_split_spon.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/04b_resnet_encodings_spon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/04b_resnet_encodings_spon.py -------------------------------------------------------------------------------- /scripts/03_img_preprocessing/04c_spinenet_encodings_spon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/scripts/03_img_preprocessing/04c_spinenet_encodings_spon.py -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinyjpark/AutoLabelClassifier/HEAD/setup.py --------------------------------------------------------------------------------