Open chenqiyf opened 1 year ago
Maybe there is something wrong with the format of your data processing.
We have supported the MatrixCity Dataset in the latest release.
You could refer to its data format.
After preparing the dataset and start the trainning process, I encountered some error. Pls have a look what could be the problem and how can I fix it.
(landmark) C:\ProgramData\anaconda3\envs\landmark>python app/trainer.py --config confs/city.txt Training with a single process on 1 GPUs. using data from ['west'] Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\landmark\app\trainer.py", line 569, in train(init_args) File "C:\ProgramData\anaconda3\envs\landmark\app\trainer.py", line 43, in train train_dataset, test_dataset = prep_dataset(enable_lpips, args) File "C:\ProgramData\anaconda3\envs\landmark\app\tools\train_utils.py", line 153, in prep_dataset train_dataset = dataset( File "C:\ProgramData\anaconda3\envs\landmark\app\tools\dataloader\city_dataset.py", line 30, in init self.read_meta() File "C:\ProgramData\anaconda3\envs\landmark\app\tools\dataloader\city_dataset.py", line 36, in read_meta meta = load_json_drone_data( File "C:\ProgramData\anaconda3\envs\landmark\app\tools\dataloader\ray_utils.py", line 109, in load_json_drone_data poses = np.stack([np.array(frame["transform_matrix"]) for i, frame in enumerate(meta["frames"])]) File "<array_function internals>", line 200, in stack File "C:\ProgramData\anaconda3\envs\landmark\lib\site-packages\numpy\core\shape_base.py", line 460, in stack raise ValueError('need at least one array to stack') ValueError: need at least one array to stack
The config.txt as follows:
dataroot = datasets datadir = images_1 dataset_name = city expname = west_x5 subfolder = [west] ndim = 1
lb = [-2.4,-2.4,-0.05] ub = [2.4,2.4,0.55]
shrink = 1 add_nerf = 10000
basedir = ./log
train_near_far = [1e-1, 4] render_near_far = [2e-1, 4] downsample_train = 5
n_iters = 50000 batch_size = 4096 render_batch_size = 8192
N_voxel_init = 2097156 # 1283 N_voxel_final = 1073741824 # 10243
upsamp_list = [2000,3000,4000,5500,7000] update_AlphaMask_list = [2000,4000]
N_vis = 5 # vis all testing images vis_every = 5000
n_lamb_sigma = [16,16,16] n_lamb_sh = [48,48,48]
fea2denseAct = softplus
view_pe = 2 fea_pe = 2
L1_weight_inital = 8e-5 L1_weight_rest = 4e-5 rm_weight_mask_thre = 1e-4
TV_weight_density = 0.1 TV_weight_app = 0.01
compute_extra_metrics = 1 run_nerf = 0 bias_enable = 1 white_bkgd = 1 sampling_opt = 0
The datasets that i have prepared as follows
C:\ProgramData\anaconda3\envs\landmark\datasets\images_1 的目录
2023/09/06 17:16
. 2023/09/06 17:13 .. 2023/09/06 16:22 5,071 colmapproject0906.ini 2023/09/06 16:22 497,762,304 database.db 2023/09/06 17:12 images 2023/09/06 14:51 667 run-colmap-geometric.sh 2023/09/06 14:51 670 run-colmap-photometric.sh 2023/09/06 17:12 sparse 2023/09/06 17:12 stereo 2023/09/06 17:16 6,065 transforms_test.json 2023/09/06 17:16 6,065 transforms_train.json 6 个文件 497,780,842 字节
have you solved it?I meet the same problem
I have solved it! We just need to check the config such as city.txt, the subfolder should be changed. The wrong subfolder will make the meta is null which results in this error!
I have solved it! We just need to check the config such as city.txt, the subfolder should be changed. The wrong subfolder will make the meta is null which results in this error!
@Codey-Chang Could you explain more?which subfolde?
I have solved it! We just need to check the config such as city.txt, the subfolder should be changed. The wrong subfolder will make the meta is null which results in this error!
@Codey-Chang Could you explain more?which subfolde?
subfolder = [west] this maybe wrong
just setting subfolder=[] solved this problem.
After preparing the dataset and start the trainning process, I encountered some error. Pls have a look what could be the problem and how can I fix it.
(landmark) C:\ProgramData\anaconda3\envs\landmark>python app/trainer.py --config confs/city.txt Training with a single process on 1 GPUs. using data from ['west'] Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\landmark\app\trainer.py", line 569, in
train(init_args)
File "C:\ProgramData\anaconda3\envs\landmark\app\trainer.py", line 43, in train
train_dataset, test_dataset = prep_dataset(enable_lpips, args)
File "C:\ProgramData\anaconda3\envs\landmark\app\tools\train_utils.py", line 153, in prep_dataset
train_dataset = dataset(
File "C:\ProgramData\anaconda3\envs\landmark\app\tools\dataloader\city_dataset.py", line 30, in init
self.read_meta()
File "C:\ProgramData\anaconda3\envs\landmark\app\tools\dataloader\city_dataset.py", line 36, in read_meta
meta = load_json_drone_data(
File "C:\ProgramData\anaconda3\envs\landmark\app\tools\dataloader\ray_utils.py", line 109, in load_json_drone_data
poses = np.stack([np.array(frame["transform_matrix"]) for i, frame in enumerate(meta["frames"])])
File "<__array_function__ internals>", line 200, in stack
File "C:\ProgramData\anaconda3\envs\landmark\lib\site-packages\numpy\core\shape_base.py", line 460, in stack
raise ValueError('need at least one array to stack')
ValueError: need at least one array to stack
The config.txt as follows:
dataroot = datasets datadir = images_1 dataset_name = city expname = west_x5 subfolder = [west] ndim = 1
lb = [-2.4,-2.4,-0.05] ub = [2.4,2.4,0.55]
shrink = 1
add_nerf = 10000
basedir = ./log
train_near_far = [1e-1, 4] render_near_far = [2e-1, 4] downsample_train = 5
n_iters = 50000 batch_size = 4096 render_batch_size = 8192
N_voxel_init = 2097156 # 1283 N_voxel_final = 1073741824 # 10243
upsamp_list = [2000,3000,4000,5500,7000] update_AlphaMask_list = [2000,4000]
N_vis = 5 # vis all testing images vis_every = 5000
n_lamb_sigma = [16,16,16] n_lamb_sh = [48,48,48]
fea2denseAct = softplus
view_pe = 2 fea_pe = 2
L1_weight_inital = 8e-5 L1_weight_rest = 4e-5 rm_weight_mask_thre = 1e-4
TV_weight_density = 0.1 TV_weight_app = 0.01
compute_extra_metrics = 1 run_nerf = 0 bias_enable = 1 white_bkgd = 1 sampling_opt = 0
The datasets that i have prepared as follows
C:\ProgramData\anaconda3\envs\landmark\datasets\images_1 的目录
2023/09/06 17:16