Initial upload: ProgressiveDepth + RFTrans final ckpts and configs
Browse filesFiles changed (16)
- README.md+148-2
- progressivedepth/ckpts/C_stage2_epoch029.pthAdded+3
- progressivedepth/ckpts/C_stage3_epoch029.pthAdded+3
- progressivedepth/ckpts/lidf_stage1_epoch059.pthAdded+3
- progressivedepth/configs/pipeline_config.yamlAdded+54
- progressivedepth/configs/train_progressive_stage2.yamlAdded+133
- progressivedepth/configs/train_progressive_stage3.yamlAdded+132
- rftrans/ckpts/f2net_flow2normal_epoch500.pthAdded+3
- rftrans/ckpts/mask_adam_epoch195.pthAdded+3
- rftrans/ckpts/outlines_side_adam_epoch195.pthAdded+3
- rftrans/ckpts/rfnet_refractive_flow_epoch500.pthAdded+3
- rftrans/configs/exp017_paperfaithful.yamlAdded+109
- rftrans/configs/flow2normal_config.yamlAdded+120
- rftrans/configs/mask_adam_config.yamlAdded+76
- rftrans/configs/outlines_side_adam_config.yamlAdded+130
- rftrans/configs/refractive_flow_config.yamlAdded+100
123# GridDepth - placeholderUpload test from progressive depth bot.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149---license: otherlanguage:- entags:- depth-completion- transparent-objects- robotics- cleargrasp- lidf- rftrans- transdifflibrary_name: pytorch---# GridDepth: Pretrained Checkpoints for Transparent-Object Depth CompletionThis repo hosts the **pretrained checkpoints** that go with the[atom525/ProgressiveDepth](https://github.com/atom525/ProgressiveDepth) codebase(idea.md series-joint pipeline: TransDiff Refined1 → LIDF) **plus** our local**RFTrans reproduction** baselines.> **Recipe**: see [atom525/ProgressiveDepth README.md](https://github.com/atom525/ProgressiveDepth)> and [docs/PIPELINE.md](https://github.com/atom525/ProgressiveDepth/blob/main/docs/PIPELINE.md).---## File layout```GridDepth/├── progressivedepth/ # idea.md 主线(Module A=ip_basic + Module B=LIDF)│ ├── ckpts/│ │ ├── lidf_stage1_epoch059.pth # 248 MB — LIDF Stage 1 (frozen baseline, CG-only Adam 60 ep)│ │ ├── C_stage2_epoch029.pth # 2.2 MB — Stage 2 RefineNet, retrained on Refined1 input (idea.md C run)│ │ └── C_stage3_epoch029.pth # 2.2 MB — Stage 3 RefineNet hard-neg, retrained on Refined1 input│ └── configs/│ ├── train_progressive_stage2.yaml│ ├── train_progressive_stage3.yaml│ └── pipeline_config.yaml # inference / evaluate config│└── rftrans/ # RFTrans 复现产物├── ckpts/│ ├── rfnet_refractive_flow_epoch500.pth # 467 MB — RFNet (DRN backbone), Adam 500 ep on unity/train│ ├── f2net_flow2normal_epoch500.pth # 356 MB — F2Net (simple_unet), Adam 500 ep on unity/train│ ├── mask_adam_epoch195.pth # 312 MB — mask network (DRN), Adam 200 ep on unity/train, mIoU 0.847│ └── outlines_side_adam_epoch195.pth # 312 MB — boundary network (DRN side-output), Adam 200 ep on unity/train└── configs/├── refractive_flow_config.yaml # RFNet train config (Adam, 500 ep)├── flow2normal_config.yaml # F2Net train config (Adam, 500 ep)├── mask_adam_config.yaml # mask train config (Adam, 200 ep)├── outlines_side_adam_config.yaml # boundary train config (Adam, 200 ep)└── exp017_paperfaithful.yaml # rgb2normal e2e config (paper-faithful: SGD 100 ep, lr=1e-4 mom=0.9 wd=5e-4)```---## ProgressiveDepth (idea.md series-joint pipeline)Pipeline:```RGB + Noisy Depth│▼ Module A: TransDiff Data Preprocessing (ip_basic 多尺度形态学填充)Refined Depth1│▼ Module B: LIDF (Stage 1 frozen + Stage 2 / 3 retrained on Refined1)Final Depth```### Final results (paper protocol: 256×144 + per-image avg + corrupt mask)C_full = `lidf_stage1_epoch059.pth` + `C_stage2_epoch029.pth` + `C_stage3_epoch029.pth`,evaluation 用 mode A (feed_to_lidf=refined1):| Dataset | C_full RMSE↓ | C_full δ1.05↑ | B baseline RMSE | B baseline δ1.05 | LIDF paper Table 1 ||---|---:|---:|---:|---:|---:|| **real-test (Real-novel)** ⭐ | **0.0403** | **45.28** | 0.0443 | 40.18 | 0.0250 / 76.21 || real-val (Real-known) | 0.0351 | 77.22 | 0.0358 | 77.18 | 0.0280 / 82.37 || synthetic-test (Syn-novel) | 0.0328 | 62.82 | 0.0305 | 66.12 | 0.0280 / 68.62 || synthetic-val (Syn-known) | 0.0129 | 93.72 | 0.0111 | 96.07 | 0.0120 / 94.79 |**Conclusion**: idea.md series-joint approach is **effective on real-world data** (Real-novel RMSE ↓9%, δ1.05 ↑5 pts vs baseline B), **regression on synthetic** (where ip_basic adds noise to clean inputs). The remaining gap to paper Table 1 is due to Omniverse Object Dataset being unavailable (link broken since 2025-03, [NVlabs/implicit_depth#3](https://github.com/NVlabs/implicit_depth/issues/3)).---## RFTrans reproductionPipeline (per RFTrans paper §III-C):```RGB ──> RFNet ──> refractive flow + mask + boundary│└──> F2Net ──> surface normal│└──> depth2depth global opt ──> Refined Depth```### Caveats1. **Architecture deviation**: paper §III-C says "RFNet predicts mask, boundary, and refractive flow" (multi-task), but the official repo doesn't implement this. We trained **separate networks** (RFNet predicts only flow, F2Net predicts normal from flow, mask & boundary as independent DeepLab+DRN networks) — this matches the actual repo structure but not the paper text.2. **Optimizer deviation**: paper §IV-A specifies SGD lr=1e-4 momentum=0.9 weight_decay=5e-4 for 100 epochs. We used **Adam** for sub-network training because we empirically found SGD lr=1e-4 from random init **does not converge** (mask val mIoU ~0.46 = random level after 100 ep SGD vs 0.85 with Adam 200 ep). The provided `exp017_paperfaithful.yaml` IS paper-faithful (SGD 100 ep) — used for the **end-to-end fine-tuning stage**, where it warm-starts from the Adam-trained RFNet/F2Net.3. **Training data**: all networks trained on `data/unity/train/` (5000 RGB + flow + mask + boundary + normal GT, generated with [Unity-RefractiveFlowRender](https://github.com/LJY-XCX/Unity-RefractiveFlowRender)) — this is the dataset specified by RFTrans paper §IV-A.### How to use these RFTrans ckptsIn your `RFTrans/eval_depth_completion/config_*.yaml`:```yamlrgb2flow:pathWeightsFile: <path_to>/rfnet_refractive_flow_epoch500.pthflow2normal:pathWeightsFile: <path_to>/f2net_flow2normal_epoch500.pthmasks:pathWeightsFile: <path_to>/mask_adam_epoch195.pth # OR cleargrasp_orig/.../checkpoint_mask.pthoutlines:pathWeightsFile: <path_to>/outlines_side_adam_epoch195.pth # OR cleargrasp_orig/.../checkpoint_outlines.pth```---## Environment / dependencies- python 3.8, pytorch 2.0.0+cu118- LIDF: see [implicit_depth/requirements.txt](https://github.com/atom525/ProgressiveDepth/blob/main/implicit_depth/requirements.txt)- RFTrans: needs `depth2depth` C++ binary and `libhdf5.so` from conda env## License- LIDF Stage 1 ckpt and code: NVIDIA Source Code License (Non-Commercial), inherited from [NVlabs/implicit_depth](https://github.com/NVlabs/implicit_depth)- RFTrans ckpts and code: inherited from [LJY-XCX/RFTrans](https://github.com/LJY-XCX/RFTrans) license- Our extensions (transdiff_preprocess wrapper, train_progressive trainer, retrains): same as upstream## CitationIf you use these ckpts please cite the original works:```bibtex@inproceedings{zhu2021rgbd,title={RGB-D Local Implicit Function for Depth Completion of Transparent Objects},author={Zhu, Luyang and Mousavian, Arsalan and Xiang, Yu and Mazhar, Hammad and van Eenbergen, Jozef and Debnath, Shoubhik and Fox, Dieter},booktitle={CVPR},year={2021}}@article{tang2024rftrans,title={RFTrans: Leveraging Refractive Flow of Transparent Objects for Surface Normal Estimation and Manipulation},author={Tang, Tutian and Liu, Jiyu and Zhang, Jieyi and Fu, Haoyuan and Xu, Wenqiang and Lu, Cewu},journal={IEEE Robotics and Automation Letters},year={2024}}```
123version https://git-lfs.github.com/spec/v1oid sha256:7d54da2adc3492ac23902d19a586829e136bcc67d1d116ef741f4ba23ca7a554size 2272391123version https://git-lfs.github.com/spec/v1oid sha256:0d077188c8c85465169b1f346d7cb6bcf36ac7713389aff1f857c40d4141228esize 2272391123version https://git-lfs.github.com/spec/v1oid sha256:5db75336cfa1c8ea07251e37a93c17a7f9eeec11daa54615d41752e794446f15size 259974039123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354paths: cleargrasp_root: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/implicit_depth/datasets/cleargrasp lidf_stage1_ckpt: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/implicit_depth/logs/lidf/ckpt/bn24_lr0.001_nepo60_Adam_gres8_msn20000_vsn10000_rgb_resnet_embed_ROIAlign_pnet_twostage_offdec_IEF_niter2_probdec_IMNET_scatter_Maxpool_epo6_prob_ray_sn10.0_epo0_cleargrasp/epoch059_network.pth lidf_stage2_ckpt: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/implicit_depth/logs/refine/ckpt/refine_bn24_lr0.001_nepo30_Adam_gres8_msn20000_vsn10000_refine_forward2_perturb0.8_s-0.2_e0.2_prob_ray_sn10.0_epo0_mixed/epoch029_network.pth lidf_stage3_ckpt: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/implicit_depth/logs/refine/ckpt/refine_bn24_lr0.0001_nepo30_Adam_gres8_msn20000_vsn10000_refine_forward2_perturb0.8_s-0.2_e0.2_prob_ray_sn2.0_epo0_hardneg_cleargrasp_progressive_stage3_hardneg_refined1/epoch029_network.pth output_dir: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/resultstransdiff: max_depth: 100.0 blur_type: bilateral extrapolate: false feed_to_lidf: refined1 # idea.md 默认路径 A:TransDiff Refined1 喂给 LIDFlidf: use_stage: stage3 # 论文 Table 1 数字对应的就是 LIDF + RefineNet (60 epoch + 30 hardneg) miss_sample_num: 20000 hit_sample_num: 5000 forward_times: 2 device: cuda gpu_id: 0evaluation: datasets: - real-test - real-val - synthetic-test - synthetic-val metrics: - rmse - abs_rel - mae - a1 - a2 - a3 min_depth: 0.0 max_depth: 100.0visualization: save_vis: true num_vis: 10 vis_types: - noisy - refined1 - final - gtinnovations: use_mask_driven: false mask_driven: segment_loss_weight: 0.0 boundary_loss_weight: 0.0 use_spvnas: false spvnas: voxel_size_range: - 4 - 16 sample_density_range: - 8 - 32123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133# ProgressiveDepth Stage 2 训练配置# - LIDF stage1 冻结,从已有 _cleargrasp 60-epoch ckpt 加载# - 数据加载阶段在 base dataset 外面套 TransDiffWrappedDataset,# 把 depth_corrupt 替换成 ip_basic Refined1,再喂给 LIDF# - 30 epoch + lr 0.001(与论文 stage2 完全对齐)# - 单 GPU(DDP off)以避免数据多副本对 Refined1 的额外 CPU 压力
trainer_name: progressiveexp_type: trainbase_log_dir: ../logs/refinelidf_ckpt_path: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/implicit_depth/logs/lidf/ckpt/bn24_lr0.001_nepo60_Adam_gres8_msn20000_vsn10000_rgb_resnet_embed_ROIAlign_pnet_twostage_offdec_IEF_niter2_probdec_IMNET_scatter_Maxpool_epo6_prob_ray_sn10.0_epo0_cleargrasp/epoch059_network.pthlog_name:custom_postfix: 'progressive_stage2_refined1'resume: latest_network.pthgpu_id:vis_gpu: '5'
mask_type: all
# 我们的扩展:TransDiff Refined1 喂 LIDF 的开关progressive: max_depth: 100.0 blur_type: bilateral extrapolate: false enable_train: true enable_valid: true
# 数据:因 Omniverse 缺失,只用 cleargrasp synthetic traindataset: type: cleargrasp cleargrasp_root_dir: ../datasets/cleargrasp omniverse_root_dir: ../datasets/omniverse use_data_augmentation: True img_width: 320 img_height: 240 split_ratio: 0.9 omni_corrupt_all: True corrupt_table: True depth_aug: False corrupt_all_pix: False ellipse_dropout_mean: 20 ellipse_gamma_shape: 10.0 ellipse_gamma_scale: 1.0
model: rgb_model_type: resnet rgb_embedding_type: ROIAlign rgb_in: 3 rgb_out: 32 roi_inp_bbox: 8 roi_out_bbox: 2 pnet_model_type: twostage pnet_in: 6 pnet_out: 128 pnet_gf: 32 pnet_pos_type: rel pos_encode: True intersect_pos_type: abs multires: 8 multires_views: 4 offdec_type: IEF n_iter: 2 probdec_type: IMNET imnet_gf: 64 scatter_type: Maxpool maxpool_label_epo: 0
refine: forward_times: 2 perturb: True perturb_prob: 0.8 pnet_model_type: twostage pnet_in: 6 pnet_out: 128 pnet_gf: 32 pnet_pos_type: rel pos_encode: True intersect_pos_type: abs multires: 8 multires_views: 4 offdec_type: IEF n_iter: 2 imnet_gf: 64 use_sigmoid: False offset_range: [-0.2, 0.2] use_all_pix: True
grid: res: 8 miss_sample_num: 20000 valid_sample_num: 10000 offset_range: [0., 1.]
training: batch_size: 24 valid_batch_size: 1 nepochs: 30 nepoch_decay: 30 decay_gamma: 0.1 nepoch_ckpt: 1 log_interval: 20 # 关掉可视化(同时被 train_progressive.visualize() override 兜底) train_vis_iter: 999999 val_vis_iter: 999999 lr: 0.001 num_workers: 4 pin_memory: False do_valid: True valid_start_epo: 0 optimizer_name: Adam scheduler_name: StepLR
loss: hard_neg: False hard_neg_ratio: pos_loss_type: single pos_w: 100.0 prob_loss_type: ray prob_w: 0 surf_norm_w: 10.0 surf_norm_epo: 0 smooth_w: 0 smooth_epo: 0
dist: ddp: False dist_url: dist_backend: nodes_num: 1 node_rank: 0 ngpus_per_node: 1 world_size: global_gpu_id:123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132# ProgressiveDepth Stage 3 训练(hard-negative mining)—— 接续 stage2 retrain# 在 stage2 retrain 跑完(C run 给出 epoch_029 ckpt)后,用 ip_basic Refined1 输入# 续训 30 epoch hard-neg。## 严格对齐论文 stage3 协议:lr=0.0001(lr/10),pos_w=20(/5),sn_w=2(/5),# loss.hard_neg=True, hard_neg_ratio=0.1(top 10% 误差像素)。# checkpoint_path 指向 stage2 retrain 的 epoch_029,避免从 noisy-trained ckpt 暖启。
trainer_name: progressiveexp_type: trainbase_log_dir: ../logs/refinelidf_ckpt_path: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/implicit_depth/logs/lidf/ckpt/bn24_lr0.001_nepo60_Adam_gres8_msn20000_vsn10000_rgb_resnet_embed_ROIAlign_pnet_twostage_offdec_IEF_niter2_probdec_IMNET_scatter_Maxpool_epo6_prob_ray_sn10.0_epo0_cleargrasp/epoch059_network.pthcheckpoint_path: /data1/liulingfeng/cooperation/ghy/ProgressiveDepth/implicit_depth/logs/refine/ckpt/refine_bn24_lr0.001_nepo30_Adam_gres8_msn20000_vsn10000_refine_forward2_perturb0.8_s-0.2_e0.2_prob_ray_sn10.0_epo0_cleargrasp_progressive_stage2_refined1/epoch029_network.pthlog_name:custom_postfix: 'progressive_stage3_hardneg_refined1'resume: latest_network.pthgpu_id:vis_gpu: '5'
mask_type: all
progressive: max_depth: 100.0 blur_type: bilateral extrapolate: false enable_train: true enable_valid: true
dataset: type: cleargrasp cleargrasp_root_dir: ../datasets/cleargrasp omniverse_root_dir: ../datasets/omniverse use_data_augmentation: True img_width: 320 img_height: 240 split_ratio: 0.9 omni_corrupt_all: True corrupt_table: True depth_aug: False corrupt_all_pix: False ellipse_dropout_mean: 20 ellipse_gamma_shape: 10.0 ellipse_gamma_scale: 1.0
model: rgb_model_type: resnet rgb_embedding_type: ROIAlign rgb_in: 3 rgb_out: 32 roi_inp_bbox: 8 roi_out_bbox: 2 pnet_model_type: twostage pnet_in: 6 pnet_out: 128 pnet_gf: 32 pnet_pos_type: rel pos_encode: True intersect_pos_type: abs multires: 8 multires_views: 4 offdec_type: IEF n_iter: 2 probdec_type: IMNET imnet_gf: 64 scatter_type: Maxpool maxpool_label_epo: 0
refine: forward_times: 2 perturb: True perturb_prob: 0.8 pnet_model_type: twostage pnet_in: 6 pnet_out: 128 pnet_gf: 32 pnet_pos_type: rel pos_encode: True intersect_pos_type: abs multires: 8 multires_views: 4 offdec_type: IEF n_iter: 2 imnet_gf: 64 use_sigmoid: False offset_range: [-0.2, 0.2] use_all_pix: True
grid: res: 8 miss_sample_num: 20000 valid_sample_num: 10000 offset_range: [0., 1.]
training: batch_size: 24 valid_batch_size: 1 nepochs: 30 nepoch_decay: 30 decay_gamma: 0.1 nepoch_ckpt: 1 log_interval: 20 train_vis_iter: 999999 val_vis_iter: 999999 lr: 0.0001 num_workers: 4 pin_memory: False do_valid: True valid_start_epo: 0 optimizer_name: Adam scheduler_name: StepLR
loss: hard_neg: True hard_neg_ratio: 0.1 pos_loss_type: single pos_w: 20.0 prob_loss_type: ray prob_w: 0 surf_norm_w: 2.0 surf_norm_epo: 0 smooth_w: 0 smooth_epo: 0
dist: ddp: False dist_url: dist_backend: nodes_num: 1 node_rank: 0 ngpus_per_node: 1 world_size: global_gpu_id:123version https://git-lfs.github.com/spec/v1oid sha256:96b61fe6255bb985d39513a7c24deb353519d66cf3a1b81877f03754dd14365dsize 372605797123version https://git-lfs.github.com/spec/v1oid sha256:1a63181d9ca1a1e4f48a5a9bc6cb563367246b3716df54f56cda401ae948ba5bsize 326305765123version https://git-lfs.github.com/spec/v1oid sha256:0781611ccaa86c04012ba366ff8e8cf51039fee4eeb330527d3bc5bcb4a7db27size 326308517123version https://git-lfs.github.com/spec/v1oid sha256:a5b75cf2233aab6a637c4a5676ebb3562489bea1e35423c703fd72a8e34dbc03size 489345509123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109# RFTrans Table II reproduction - end-to-end fine-tune with paper-faithful loss# Bug fix: training previously used loss = L_flow + alpha*L_norm with alpha=0.02# (flow dominates ~100x, normal supervision essentially ignored).# Paper Eq.: L = alpha * L_flow + L_norm with alpha=0.01 (best per Table IV).train: datasetsTrain: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/RGB' flows: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/flow' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/normal' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_cg/mask'
datasetsVal: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB' flows: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/flow' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
datasetsTestReal: datasetsTestSynthetic:
rgb2flow: model: "drn" numClasses: 2 numInputChannels: 3 pathWeightsFile: "/data1/liulingfeng/cooperation/ghy/RFTrans-repro/RFTrans/pytorch_networks/refractive_flow/logs-deeplab/exp-001/checkpoints/checkpoint-epoch-0500.pth"
flow2normal: model: "simple_unet" numClasses: 3 numInputChannels: 3 pathWeightsFile: "/data1/liulingfeng/cooperation/ghy/RFTrans-repro/RFTrans/pytorch_networks/flow2normal/logs-deeplab/exp-000/checkpoints/checkpoint-epoch-0500.pth"
model: "drn" batchSize: 8 validationBatchSize: 8 testBatchSize: 8 numEpochs: 100 # Train at data's native 512x512 (matches the pretrained R2F/F2N which learned # flow magnitudes in the 512-frame). Paper says 256x256 but our train_cg data # is rendered at 512x512 and the pretrained checkpoints were trained at 512. imgHeight: 512 imgWidth: 512 numWorkers: 8 logsDir: "logs-deeplab" lossFunc: "cosine" percentageDataForTraining: 1.0 percentageDataForValidation: 0.5
outputStride: 8 epochSize: 1
# initialize from previously trained separate checkpoints (RFNet / F2Net) continueTraining: True pathPrevCheckpoint: "" initOptimizerFromCheckpoint: False loadEpochNumberFromCheckpoint: False
saveImageInterval: 1 saveImageIntervalIter: 1000 testInterval: 1 saveModelInterval: 1
# NOTE: paper specifies SGD lr=1e-4 momentum 0.9 weight_decay 5e-4 for 100 ep, # but fine-tuning from already-Adam-trained pretrained R2F/F2N with SGD@1e-4 # barely moves the weights. Use Adam @ 1e-4 to converge faster from the # pretrained init (loss bug previously suppressed the normal supervision). optimizer: "SGD" optimSgd: learningRate: 1e-4 momentum: 0.9 weight_decay: 5e-4 optimAdam: learningRate: 1e-4 weightDecay: 0.0001 lrScheduler: "StepLR" lrSchedulerStep: step_size: 30 gamma: 0.5
# alpha for joint loss; paper best = 0.01 with L = alpha * L_flow + L_norm loss_alpha: 0.01
eval: datasetsSynthetic: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB' flows: '' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
datasetsReal:
rgb2flow: model: "drn" numClasses: 2 numInputChannels: 3 pathWeightsFile: ""
flow2normal: model: "simple_unet" numClasses: 3 numInputChannels: 3 pathWeightsFile: ""
model: "drn" batchSize: 4 imgHeight: 256 imgWidth: 256 numWorkers: 4 resultsDir: "data/results"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120# train.py Config - Trainingtrain: # For datasets, please pass atleast 1 value. If no datasets exist, pass "" as path for images. # Synthetic datasets with ground truth labels datasetsTrain:
- images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/flow' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/normal' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/mask'
# - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/predicted_flows'# labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/normal'# masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/mask'
# Synthetic datasets with ground truth labels - 10% split of train datasetsVal: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/flow' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'## - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/predicted_flows'# labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal'# masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
# Real Images (no ground truth labels) datasetsTestReal: # - images: 'data/datasets/test/camera-pics/resized-files/preprocessed-rgb-imgs' # labels: '' # - images: 'data/datasets/test/realsense-captures/resized-files/preprocessed-rgb-imgs' # labels: '' # - images: 'data/datasets/test/realsense-demo-table-2/source-files/rgb-imgs' # labels: '' # - images: 'data/datasets/test/realsense-demo-table-3/source-files/rgb-imgs' # labels: ''
# Synthetic datasets with ground truth labels - Used as test set datasetsTestSynthetic:# - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/calibration/refractive_flow'# labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal'
# Training/Validation Params model: "simple_unet" # Possible values: ["drn", unet", "deeplab_xception", "deeplab_resnet", "refinenet", "simple_unet"] batchSize: 16 batchSizeMatterport: 0 batchSizeScannet: 0 validationBatchSize: 16 testBatchSize: 16 numEpochs: 501 imgHeight: 512 imgWidth: 512 numClasses: 3 numInputChannels: 3 # Num of channels in input image. RGB = 3 channels, Grayscale = 1 channel. numWorkers: 16 # Num of workers used in the dataloader logsDir: "logs-deeplab" # Directory where logs of each exp will be saved. lossFunc: "cosine" # Possible values: ['cosine', 'radians'] percentageDataForTraining: 1.0 # The percentage of images in dataset to be used for training. percentageDataForMatterportTraining: 0.5 # The percentage of images in dataset to be used for training. percentageDataForScannetTraining: 0.35 percentageDataForValidation: 0.25 percentageDataForMatterportVal: 0.5 percentageDataForScannettVal: 0.5
# Deeplab specific outputStride: 8 # Possible values: [8, 16]. Output stride for deeplabv3 model. Smaller values give finer details in output mask. epochSize: 1 # After these many epochs, change learning rate
continueTraining: False # If true, continue training from a checkpoint pathPrevCheckpoint: "/home/jiyu/ClearGrasp/pytorch_networks/refraction_flows/logs-deeplab/exp-003/checkpoints-adam/checkpoint-epoch-0020.pth" # Path to .pth checkpoint file to load to continue training from initOptimizerFromCheckpoint: False # Re-Initialize optimizer's state from checkpoint. NOTE: when this is enabled, value of learningRate will be overridden with value from checkpoint. loadEpochNumberFromCheckpoint: False # If true, the epoch/iter numbering will start from the checkpoint's last epoch num.
saveImageInterval: 1 # Log output images to tensorboard every saveImageInterval epochs saveImageIntervalIter: 100 # Every N iterations, log output images to tensorboard testInterval: 1 # Run on test set every nTestInterval epochs. Keep at 0 to skip tests. saveModelInterval: 10 # Save the model checkpoints every N epochs
# Optimizer Params optimizer: "Adam" # Possible Values: ["SGD", "Adam"] optimAdam: learningRate: 5e-5 weightDecay: 0.0001 # Other values: 0.0001 optimSgd: learningRate: 1e-6 momentum: 0.9 weight_decay: 5e-4 lrScheduler: "StepLR" # Possible Values: ['', 'StepLR', 'ReduceLROnPlateau'] lrSchedulerStep: step_size: 1000 gamma: 0.1 lrSchedulerPlateau: factor: 0.8 patience: 25 verbose: True
# eval.py Config - Validation/Testing Inferenceeval: # Synthetic datasets with ground truth labels # Used as validation set datasetsSynthetic: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/flow' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/normal' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
# Datasets of real images, no labels available # Used as Test set datasetsReal:
# Params model: "simple_unet" # Possible values: ["drn", unet", "deeplab_xception", "deeplab_resnet", "refinenet", "simple_unet"] numClasses: 3 batchSize: 16 imgHeight: 512 imgWidth: 512 os: 8 numWorkers: 4 # Num of workers used in the dataloader pathWeightsFile: "/home/jiyu/ClearGrasp/pytorch_networks/flow2normal/logs-deeplab/exp-012/checkpoints/checkpoint-epoch-0500.pth" # Path to the checkpoint to be loaded resultsDir: "data/results/"
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576# RFTrans mask network training (binary semantic segmentation: transparent vs background)# 数据:unity/train/RGB + unity/train/mask(5000 张,512×512)# 架构:DeepLab + DRN backbone + cross_entropy2d,跟 occlusion_boundaries 一致# 目标:替换掉 ClearGrasp 2019 老 ckpt,看是否能改进 RFTrans pipeline 的最终 RMSEtrain: # 训练集 datasetsTrain: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/mask'
# 验证集(10% 切出) datasetsVal: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
# 不用 matterport / scannet / 真实集 datasetsMatterportTrain: datasetsMatterportVal: datasetsScannetTrain: datasetsScannetVal: datasetsTestReal: datasetsTestSynthetic: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
# 训练超参(与 occlusion_boundaries 默认对齐) model: "drn" batchSize: 32 batchSizeMatterport: 0 batchSizeScannet: 0 validationBatchSize: 8 testBatchSize: 8 numEpochs: 200 # mask 任务相对简单,200 epoch 够 imgHeight: 256 imgWidth: 256 numClasses: 2 # binary: bg(0) / transparent(1) numInputChannels: 3 numWorkers: 8 logsDir: "logs-deeplab" lossFunc: "ce" # cross-entropy 2d,模型用 deeplab/drn 时 train.py 走 utils.cross_entropy2d percentageDataForTraining: 1.0 percentageDataForMatterportTraining: 0.5 percentageDataForScannetTraining: 0.35 percentageDataForValidation: 1.0 percentageDataForMatterportVal: 0.5 percentageDataForScannettVal: 0.5
outputStride: 8 epochSize: 1
continueTraining: False pathPrevCheckpoint: "" initOptimizerFromCheckpoint: False loadEpochNumberFromCheckpoint: False
saveImageInterval: 5 saveImageIntervalIter: 200 testInterval: 1 saveModelInterval: 5
optimizer: "Adam" optimAdam: learningRate: 0.0001 weightDecay: 0 optimSgd: learningRate: 1.0e-6 momentum: 0.9 weight_decay: 5.0e-4 lrScheduler: "StepLR" lrSchedulerStep: step_size: 20 gamma: 0.95 lrSchedulerPlateau: factor: 0.8 patience: 25 verbose: True123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130# train.py Config - Trainingtrain: # For datasets, please pass atleast 1 value. If no datasets exist, pass "" as path for images. # Synthetic datasets with ground truth labels datasetsTrain: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/boundary'
# Synthetic datasets with ground truth labels - 10% split of train datasetsVal: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/boundary'
datasetsMatterportTrain: # - images: 'data/datasets/matterport3d/train/matterport_rgb/v1/scans' # labels: 'data/datasets/matterport3d/train/matterport_render_normal' datasetsMatterportVal: # - images: 'data/datasets/matterport3d/val/matterport_rgb/v1/scans' # labels: 'data/datasets/matterport3d/val/matterport_render_normal' datasetsScannetTrain: # - images: 'data/datasets/scannet/scannet-rgb/scans/train' # labels: 'data/datasets/scannet/scannet_render_normal/train' datasetsScannetVal: # - images: 'data/datasets/scannet/scannet-rgb/scans/val' # labels: 'data/datasets/scannet/scannet_render_normal/val'
# Real Images (no ground truth labels) datasetsTestReal: # - images: 'data/datasets/test/camera-pics/resized-files/preprocessed-rgb-imgs' # labels: '' # - images: 'data/datasets/test/realsense-captures/resized-files/preprocessed-rgb-imgs' # labels: '' # - images: 'data/datasets/test/realsense-demo-table-2/source-files/rgb-imgs' # labels: '' # - images: 'data/datasets/test/realsense-demo-table-3/source-files/rgb-imgs' # labels: ''
# Synthetic datasets with ground truth labels - Used as test set datasetsTestSynthetic: - images: 'data/data/datasets/test-synthetic/scoop-val/source-files/rgb-imgs' labels: 'data/data/datasets/test-synthetic/scoop-val/source-files/outlines'
# Training/Validation Params model: "drn" # Possible values: ['deeplab_xception', 'deeplab_resnet', 'drn'] batchSize: 64 batchSizeMatterport: 0 batchSizeScannet: 0 validationBatchSize: 8 testBatchSize: 8 numEpochs: 200 imgHeight: 256 imgWidth: 256 numClasses: 3 numInputChannels: 3 # Num of channels in input image. RGB = 3 channels, Grayscale = 1 channel. numWorkers: 8 # Num of workers used in the dataloader logsDir: "logs-deeplab-side" # Directory where logs of each exp will be saved. lossFunc: "cosine" # Possible values: ['cosine', 'radians'] percentageDataForTraining: 1.0 # The percentage of images in dataset to be used for training. percentageDataForMatterportTraining: 0.5 # The percentage of images in dataset to be used for training. percentageDataForScannetTraining: 0.35 percentageDataForValidation: 1.0 percentageDataForMatterportVal: 0.5 percentageDataForScannettVal: 0.5
# Deeplab specific outputStride: 8 # Possible values: [8, 16]. Output stride for deeplabv3 model. Smaller values give finer details in output mask. epochSize: 1 # After these many epochs, change learning rate
continueTraining: True # If true, continue training from a checkpoint pathPrevCheckpoint: "/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/cleargrasp_orig/cleargrasp-checkpoints/outlines/checkpoint_outlines.pth" # Path to .pth checkpoint file to load to continue training from initOptimizerFromCheckpoint: False # Re-Initialize optimizer's state from checkpoint. NOTE: when this is enabled, value of learningRate will be overridden with value from checkpoint. loadEpochNumberFromCheckpoint: False # If true, the epoch/iter numbering will start from the checkpoint's last epoch num.
saveImageInterval: 1 # Log output images to tensorboard every saveImageInterval epochs saveImageIntervalIter: 100 # Every N iterations, log output images to tensorboard testInterval: 1 # Run on test set every nTestInterval epochs. Keep at 0 to skip tests. saveModelInterval: 5 # Save the model checkpoints every N epochs
# Optimizer Params optimAdam: learningRate: 0.0001 weightDecay: 0 # Other values: 0.0001 optimSgd: learningRate: 1e-7 momentum: 0.9 weight_decay: 5e-4 lrScheduler: "StepLR" # Possible Values: ['', 'StepLR', 'ReduceLROnPlateau'] lrSchedulerStep: step_size: 7 gamma: 0.1 lrSchedulerPlateau: factor: 0.8 patience: 25 verbose: True
# eval.py Config - Validation/Testing Inferenceeval: # Synthetic datasets with ground truth labels # Used as validation set datasetsSynthetic: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train_rgmask/RGB' labels: ''
# Datasets of real images, no labels available # Used as Test set datasetsReal: # - images: "datasets-transparent/studio_pics_sorted/selected_test/d415" # labels: "datasets-transparent/studio_pics_sorted/selected_test/d415" # - images: "datasets-transparent/studio_pics_sorted/selected_test/d435" # labels: "datasets-transparent/studio_pics_sorted/selected_test/d435" # - images: "datasets-transparent/studio_pics_sorted/selected_val/d435" # labels: "datasets-transparent/studio_pics_sorted/selected_val/d435"
datasetsMatterport: # - images: 'data/datasets/matterport3d/train/matterport_rgb/v1/scans' # labels: 'data/datasets/matterport3d/train/matterport_render_normal'
# Params model: "drn" # Possible values: ['deeplab_xception', 'deeplab_resnet', 'drn'] numClasses: 3 batchSize: 32 imgHeight: 256 imgWidth: 256 os: 8 numWorkers: 4 # Num of workers used in the dataloader pathWeightsFile: "/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/cleargrasp_orig/cleargrasp-checkpoints/outlines/checkpoint_outlines.pth" # Path to the checkpoint to be loaded resultsDir: "data/results"
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100# train.py Config - Trainingtrain: # For datasets, please pass atleast 1 value. If no datasets exist, pass "" as path for images. # Synthetic datasets with ground truth labels datasetsTrain: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/flow' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/train/mask'
# Synthetic datasets with ground truth labels - 10% split of train datasetsVal: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/flow' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
# Real Images (no ground truth labels) datasetsTestReal:
# Synthetic datasets with ground truth labels - Used as test set datasetsTestSynthetic:
# Training/Validation Params model: "drn" # Possible values: ['deeplab_xception', 'deeplab_resnet', 'drn'] batchSize: 24 batchSizeMatterport: 0 batchSizeScannet: 0 validationBatchSize: 64 testBatchSize: 16 numEpochs: 501 imgHeight: 512 imgWidth: 512 numClasses: 2 numInputChannels: 3 # Num of channels in input image. RGB = 3 channels, Grayscale = 1 channel. numWorkers: 4 # Num of workers used in the dataloader logsDir: "logs-deeplab" # Directory where logs of each exp will be saved. #lossFunc: "cosine" # Possible values: ['cosine', 'radians'] percentageDataForTraining: 1.0 # The percentage of images in dataset to be used for training. percentageDataForMatterportTraining: 0.5 # The percentage of images in dataset to be used for training. percentageDataForScannetTraining: 0.35 percentageDataForValidation: 1.0 percentageDataForMatterportVal: 0.5 percentageDataForScannettVal: 0.5
# Deeplab specific outputStride: 8 # Possible values: [8, 16]. Output stride for deeplabv3 model. Smaller values give finer details in output mask. epochSize: 1 # After these many epochs, change learning rate
continueTraining: False # If true, continue training from a checkpoint pathPrevCheckpoint: "" # Path to .pth checkpoint file to load to continue training from initOptimizerFromCheckpoint: False # Re-Initialize optimizer's state from checkpoint. NOTE: when this is enabled, value of learningRate will be overridden with value from checkpoint. loadEpochNumberFromCheckpoint: True # If true, the epoch/iter numbering will start from the checkpoint's last epoch num.
saveImageInterval: 1 # Log output images to tensorboard every saveImageInterval epochs saveImageIntervalIter: 1000 # Every N iterations, log output images to tensorboard testInterval: 10 # Run on test set every nTestInterval epochs. Keep at 0 to skip tests. saveModelInterval: 10 # Save the model checkpoints every N epochs
# Optimizer Params optimizer: "Adam" # Possible Values: ["SGD", "Adam"] optimAdam: learningRate: 5e-5 # Origin value: 0.0001 weightDecay: 0 # Other values: 0.0001 optimSgd: learningRate: 1e-6 momentum: 0.9 weight_decay: 5e-4 lrScheduler: "StepLR" # Possible Values: ['', 'StepLR', 'ReduceLROnPlateau'] lrSchedulerStep: step_size: 1000 gamma: 0.1 lrSchedulerPlateau: factor: 0.8 patience: 25 verbose: True
# eval.py Config - Validation/Testing Inferenceeval: # Synthetic datasets with ground truth labels # Used as validation set datasetsSynthetic: - images: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/RGB' labels: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/flow' masks: '/data1/liulingfeng/cooperation/ghy/RFTrans-repro/data/unity/valid/mask'
# Datasets of real images, no labels available # Used as Test set datasetsReal:
# Params model: "drn" # Possible values: ['deeplab_xception', 'deeplab_resnet', 'drn'] numClasses: 2 batchSize: 64 imgHeight: 512 imgWidth: 512 os: 8 numWorkers: 4 # Num of workers used in the dataloader pathWeightsFile: "/home/jiyu/ClearGrasp/pytorch_networks/refractive_flow/logs-deeplab/exp-033/checkpoints/checkpoint-epoch-0500.pth" # Path to the checkpoint to be loaded resultsDir: "data/results"
README.md+148-2
progressivedepth/ckpts/C_stage2_epoch029.pthAdded+3
progressivedepth/ckpts/C_stage3_epoch029.pthAdded+3
progressivedepth/ckpts/lidf_stage1_epoch059.pthAdded+3
progressivedepth/configs/pipeline_config.yamlAdded+54
progressivedepth/configs/train_progressive_stage2.yamlAdded+133
progressivedepth/configs/train_progressive_stage3.yamlAdded+132
rftrans/ckpts/f2net_flow2normal_epoch500.pthAdded+3
rftrans/ckpts/mask_adam_epoch195.pthAdded+3
rftrans/ckpts/outlines_side_adam_epoch195.pthAdded+3
rftrans/ckpts/rfnet_refractive_flow_epoch500.pthAdded+3
rftrans/configs/exp017_paperfaithful.yamlAdded+109
rftrans/configs/flow2normal_config.yamlAdded+120
rftrans/configs/mask_adam_config.yamlAdded+76
rftrans/configs/outlines_side_adam_config.yamlAdded+130
rftrans/configs/refractive_flow_config.yamlAdded+100