Skip to content
Snippets Groups Projects
Commit c53372e6 authored by Ycblue's avatar Ycblue
Browse files

config

parent a01b5beb
Branches update
No related tags found
No related merge requests found
#General:
gpu_ids: '0'
phase: train
verbose: False
update_TB_images_freq: 5000
grid_search: False
n_min_layers: 4
n_max_layers: 7
run_dev_mode: False
#Data:
###########
# Update! #
###########
stain: HE
stainB: PAS
pathStainA: /path/to/A
pathStainB: /path/to/B
resultsPath: /train/result/path
testResultsPath: /test/result/path
dataStage: Train
###########
suffix: ''
dataset_mode: unaligned
preload: True
direction: BtoA
serial_batches: 4
num_threads: 4
batch_size: 3
load_size: 640
crop_size: 640
max_dataset_size: inf
preprocess: none
no_flip: False
#Model:
model: cycle_gan
input_nc: 3
output_nc: 3
ngf: 32 # # of gen filters in the last conv layer
ndf: 32 # # of disc filters in the first conv layer
netD: n_layers
netG: unet
n_layers_D: 4
n_layers_G: 7
norm: instance
init_type: normal
init_gain: 0.02
no_dropout: False
use_MC: False
#SegModel
use_segm_model: True
segm_model_path: /path/to/flash/model/
#Training:
niters: 30000
niters_init: 0
beta1: 0.5
lambda_id: 1
lr: 0.0001
gan_mode: lsgan
pool_size: 50
lr_policy: linear
niters_linDecay: 100
niters_stepDecay: 50
validation_freq: 1000
saveModelEachNIteration: 10000
print_memory_usage_freq: 5000
\ No newline at end of file
...@@ -15,20 +15,26 @@ ...@@ -15,20 +15,26 @@
`CUDA_VISIBLE_DEVICES=0 python train.py --config config.yaml --gridsearch` `CUDA_VISIBLE_DEVICES=0 python train.py --config config.yaml --gridsearch`
Directory output should look like this: Directory output should look like this:
```
├── somewhere ├── somewhere
│ ├── StainA_StainB │ ├── StainA_StainB
│ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_4_32_batch... │ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_4_32_batch...
│ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_5_32_batch... │ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_5_32_batch...
│ │ │ ├── Models │ │ │ ├── Models
```
4. Run test_gridseach.py to generate visual_check images to decide which model is best 4. Run test_gridseach.py to generate visual_check images to decide which model is best
`CUDA_VISIBLE_DEVICES=0 python test_gridsearch.py --config config.yaml` `CUDA_VISIBLE_DEVICES=0 python test_gridsearch.py --config config.yaml`
```
├── somewhere ├── somewhere
│ ├── StainA_StainB │ ├── StainA_StainB
│ │ ├── gridsearch_visual_check_4_8.png │ │ ├── gridsearch_visual_check_4_8.png
│ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_4_32_batch... │ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_4_32_batch...
│ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_5_32_batch... │ │ ├── cycle_gan_gen_unet_4_32_dis_n_layers_5_32_batch...
│ │ │ ├── Models │ │ │ ├── Models
```
5. Copy best model with directory to `somewhere/StainA_StainB/best/ 5. Copy best model with directory to `somewhere/StainA_StainB/best/
6. run `test.py` and the best model should be found automatically.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment