Skip to content

Commit

Permalink
update ZJU-MoCap finetuning
Browse files Browse the repository at this point in the history
  • Loading branch information
haotongl committed Jan 7, 2023
1 parent efa01c0 commit 9f3dee6
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ python train_net.py --cfg_file configs/enerf/dtu/scan114.yaml

Fine-tuning for 3000 and 11000 iterations takes about 11 minutes and 40 minutes, respectively, on our test machine ( i9-12900K CPU, RTX 3090 GPU).

### Fine-tuning on the ZJU-MoCap dataset

```
python train_net.py --cfg_file configs/enerf/zjumocap/zjumocap_train.yaml
```


## Evaluation

Expand Down
3 changes: 3 additions & 0 deletions configs/enerf/llff/flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ test_dataset:
scene: flower
train:
epoch: 147 # pretrained epoch + 8
sampler_meta:
input_views_num: [3, 4]
input_views_prob: [0.4, 0.6]
save_ep: 1
eval_ep: 1
3 changes: 3 additions & 0 deletions configs/enerf/llff/fortress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ test_dataset:
scene: fortress
train:
epoch: 147 # pretrained epoch + 8
sampler_meta:
input_views_num: [3, 4]
input_views_prob: [0.4, 0.6]
save_ep: 1
eval_ep: 1
56 changes: 56 additions & 0 deletions configs/enerf/zjumocap/zjumocap_train.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
parent_cfg: 'configs/enerf/dtu_pretrain.yaml'
exp_name: zjumocap
pretrain: dtu_pretrain

train_dataset_module: lib.datasets.zjumocap.enerf
test_dataset_module: lib.datasets.zjumocap.enerf
network_module: lib.networks.enerf.network_human
evaluator_module: lib.evaluators.enerf_human

enerf:
sample_on_mask: True
train_input_views: [2, 3]
train_input_views_prob: [0.9, 0.1]
test_input_views: 2
cas_config:
train_img: [False, False]
patch_size: [-1, 64] #
num_rays: [4096, 16384] #
num_patchs: [0, 4] #
volume_planes: [32, 8]
render_if: [True, True]

train_dataset:
data_root: 'zju_mocap'
scene: 'CoreView_313'
split: train
frames: [0, 600, 1]
input_views: [0, -1, 2]
render_views: [0, -1, 2]
input_ratio: 0.5

test_dataset:
data_root: 'zju_mocap'
scene: 'CoreView_313'
split: test
frames: [0, 600, 100]
input_views: [0, -1, 2]
render_views: [1, -1, 2]
input_ratio: 0.5

train:
batch_size: 1
lr: 5e-4
epoch: 100
scheduler:
type: 'exponential'
gamma: 0.5
decay_epochs: 10
sampler_meta:
input_views_num: [2, 3]
input_views_prob: [0.9, 0.1]

eval_ep: 1



2 changes: 1 addition & 1 deletion lib/utils/net_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def save_trained_config(cfg):
yaml.dump(cfg, open(train_config_path, 'w'))

def load_pretrain(net, model_dir):
model_dir = os.path.join('data/trained_model', cfg.task, model_dir)
model_dir = os.path.join(cfg.workspace, 'trained_model', cfg.task, model_dir)
if not os.path.exists(model_dir):
return 1

Expand Down

0 comments on commit 9f3dee6

Please sign in to comment.