13hannes11
commited on
Commit
•
361ab76
1
Parent(s):
e2d20e2
add details to readme
Browse files
README.md
CHANGED
@@ -20,44 +20,32 @@ tags:
|
|
20 |
|
21 |
## Description
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
TODO
|
28 |
|
29 |
-
|
30 |
|
31 |
-
```
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
conda create -n myenv python=3.8
|
38 |
-
conda activate myenv
|
39 |
|
40 |
-
# install pytorch according to instructions
|
41 |
-
# https://pytorch.org/get-started/
|
42 |
|
43 |
-
|
44 |
-
pip install -r requirements.txt
|
45 |
-
```
|
46 |
|
47 |
-
Train model with
|
48 |
|
49 |
```bash
|
50 |
-
|
51 |
-
python train.py trainer.gpus=0
|
52 |
-
|
53 |
-
# train on GPU
|
54 |
-
python train.py trainer.gpus=1
|
55 |
```
|
56 |
|
57 |
-
Train
|
58 |
|
59 |
```bash
|
60 |
-
python train.py
|
61 |
```
|
62 |
|
63 |
You can override any parameter from command line like this
|
@@ -65,3 +53,7 @@ You can override any parameter from command line like this
|
|
65 |
```bash
|
66 |
python train.py trainer.max_epochs=20 datamodule.batch_size=64
|
67 |
```
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
## Description
|
22 |
|
23 |
+
This repository contains the models and training pipeline for my master thesis. The main repository is hosted on [GitHub](https://github.com/13hannes11/master_thesis_code).
|
24 |
|
25 |
+
The project structure is based on the template by [ashleve](https://github.com/ashleve/lightning-hydra-template).
|
|
|
|
|
26 |
|
27 |
+
The metadata is stored in `data/focus150/`. The relevant files are `test_metadata.csv`, `train_metadata.csv` and `validation_metadata.csv`. Image data (of 150 x 150 px images) is not published together with this repository therefore training runs are not possible to do without it. The layout of the metadata files is as follows
|
28 |
|
29 |
+
```csv
|
30 |
+
,image_path,scan_uuid,study_id,focus_height,original_filename,stack_id,obj_name
|
31 |
+
0,31/b0d4005e-57d0-4516-a239-abe02a8d0a67/I02413_X009_Y014_Z5107_750_300.jpg,b0d4005e-57d0-4516-a239-abe02a8d0a67,31,-0.013672000000000017,I02413_X009_Y014_Z5107.jpg,1811661,schistosoma
|
32 |
+
1,31/274d8969-aa7c-4ac0-be60-e753579393ad/I01981_X019_Y014_Z4931_450_0.jpg,274d8969-aa7c-4ac0-be60-e753579393ad,31,-0.029296999999999962,I01981_X019_Y014_Z4931.jpg,1661371,schistosoma
|
33 |
+
...
|
34 |
+
```
|
|
|
|
|
35 |
|
|
|
|
|
36 |
|
37 |
+
## How to run
|
|
|
|
|
38 |
|
39 |
+
Train model with chosen experiment configuration from `configs/experiment/`
|
40 |
|
41 |
```bash
|
42 |
+
python train.py experiment=focusResNet_150
|
|
|
|
|
|
|
|
|
43 |
```
|
44 |
|
45 |
+
Train with hyperparameter search from `configs/hparams_search/`
|
46 |
|
47 |
```bash
|
48 |
+
python train.py -m hparams_search=focusResNetMSE_150
|
49 |
```
|
50 |
|
51 |
You can override any parameter from command line like this
|
|
|
53 |
```bash
|
54 |
python train.py trainer.max_epochs=20 datamodule.batch_size=64
|
55 |
```
|
56 |
+
|
57 |
+
## Jupyter notebooks
|
58 |
+
|
59 |
+
Figures and other evaluation code was run in Jupyter notebooks. These are available at `notebooks/`
|