Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nianchen Deng
deeplightfield
Commits
6294701e
Commit
6294701e
authored
Jan 17, 2022
by
Nianchen Deng
Browse files
sync
parent
2824f796
Changes
399
Show whitespace changes
Inline
Side-by-side
configs/old/nnerf.py
View file @
6294701e
def
update_config
(
config
):
# Net parameters
config
.
net
=
'nnerf4'
config
.
n_pos_
encode
=
10
config
.
encode
_x
=
10
config
.
fc
.
update
({
'nf'
:
128
,
'n_layers'
:
4
...
...
configs/old/oracle.py
View file @
6294701e
def
update_config
(
config
):
# Net parameters
config
.
net
=
'oracle'
config
.
n_pos_
encode
=
0
config
.
encode
_x
=
0
config
.
fc
.
update
({
'nf'
:
256
,
'n_layers'
:
8
,
'act
ivation
'
:
'selu'
,
'act'
:
'selu'
,
})
config
.
sa
.
update
({
'sample_range'
:
(
0.4
,
6
),
...
...
configs/old/periph.py
View file @
6294701e
def
update_config
(
config
):
# Net parameters
config
.
net
=
'snerffast2'
config
.
n_pos_
encode
=
6
#config.
n_dir_
encode = 4
config
.
encode
_x
=
6
#config.encode
_d
= 4
config
.
fc
.
update
({
'nf'
:
256
,
'n_layers'
:
4
...
...
configs/old/periph_small_trans.py
View file @
6294701e
def
update_config
(
config
):
# Net parameters
config
.
net
=
'snerffast4'
config
.
n_pos_
encode
=
6
#config.
n_dir_
encode = 4
config
.
encode
_x
=
6
#config.encode
_d
= 4
config
.
fc
.
update
({
'nf'
:
256
,
'n_layers'
:
4
...
...
configs/old/snerffast_periph.py
View file @
6294701e
def
update_config
(
config
):
# Net parameters
config
.
net
=
'snerffast4'
config
.
n_pos_
encode
=
6
#config.
n_dir_
encode = 4
config
.
encode
_x
=
6
#config.encode
_d
= 4
config
.
fc
.
update
({
'nf'
:
128
,
'n_layers'
:
4
...
...
configs/old/snerffastx.py
View file @
6294701e
def
update_config
(
config
):
# Net parameters
config
.
net
=
'snerffastx4'
config
.
n_pos_
encode
=
6
#config.
n_dir_
encode = 4
config
.
encode
_x
=
6
#config.encode
_d
= 4
config
.
fc
.
update
({
'nf'
:
512
,
'n_layers'
:
8
...
...
configs/snfnew.py
→
configs/
old/
snfnew.py
View file @
6294701e
def
update_config
(
config
):
# Net parameters
config
.
net
=
'snerffastnew'
config
.
n_pos_
encode
=
6
#config.
n_dir_
encode = 4
config
.
encode
_x
=
6
#config.encode
_d
= 4
config
.
fc
.
update
({
'nf'
:
256
,
'n_layers'
:
8
...
...
configs/spherical_view_syn.py
→
configs/
old/
spherical_view_syn.py
View file @
6294701e
import
os
import
importlib
import
re
from
utils.constants
import
*
from
utils
import
color
from
nets.snerf_fast
import
SnerfFast
from
nets.snerf
import
Snerf
...
...
@@ -17,14 +16,14 @@ class SphericalViewSynConfig(object):
self
.
name
=
'default'
self
.
c
=
color
.
RGB
self
.
net
=
'nerf'
self
.
n_pos_
encode
=
10
self
.
n_dir_
encode
=
None
self
.
encode
_x
=
10
self
.
encode
_d
=
None
self
.
depth_ref
=
False
self
.
fc
=
{
'nf'
:
256
,
'n_layers'
:
8
,
'skips'
:
[],
'act
ivation
'
:
'relu'
'act'
:
'relu'
}
self
.
sa
=
{
'sample_range'
:
(
1
,
50
),
...
...
@@ -57,14 +56,14 @@ class SphericalViewSynConfig(object):
id
=
f
"
{
self
.
name
}
@
{
self
.
net
}
"
if
self
.
c
!=
color
.
RGB
:
id
+=
f
"-
{
color
.
to_str
(
self
.
c
)
}
"
id
+=
f
"_e
{
self
.
n_pos_
encode
}
"
if
self
.
n_dir_
encode
is
not
None
:
id
+=
f
"_ed
{
self
.
n_dir_
encode
}
"
id
+=
f
"_e
{
self
.
encode
_x
}
"
if
self
.
encode
_d
is
not
None
:
id
+=
f
"_ed
{
self
.
encode
_d
}
"
id
+=
f
"_fc
{
self
.
fc
[
'nf'
]
}
x
{
self
.
fc
[
'n_layers'
]
}
"
if
len
(
self
.
fc
[
'skips'
])
>
0
:
id
+=
"_^%s"
%
','
.
join
([
f
'
{
val
}
'
for
val
in
self
.
fc
[
'skips'
]])
if
self
.
fc
[
'act
ivation
'
]
!=
'relu'
:
id
+=
f
"_*
{
self
.
fc
[
'act
ivation
'
]
}
"
if
self
.
fc
[
'act'
]
!=
'relu'
:
id
+=
f
"_*
{
self
.
fc
[
'act'
]
}
"
id
+=
"_d{0:.2f}-{1:.2f}"
.
format
(
*
self
.
sa
[
'sample_range'
])
id
+=
f
"_s
{
self
.
sa
[
'n_samples'
]
}
"
if
self
.
nerf_coarse
is
not
None
:
...
...
@@ -107,15 +106,15 @@ class SphericalViewSynConfig(object):
self
.
fc
[
'skips'
]
=
[
int
(
str
)
for
str
in
seg
[
4
:].
split
(
','
)]
continue
if
seg
.
startswith
(
'*'
):
# Activation
self
.
fc
[
'act
ivation
'
]
=
seg
[
1
:]
self
.
fc
[
'act'
]
=
seg
[
1
:]
continue
if
seg
.
startswith
(
'ed'
):
# Encode direction
self
.
n_dir_
encode
=
int
(
seg
[
2
:])
if
self
.
n_dir_
encode
==
0
:
self
.
n_dir_
encode
=
None
self
.
encode
_d
=
int
(
seg
[
2
:])
if
self
.
encode
_d
==
0
:
self
.
encode
_d
=
None
continue
if
seg
.
startswith
(
'e'
):
# Encode
self
.
n_pos_
encode
=
int
(
seg
[
1
:])
self
.
encode
_x
=
int
(
seg
[
1
:])
continue
if
seg
.
startswith
(
'd'
):
# Depth range
try
:
...
...
@@ -158,10 +157,10 @@ class SphericalViewSynConfig(object):
def
print
(
self
):
print
(
'==== Config %s ===='
%
self
.
name
)
print
(
'Net type: '
,
self
.
net
)
print
(
'Encode dim: '
,
self
.
n_pos_
encode
)
print
(
'Encode dim: '
,
self
.
encode
_x
)
print
(
'Train with depth: '
,
self
.
depth_ref
)
print
(
'Support direction: '
,
False
if
self
.
n_dir_
encode
is
None
else
f
'encode to
{
self
.
n_dir_
encode
}
'
)
print
(
'Support direction: '
,
False
if
self
.
encode
_d
is
None
else
f
'encode to
{
self
.
encode
_d
}
'
)
print
(
'Full-connected network parameters:'
,
self
.
fc
)
print
(
'Sample parameters'
,
self
.
sa
)
if
self
.
nerf_coarse
:
...
...
@@ -183,51 +182,51 @@ class SphericalViewSynConfig(object):
})
coarse_net
=
Nerf
(
coarse_fc
,
coarse_sa
,
c
=
self
.
c
,
pos_encode
=
self
.
n_pos_
encode
,
dir_encode
=
self
.
n_dir_
encode
)
pos_encode
=
self
.
encode
_x
,
dir_encode
=
self
.
encode
_d
)
else
:
coarse_net
=
None
return
Nerf
(
f
c_params
=
self
.
fc
,
return
Nerf
(
c
ore
_params
=
self
.
fc
,
sampler_params
=
self
.
sa
,
fine_params
=
self
.
nerf_coarse
,
c
=
self
.
c
,
pos_encode
=
self
.
n_pos_
encode
,
dir_encode
=
self
.
n_dir_
encode
,
pos_encode
=
self
.
encode
_x
,
dir_encode
=
self
.
encode
_d
,
coarse_net
=
coarse_net
)
if
net
==
'bgnet'
:
return
BgNet
(
f
c_params
=
self
.
fc
,
encode
=
self
.
n_pos_
encode
,
return
BgNet
(
c
ore
_params
=
self
.
fc
,
encode
=
self
.
encode
_x
,
c
=
self
.
c
)
if
net
.
startswith
(
'oracle'
):
return
Oracle
(
f
c_params
=
self
.
fc
,
return
Oracle
(
c
ore
_params
=
self
.
fc
,
sampler_params
=
self
.
sa
,
pos_encode
=
self
.
n_pos_
encode
,
pos_encode
=
self
.
encode
_x
,
out_activation
=
self
.
net
[
6
:]
if
len
(
self
.
net
)
>
6
else
'sigmoid'
)
if
net
==
'dnerfa'
:
return
NerfDepth
(
f
c_params
=
self
.
fc
,
return
NerfDepth
(
c
ore
_params
=
self
.
fc
,
sampler_params
=
self
.
sa
,
c
=
self
.
c
,
pos_encode
=
self
.
n_pos_
encode
,
pos_encode
=
self
.
encode
_x
,
n_bins
=
multiple
or
128
,
include_neighbor_bins
=
False
)
if
net
==
'dnerf'
:
return
NerfDepth
(
f
c_params
=
self
.
fc
,
return
NerfDepth
(
c
ore
_params
=
self
.
fc
,
sampler_params
=
self
.
sa
,
c
=
self
.
c
,
pos_encode
=
self
.
n_pos_
encode
,
pos_encode
=
self
.
encode
_x
,
n_bins
=
multiple
or
128
)
if
net
==
'snerf'
:
return
Snerf
(
f
c_params
=
self
.
fc
,
return
Snerf
(
c
ore
_params
=
self
.
fc
,
sampler_params
=
self
.
sa
,
n_parts
=
multiple
or
1
,
c
=
self
.
c
,
pos_encode
=
self
.
n_pos_
encode
,
dir_encode
=
self
.
n_dir_
encode
)
pos_encode
=
self
.
encode
_x
,
dir_encode
=
self
.
encode
_d
)
if
net
==
'snerffast'
:
return
SnerfFast
(
f
c_params
=
self
.
fc
,
return
SnerfFast
(
c
ore
_params
=
self
.
fc
,
sampler_params
=
self
.
sa
,
n_parts
=
multiple
or
1
,
c
=
self
.
c
,
pos_encode
=
self
.
n_pos_
encode
,
dir_encode
=
self
.
n_dir_
encode
)
pos_encode
=
self
.
encode
_x
,
dir_encode
=
self
.
encode
_d
)
raise
ValueError
(
f
'Invalid net type:
{
net
}
-
{
multiple
}
'
)
configs/smnerf_voxels.json
0 → 100644
View file @
6294701e
{
"model"
:
"MNeRF"
,
"args"
:
{
"spherical"
:
true
,
"color"
:
"rgb"
,
"encode_x"
:
10
,
"encode_d"
:
4
,
"core_params"
:
[
{
"nf"
:
256
,
"n_layers"
:
2
},
{
"nf"
:
256
,
"n_layers"
:
2
},
{
"nf"
:
256
,
"n_layers"
:
4
}
],
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
32
},
"train"
:
{
"prune_epochs"
:
[
3
],
"split_epochs"
:
[
6
,
12
,
24
],
"frozen_epochs"
:
[
12
,
24
],
"checkpoint_interval"
:
3
,
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
}
}
\ No newline at end of file
configs/smnerfadv_voxels.json
0 → 100644
View file @
6294701e
{
"model"
:
"MNeRFAdvance"
,
"args"
:
{
"spherical"
:
true
,
"color"
:
"rgb"
,
"encode_x"
:
10
,
"encode_d"
:
4
,
"core_params"
:
[
{
"nf"
:
256
,
"n_layers"
:
2
},
{
"nf"
:
256
,
"n_layers"
:
2
},
{
"nf"
:
256
,
"n_layers"
:
4
}
],
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples_list"
:
[
16
,
32
,
64
]
},
"train"
:
{
"max_epochs"
:
30
,
"prune_epochs"
:
[
3
],
"split_epochs"
:
[
6
,
18
],
"checkpoint_interval"
:
3
,
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
}
}
\ No newline at end of file
configs/snerf_voxels
+ls
.json
→
configs/snerf
4
_voxels.json
View file @
6294701e
{
"model"
:
"
S
NeRF"
,
"model"
:
"NeRF"
,
"args"
:
{
"spherical"
:
true
,
"color"
:
"rgb"
,
"
n_pot_
encode"
:
10
,
"
n_dir_
encode"
:
4
,
"
f
c_params"
:
{
"nf"
:
256
,
"encode
_x
"
:
10
,
"encode
_d
"
:
4
,
"c
ore
_params"
:
{
"nf"
:
128
,
"n_layers"
:
8
,
"activation"
:
"relu"
,
"skips"
:
[
4
]
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
,
"perturb_sample"
:
true
,
"multi_nets"
:
4
},
"train"
:
{
"max_epochs"
:
50
,
"prune_epochs"
:
[
5
],
"split_epochs"
:
[
10
],
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
}
...
...
configs/snerf_fine_voxels.json
deleted
100644 → 0
View file @
2824f796
{
"model"
:
"SNeRF"
,
"args"
:
{
"color"
:
"rgb"
,
"n_pot_encode"
:
10
,
"n_dir_encode"
:
4
,
"fc_params"
:
{
"nf"
:
256
,
"n_layers"
:
8
,
"activation"
:
"relu"
,
"skips"
:
[
4
]
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
8
,
32
,
16
],
"n_samples"
:
16
,
"perturb_sample"
:
true
,
"raymarching_tolerance"
:
0
,
"raymarching_chunk_size"
:
-1
}
}
\ No newline at end of file
configs/snerf_voxels.json
View file @
6294701e
{
"model"
:
"
S
NeRF"
,
"model"
:
"NeRF"
,
"args"
:
{
"spherical"
:
true
,
"color"
:
"rgb"
,
"
n_pot_
encode"
:
10
,
"
n_dir_
encode"
:
4
,
"
f
c_params"
:
{
"encode
_x
"
:
10
,
"encode
_d
"
:
4
,
"c
ore
_params"
:
{
"nf"
:
256
,
"n_layers"
:
8
,
"activation"
:
"relu"
,
"skips"
:
[
4
]
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
,
"perturb_sample"
:
true
"n_samples"
:
16
},
"train"
:
{
"max_epochs"
:
50
,
"prune_epochs"
:
[
5
],
"split_epochs"
:
[
10
],
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
}
}
\ No newline at end of file
configs/snerf_voxels_128x8_x2.json
deleted
100644 → 0
View file @
2824f796
{
"model"
:
"SNeRF"
,
"args"
:
{
"color"
:
"rgb"
,
"n_pot_encode"
:
10
,
"n_dir_encode"
:
4
,
"fc_params"
:
{
"nf"
:
128
,
"n_layers"
:
8
,
"activation"
:
"relu"
,
"skips"
:
[
4
]
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
,
"perturb_sample"
:
true
,
"raymarching_tolerance"
:
0
,
"raymarching_chunk_size"
:
-1
,
"multi_nets"
:
2
}
}
\ No newline at end of file
configs/snerf_voxels_128x8_x4.json
deleted
100644 → 0
View file @
2824f796
{
"model"
:
"SNeRF"
,
"args"
:
{
"color"
:
"rgb"
,
"n_pot_encode"
:
10
,
"n_dir_encode"
:
4
,
"fc_params"
:
{
"nf"
:
128
,
"n_layers"
:
8
,
"activation"
:
"relu"
,
"skips"
:
[
4
]
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
,
"perturb_sample"
:
true
,
"raymarching_tolerance"
:
0
,
"raymarching_chunk_size"
:
-1
,
"multi_nets"
:
4
}
}
\ No newline at end of file
configs/snerf_voxels_feat.json
deleted
100644 → 0
View file @
2824f796
{
"model"
:
"SNeRF"
,
"args"
:
{
"color"
:
"rgb"
,
"n_pot_encode"
:
10
,
"n_dir_encode"
:
4
,
"fc_params"
:
{
"nf"
:
256
,
"n_layers"
:
8
,
"activation"
:
"relu"
,
"skips"
:
[
4
]
},
"n_featdim"
:
32
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
,
"perturb_sample"
:
true
,
"raymarching_tolerance"
:
0
,
"raymarching_chunk_size"
:
-1
}
}
\ No newline at end of file
configs/snerfadv_finevoxels_ls2.json
deleted
100644 → 0
View file @
2824f796
{
"model"
:
"SNeRFAdvance"
,
"args"
:
{
"color"
:
"rgb"
,
"n_pot_encode"
:
10
,
"n_dir_encode"
:
4
,
"density_net"
:
{
"nf"
:
256
,
"n_layers"
:
2
,
"act"
:
"relu"
,
"skips"
:
[]
},
"color_net"
:
{
"nf"
:
256
,
"n_layers"
:
3
,
"act"
:
"relu"
,
"skips"
:
[]
},
"specular_net"
:
{
"nf"
:
128
,
"n_layers"
:
1
,
"act"
:
"relu"
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
16
,
64
,
32
],
"n_samples"
:
64
,
"perturb_sample"
:
true
,
"raymarching_tolerance"
:
0
,
"raymarching_chunk_size"
:
-1
,
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
}
}
\ No newline at end of file
configs/snerfadv_voxels+ls+ns.json
deleted
100644 → 0
View file @
2824f796
{
"model"
:
"SNeRFAdvance"
,
"args"
:
{
"color"
:
"rgb"
,
"n_pot_encode"
:
10
,
"n_dir_encode"
:
4
,
"density_net"
:
{
"nf"
:
256
,
"n_layers"
:
4
,
"act"
:
"relu"
,
"skips"
:
[]
},
"color_net"
:
{
"nf"
:
256
,
"n_layers"
:
3
,
"act"
:
"relu"
,
"skips"
:
[]
},
"specular_net"
:
{
"nf"
:
128
,
"n_layers"
:
1
,
"act"
:
"relu"
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
,
"perturb_sample"
:
true
,
"appearance"
:
"newtype"
,
"density_color_connection"
:
true
,
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
,
"specular_regularization_weight"
:
1e-1
,
"specular_regularization_scale"
:
1e4
}
}
\ No newline at end of file
configs/snerfadv_voxels+ls6.json
deleted
100644 → 0
View file @
2824f796
{
"model"
:
"SNeRFAdvance"
,
"args"
:
{
"color"
:
"rgb"
,
"n_pot_encode"
:
10
,
"n_dir_encode"
:
4
,
"density_net"
:
{
"nf"
:
512
,
"n_layers"
:
4
,
"act"
:
"relu"
,
"skips"
:
[]
},
"color_net"
:
{
"nf"
:
512
,
"n_layers"
:
3
,
"act"
:
"relu"
,
"skips"
:
[]
},
"specular_net"
:
{
"nf"
:
256
,
"n_layers"
:
1
,
"act"
:
"relu"
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
,
"perturb_sample"
:
true
,
"appearance"
:
"combined"
,
"density_color_connection"
:
true
,
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
}
}
\ No newline at end of file
configs/snerfadv_voxels.json
0 → 100644
View file @
6294701e
{
"model"
:
"NeRF"
,
"args"
:
{
"spherical"
:
true
,
"color"
:
"rgb"
,
"encode_x"
:
10
,
"encode_d"
:
4
,
"core"
:
"nerfadv"
,
"core_params"
:
{
"density_net"
:
{
"nf"
:
256
,
"n_layers"
:
4
},
"color_net"
:
{
"nf"
:
256
,
"n_layers"
:
3
},
"specular_net"
:
{
"nf"
:
128
,
"n_layers"
:
1
},
"appearance"
:
"combined"
},
"n_featdim"
:
0
,
"space"
:
"voxels"
,
"steps"
:
[
4
,
16
,
8
],
"n_samples"
:
16
},
"train"
:
{
"max_epochs"
:
50
,
"prune_epochs"
:
[
5
],
"split_epochs"
:
[
10
],
"density_regularization_weight"
:
1e-4
,
"density_regularization_scale"
:
1e4
}
}
\ No newline at end of file
Prev
1
2
3
4
5
6
7
8
…
20
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment