Upload config.yaml
Browse files- rftrans/configs/config.yaml +109 -0
rftrans/configs/config.yaml
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RFTrans Table II reproduction - end-to-end fine-tune with paper-faithful loss
|
| 2 |
+
# Bug fix: training previously used loss = L_flow + alpha*L_norm with alpha=0.02
|
| 3 |
+
# (flow dominates ~100x, normal supervision essentially ignored).
|
| 4 |
+
# Paper Eq.: L = alpha * L_flow + L_norm with alpha=0.01 (best per Table IV).
|
| 5 |
+
train:
|
| 6 |
+
datasetsTrain:
|
| 7 |
+
- images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/RGB'
|
| 8 |
+
flows: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/flow'
|
| 9 |
+
labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/normal'
|
| 10 |
+
masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/mask'
|
| 11 |
+
|
| 12 |
+
datasetsVal:
|
| 13 |
+
- images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB'
|
| 14 |
+
flows: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/flow'
|
| 15 |
+
labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal'
|
| 16 |
+
masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
|
| 17 |
+
|
| 18 |
+
datasetsTestReal:
|
| 19 |
+
datasetsTestSynthetic:
|
| 20 |
+
|
| 21 |
+
rgb2flow:
|
| 22 |
+
model: "drn"
|
| 23 |
+
numClasses: 2
|
| 24 |
+
numInputChannels: 3
|
| 25 |
+
pathWeightsFile: "/data1/liulingfeng/cooperation/ghy/RFTrans-repro/RFTrans/pytorch_networks/refractive_flow/logs-deeplab/exp-001/checkpoints/checkpoint-epoch-0500.pth"
|
| 26 |
+
|
| 27 |
+
flow2normal:
|
| 28 |
+
model: "simple_unet"
|
| 29 |
+
numClasses: 3
|
| 30 |
+
numInputChannels: 3
|
| 31 |
+
pathWeightsFile: "/data1/liulingfeng/cooperation/ghy/RFTrans-repro/RFTrans/pytorch_networks/flow2normal/logs-deeplab/exp-000/checkpoints/checkpoint-epoch-0500.pth"
|
| 32 |
+
|
| 33 |
+
model: "drn"
|
| 34 |
+
batchSize: 8
|
| 35 |
+
validationBatchSize: 8
|
| 36 |
+
testBatchSize: 8
|
| 37 |
+
numEpochs: 100
|
| 38 |
+
# Train at data's native 512x512 (matches the pretrained R2F/F2N which learned
|
| 39 |
+
# flow magnitudes in the 512-frame). Paper says 256x256 but our train_cg data
|
| 40 |
+
# is rendered at 512x512 and the pretrained checkpoints were trained at 512.
|
| 41 |
+
imgHeight: 512
|
| 42 |
+
imgWidth: 512
|
| 43 |
+
numWorkers: 8
|
| 44 |
+
logsDir: "logs-deeplab"
|
| 45 |
+
lossFunc: "cosine"
|
| 46 |
+
percentageDataForTraining: 1.0
|
| 47 |
+
percentageDataForValidation: 0.5
|
| 48 |
+
|
| 49 |
+
outputStride: 8
|
| 50 |
+
epochSize: 1
|
| 51 |
+
|
| 52 |
+
# initialize from previously trained separate checkpoints (RFNet / F2Net)
|
| 53 |
+
continueTraining: True
|
| 54 |
+
pathPrevCheckpoint: ""
|
| 55 |
+
initOptimizerFromCheckpoint: False
|
| 56 |
+
loadEpochNumberFromCheckpoint: False
|
| 57 |
+
|
| 58 |
+
saveImageInterval: 1
|
| 59 |
+
saveImageIntervalIter: 1000
|
| 60 |
+
testInterval: 1
|
| 61 |
+
saveModelInterval: 1
|
| 62 |
+
|
| 63 |
+
# NOTE: paper specifies SGD lr=1e-4 momentum 0.9 weight_decay 5e-4 for 100 ep,
|
| 64 |
+
# but fine-tuning from already-Adam-trained pretrained R2F/F2N with SGD@1e-4
|
| 65 |
+
# barely moves the weights. Use Adam @ 1e-4 to converge faster from the
|
| 66 |
+
# pretrained init (loss bug previously suppressed the normal supervision).
|
| 67 |
+
optimizer: "SGD"
|
| 68 |
+
optimSgd:
|
| 69 |
+
learningRate: 1e-4
|
| 70 |
+
momentum: 0.9
|
| 71 |
+
weight_decay: 5e-4
|
| 72 |
+
optimAdam:
|
| 73 |
+
learningRate: 1e-4
|
| 74 |
+
weightDecay: 0.0001
|
| 75 |
+
lrScheduler: "StepLR"
|
| 76 |
+
lrSchedulerStep:
|
| 77 |
+
step_size: 30
|
| 78 |
+
gamma: 0.5
|
| 79 |
+
|
| 80 |
+
# alpha for joint loss; paper best = 0.01 with L = alpha * L_flow + L_norm
|
| 81 |
+
loss_alpha: 0.01
|
| 82 |
+
|
| 83 |
+
eval:
|
| 84 |
+
datasetsSynthetic:
|
| 85 |
+
- images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB'
|
| 86 |
+
flows: ''
|
| 87 |
+
labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal'
|
| 88 |
+
masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
|
| 89 |
+
|
| 90 |
+
datasetsReal:
|
| 91 |
+
|
| 92 |
+
rgb2flow:
|
| 93 |
+
model: "drn"
|
| 94 |
+
numClasses: 2
|
| 95 |
+
numInputChannels: 3
|
| 96 |
+
pathWeightsFile: ""
|
| 97 |
+
|
| 98 |
+
flow2normal:
|
| 99 |
+
model: "simple_unet"
|
| 100 |
+
numClasses: 3
|
| 101 |
+
numInputChannels: 3
|
| 102 |
+
pathWeightsFile: ""
|
| 103 |
+
|
| 104 |
+
model: "drn"
|
| 105 |
+
batchSize: 4
|
| 106 |
+
imgHeight: 256
|
| 107 |
+
imgWidth: 256
|
| 108 |
+
numWorkers: 4
|
| 109 |
+
resultsDir: "data/results"
|