Skip to content

Commit 1908d23

Browse files
authored
Merge pull request #144 from linok-bc/master
pytc docs update
2 parents 91de668 + 8c07bb8 commit 1908d23

23 files changed

+1290
-142
lines changed

.readthedocs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
# Required
66
version: 2
77

8+
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "mambaforge-22.9"
13+
commands:
14+
- mamba env create --quiet --name latest --file docs/environment_docs.yml
15+
- pip install --editable .
16+
- git clone https://github.com/pytorch/pytorch_sphinx_theme
17+
- pip install -e pytorch_sphinx_theme
18+
- python -m sphinx -T -b html -d _build/doctrees -D language=en ./docs/source $READTHEDOCS_OUTPUT/html
819
# Build documentation in the docs/ directory with Sphinx
920
sphinx:
1021
configuration: docs/source/conf.py

configs/CREMI/CREMI-Base.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# All other configurations are set by default. If you want to add new config options,
22
# please modify ../connectomics/config/defaults.py
33
SYSTEM:
4-
NUM_GPUS: 3
5-
NUM_CPUS: 12
4+
NUM_GPUS: 1
5+
NUM_CPUS: 1
66
MODEL:
77
INPUT_SIZE: [17, 257, 257]
88
OUTPUT_SIZE: [17, 257, 257]
99
IN_PLANES: 1
1010
NORM_MODE: sync_bn
1111
FILTERS: [32, 64, 96, 128, 160]
1212
DATASET:
13-
IMAGE_NAME: images/im_A_v2_200.h5@images/im_B_v2_200.h5@images/im_C_v2_200.h5
14-
LABEL_NAME: gt-syn/syn_A_v2_200.h5@gt-syn/syn_B_v2_200.h5@gt-syn/syn_C_v2_200.h5
13+
IMAGE_NAME: corrected/im_A.h5@corrected/im_B.h5@corrected/im_C.h5
14+
LABEL_NAME: corrected/syn_A.h5@corrected/syn_B.h5@corrected/syn_C.h5
1515
INPUT_PATH: datasets/CREMI/
1616
OUTPUT_PATH: outputs/CREMI_syn_baseline
1717
PAD_SIZE: [0, 32, 32]
1818
REJECT_SAMPLING:
1919
SIZE_THRES: 1000
2020
P: 0.95
21-
DISTRIBUTED: True
21+
DISTRIBUTED: False
2222
SOLVER:
2323
LR_SCHEDULER_NAME: WarmupCosineLR
2424
BASE_LR: 0.02
@@ -30,7 +30,7 @@ INFERENCE:
3030
INPUT_SIZE: [17, 257, 257]
3131
OUTPUT_SIZE: [17, 257, 257]
3232
OUTPUT_ACT: ["sigmoid"]
33-
IMAGE_NAME: images/im_A+_v2_200_nocrack.h5@images/im_B+_v2_200.h5@images/im_C+_v2_200.h5
33+
IMAGE_NAME: corrected/im_A+.h5@corrected/im_B+.h5@corrected/im_C+.h5
3434
OUTPUT_PATH: outputs/CREMI_syn_baseline/test
3535
OUTPUT_NAME: result.h5
3636
DO_SINGLY: True
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# All other configurations are set by default. If you want to add new config options,
2+
# please modify ../connectomics/config/defaults.py
3+
SYSTEM:
4+
NUM_GPUS: 3
5+
NUM_CPUS: 12
6+
MODEL:
7+
INPUT_SIZE: [17, 257, 257]
8+
OUTPUT_SIZE: [17, 257, 257]
9+
IN_PLANES: 1
10+
NORM_MODE: sync_bn
11+
FILTERS: [32, 64, 96, 128, 160]
12+
DATASET:
13+
IMAGE_NAME: corrected/im_A.h5@corrected/im_B.h5@corrected/im_C.h5
14+
LABEL_NAME: corrected/syn_A.h5@corrected/syn_B.h5@corrected/syn_C.h5
15+
INPUT_PATH: datasets/CREMI/
16+
OUTPUT_PATH: outputs/CREMI_syn_baseline
17+
PAD_SIZE: [0, 32, 32]
18+
REJECT_SAMPLING:
19+
SIZE_THRES: 1000
20+
P: 0.95
21+
DISTRIBUTED: True
22+
SOLVER:
23+
LR_SCHEDULER_NAME: WarmupCosineLR
24+
BASE_LR: 0.02
25+
ITERATION_STEP: 1
26+
ITERATION_SAVE: 5000
27+
ITERATION_TOTAL: 150000
28+
SAMPLES_PER_BATCH: 2
29+
INFERENCE:
30+
INPUT_SIZE: [17, 257, 257]
31+
OUTPUT_SIZE: [17, 257, 257]
32+
OUTPUT_ACT: ["sigmoid"]
33+
IMAGE_NAME: corrected/im_A+.h5@corrected/im_B+.h5@corrected/im_C+.h5
34+
OUTPUT_PATH: outputs/CREMI_syn_baseline/test
35+
OUTPUT_NAME: result.h5
36+
DO_SINGLY: True
37+
PAD_SIZE: [0, 32, 32]
38+
AUG_MODE: mean
39+
AUG_NUM: 8
40+
STRIDE: [8, 128, 128]
41+
SAMPLES_PER_BATCH: 8

configs/SNEMI/SNEMI-Base.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# All other configurations are set by default. If you want to add new config options,
22
# please modify ../connectomics/config/defaults.py
33
SYSTEM:
4-
NUM_GPUS: 2
5-
NUM_CPUS: 16
4+
NUM_GPUS: 1
5+
NUM_CPUS: 1
66
AUGMENTOR:
77
SMOOTH: False
88
MODEL:
@@ -19,8 +19,8 @@ MODEL:
1919
FILTERS: [32, 64, 96, 128, 160]
2020
NORM_MODE: gn
2121
DATASET:
22-
IMAGE_NAME: train_image.h5
23-
LABEL_NAME: train_label.h5
22+
IMAGE_NAME: train-input.tif
23+
LABEL_NAME: train-label.tif
2424
INPUT_PATH: datasets/SNEMI3D/ # or your own dataset path
2525
OUTPUT_PATH: outputs/SNEMI3D/
2626
PAD_SIZE: [4, 64, 64]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# All other configurations are set by default. If you want to add new config options,
2+
# please modify ../connectomics/config/defaults.py
3+
SYSTEM:
4+
NUM_GPUS: 2
5+
NUM_CPUS: 16
6+
AUGMENTOR:
7+
SMOOTH: False
8+
MODEL:
9+
INPUT_SIZE: [17, 257, 257]
10+
OUTPUT_SIZE: [17, 257, 257]
11+
IN_PLANES: 1
12+
OUT_PLANES: 3
13+
TARGET_OPT: ["2"]
14+
LABEL_EROSION: 1
15+
LOSS_OPTION: [["WeightedBCEWithLogitsLoss", "DiceLoss"]]
16+
LOSS_WEIGHT: [[1.0, 0.5]]
17+
WEIGHT_OPT: [["1", "0"]]
18+
OUTPUT_ACT: [["none", "sigmoid"]]
19+
FILTERS: [32, 64, 96, 128, 160]
20+
NORM_MODE: gn
21+
DATASET:
22+
IMAGE_NAME: train-image.tif
23+
LABEL_NAME: train-label.tif
24+
INPUT_PATH: datasets/SNEMI3D/ # or your own dataset path
25+
OUTPUT_PATH: outputs/SNEMI3D/
26+
PAD_SIZE: [4, 64, 64]
27+
SOLVER:
28+
LR_SCHEDULER_NAME: WarmupCosineLR
29+
BASE_LR: 0.02
30+
ITERATION_STEP: 1
31+
ITERATION_SAVE: 10000
32+
ITERATION_TOTAL: 150000
33+
SAMPLES_PER_BATCH: 2
34+
MONITOR:
35+
ITERATION_NUM: [200, 1000]
36+
INFERENCE:
37+
INPUT_SIZE: [17, 513, 513]
38+
OUTPUT_SIZE: [17, 513, 513]
39+
OUTPUT_ACT: ["sigmoid"]
40+
IMAGE_NAME: test-input.tif # or path to your test images
41+
OUTPUT_PATH: outputs/SNEMI3D/test
42+
OUTPUT_NAME: result.h5
43+
PAD_SIZE: [4, 32, 32]
44+
AUG_MODE: min
45+
AUG_NUM: None
46+
STRIDE: [8, 256, 256]
47+
SAMPLES_PER_BATCH: 4

docs/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
To update the documentation
22

3-
1. Install packages: `pip install -r requirements.txt`
4-
2. Modify source files in `source/`
5-
3. Compile the code: `make html`
3+
1. Install connectomics package
4+
2. Install docs package: `pip install -r requirements.txt`
5+
3. Install correct version of pytorch_sphinx_theme:
6+
```
7+
git clone https://github.com/pytorch/pytorch_sphinx_theme
8+
pip install -e pytorch_sphinx_theme
9+
```
10+
4. Modify source files in `source/`
11+
5. Compile the code: `make html`

0 commit comments

Comments
 (0)