Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于小数据集训练 #9

Open
aggestsfw opened this issue Apr 7, 2022 · 4 comments
Open

关于小数据集训练 #9

aggestsfw opened this issue Apr 7, 2022 · 4 comments

Comments

@aggestsfw
Copy link

aggestsfw commented Apr 7, 2022

感谢大佬分享这个很棒的工作,我用自己采集的数据,大约400张,用lidar做真值的,用blendedmvs_finetune.sh这个脚本去从头开始训练,大约30个epoch,可以收敛,但是预测不出来结果或者只有很少的点。
然后从BlendedMVS数据集中抽了其中一个场景来做同样的实验,也是预测不出来结果。
如果用整个BlendedMVS数据集来从头开始训练,不加载预训练模型,预测结果是正常的。
初始学习率设的是0.001。
DTU数据集部分的代码我也看了,就是同一个视角拍了七张不同打光的照片,其他基本上跟BlendedMVS数据集是一样的。
百思不得其解,想请教下大佬为什么小数据集训练会有问题?

@prstrive
Copy link
Owner

prstrive commented Apr 8, 2022

你的深度图是正常的吗?训练的时候深度图正常,测试不正常或者如果深度图是正常的,融合的点云是错误的可能是相机参数的问题(相机参数和图像尺寸不匹配也可能),或者点云是正常的但非常稀疏那可能是点云过滤阈值过大,比如光度一致性和几何一致性。

@aggestsfw
Copy link
Author

aggestsfw commented Apr 8, 2022

你的深度图是正常的吗?训练的时候深度图正常,测试不正常或者如果深度图是正常的,融合的点云是错误的可能是相机参数的问题(相机参数和图像尺寸不匹配也可能),或者点云是正常的但非常稀疏那可能是点云过滤阈值过大,比如光度一致性和几何一致性。

谢谢你的答复,这是我刚刚跑的,用的是BlendedMVS里,BlendedMVS/dataset_low_res/58cf4771d0f5fb221defe6da这个场景,只有64张照片,训练一开始Th2、Th4、Th8输出都是0,预测出来没有点云

双gpu,batchsize=1
输出是这样的:

Epoch 0/16: 100% 32/32 || Elapsed Time: 0:01:02,Time: 0:01:02,LR: 0.001,Loss: 0.223|0.414,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.253|0.248,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 1/16: 100% 32/32 || Elapsed Time: 0:00:44,Time: 0:00:44,LR: 0.001,Loss: 0.282|0.242,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.297|0.286,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 2/16: 100% 32/32 || Elapsed Time: 0:00:42,Time: 0:00:42,LR: 0.001,Loss: 0.335|0.324,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:08,Time: 0:00:08,Loss: 0.362|0.349,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 3/16: 15% 05/32 || Elapsed Time: 0:00:09,ETA: 0:00:51,LR: 0.001,Loss: 0.352|0.350,Th2Epoch 3/16: 18% 06/32 || Elapsed Time: 0:00:10,ETA: 0:00:47,LR: 0.001,Loss: 0.356|0.351,Th2Epoch 3/16: 21% 07/32 || Elapsed Time: 0:0EpEpoch 3/16: 100% 32/32 || Elapsed Time: 0:00:43,Time: 0:00:43,LR: 0.001,Loss: 0.340|0.353,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000,Loss: 0.350|0.352,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.345|0.351,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 4/16: 100% 32/32 || Elapsed Time: 0:00:43,Time: 0:00:43,LR: 0.001,Loss: 0.334|0.341,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.310|0.316,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 5/16: 100% 32/32 || Elapsed Time: 0:00:42,Time: 0:00:42,LR: 0.001,Loss: 0.304|0.321,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:08,Time: 0:00:08,Loss: 0.302|0.310,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 6/16: 100% 32/32 || Elapsed Time: 0:00:43,Time: 0:00:43,LR: 0.001,Loss: 0.289|0.302,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.287|0.294,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 7/16: 100% 32/32 || Elapsed Time: 0:00:43,Time: 0:00:43,LR: 0.001,Loss: 0.294|0.287,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.272|0.281,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 8/16: 100% 32/32 || Elapsed Time: 0:00:42,Time: 0:00:42,LR: 0.001,Loss: 0.295|0.280,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:08,Time: 0:00:08,Loss: 0.269|0.275,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 9/16: 100% 32/32 || Elapsed Time: 0:00:43,Time: 0:00:43,LR: 0.001,Loss: 0.271|0.275,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.265|0.275,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 10/16: 100% 32/32 || Elapsed Time: 0:00:43,Time: 0:00:43,LR: 0.0005,Loss: 0.267|0.272,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Val:100% 32/32 || Elapsed Time: 0:00:09,Time: 0:00:09,Loss: 0.263|0.272,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.000
Epoch 11/16: 43% 14/32 || Elapsed Time: 0:00:20,ETA: 0:00:26,LR: 0.0005,Loss: 0.260|0.270,Th2: 0.000|0.000,Th4: 0.000|0.000,Th8: 0.000|0.0

@prstrive
Copy link
Owner

可能你的dataset加载训练样本有问题

@aggestsfw
Copy link
Author

可能你的dataset加载训练样本有问题

谢谢,已经解决了,自己的数据是训练时间不够

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants