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

自制的KITTI数据集训练闪退问题 #84

Open
18845108835 opened this issue Jul 17, 2023 · 3 comments
Open

自制的KITTI数据集训练闪退问题 #84

18845108835 opened this issue Jul 17, 2023 · 3 comments

Comments

@18845108835
Copy link

作者您好,我在ue4中自制了KITTI数据集(照片像素为(1242,375,3)),但是在训练的时候在train.py文件的 for iter_num, data in enumerate(dataloader_train):闪退,但是换成kitti3D数据集,便可以正常运行,想请教您一下是什么原因?

@Owen-Liuyuxuan
Copy link
Owner

请补充一下错误信息。特别是尝试把number_works设置为0之后,单线程采集数据收集更干净的错误信息。

@18845108835
Copy link
Author

谢谢您的建议,昨天经过核实后,发现是自制数据集的问题,P2的最后一个数多了一个空格,已经解决闪退的问题啦,再次感谢您的建议~~~
现在出现了新的问题,描述如下,麻烦您啦:
Backend TkAgg is interactive backend. Turning interactive mode on.
clean up the recorder directory of C:\Users\FangGZ\Desktop\yolo3D_first\workdirs\Stereo3D\log\firstconfig=config/Stereo3D.py
-1
number of trained parameters of the model: 107466592
Found evaluate function evaluate_kitti_obj
Num training images: 2969
PSM Cos Volume takes 0.009999275207519531 seconds at call time 1
PSM Cos Volume takes 0.011998891830444336 seconds at call time 2
PSM Cos Volume takes 0.004999637603759766 seconds at call time 3
Cost Volume takes 0.006999969482421875 seconds at call time 1
PSM Cos Volume takes 0.012000083923339844 seconds at call time 4
PSM Cos Volume takes 0.006999969482421875 seconds at call time 5
Cost Volume takes 0.008991718292236328 seconds at call time 2
PSM Cos Volume takes 0.010965347290039062 seconds at call time 6
PSM Cos Volume takes 0.005000114440917969 seconds at call time 7
Cost Volume takes 0.004999876022338867 seconds at call time 3
PSM Cos Volume takes 0.015001296997070312 seconds at call time 8
PSM Cos Volume takes 0.007007122039794922 seconds at call time 9
Cost Volume takes 0.007995367050170898 seconds at call time 4
PSM Cos Volume takes 0.01299905776977539 seconds at call time 10
PSM Cos Volume takes 0.007002115249633789 seconds at call time 11
Cost Volume takes 0.010006427764892578 seconds at call time 5
PSM Cos Volume takes 0.011986494064331055 seconds at call time 12
PSM Cos Volume takes 0.008991479873657227 seconds at call time 13
Cost Volume takes 0.009996414184570312 seconds at call time 6
PSM Cos Volume takes 0.01297307014465332 seconds at call time 14
PSM Cos Volume takes 0.006989955902099609 seconds at call time 15
Cost Volume takes 0.00999903678894043 seconds at call time 7
PSM Cos Volume takes 0.013988256454467773 seconds at call time 16
PSM Cos Volume takes 0.007997989654541016 seconds at call time 17
Cost Volume takes 0.007001399993896484 seconds at call time 8
PSM Cos Volume takes 0.011969327926635742 seconds at call time 18
PSM Cos Volume takes 0.006997585296630859 seconds at call time 19
Cost Volume takes 0.009976387023925781 seconds at call time 9
/**** start testing after training epoch 9 ******/
clean up the recorder directory of C:\Users\FangGZ\Desktop\yolo3D_first\workdirs\Stereo3D\output\validation\data
rebuild C:\Users\FangGZ\Desktop\yolo3D_first\workdirs\Stereo3D\output\validation\data
0%| | 0/31 [00:00<?, ?it/s]C:\Users\FangGZ\Desktop\yolo3D_first\data\stereo_dataset.py:166: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\utils\tensor_new.cpp:248.)
return torch.from_numpy(left_images).float(), torch.from_numpy(right_images).float(), torch.tensor(
C:\Users\FangGZ\Desktop\yolo3D_first\networks\pipelines\testers.py:39: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
scores, bbox, obj_index = module([left_images.cuda().float().contiguous(), right_images.cuda().float().contiguous(), torch.tensor(P2).cuda().float(), torch.tensor(P3).cuda().float()])
C:\Users\FangGZ\Desktop\yolo3D_first\networks\lib\PSM_cost_volume.py:82: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
cost = Variable(
C:\Users\FangGZ\Desktop\yolo3D_first\networks\lib\PSM_cost_volume.py:49: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
cost = Variable(
100%|██████████| 31/31 [00:06<00:00, 4.47it/s]
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "", line 1, in
File "C:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:\Users\FangGZ\Desktop\yolo3D_first\train.py", line 190, in
main()
File "C:\Users\FangGZ\Desktop\yolo3D_first\train.py", line 180, in main
evaluate_detection(cfg, detector.module if is_distributed else detector, dataset_val, writer, epoch_num)
File "C:\Users\FangGZ\anaconda3\envs\pytorch\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\FangGZ\Desktop\yolo3D_first\networks\pipelines\evaluators.py", line 89, in evaluate_kitti_obj
result_texts = evaluate(
File "C:\Users\FangGZ\Desktop\yolo3D_first\evaluator\kitti\evaluate.py", line 23, in evaluate
result_texts.append(get_official_eval_result(gt_annos, dt_annos, current_class))
File "C:\Users\FangGZ\Desktop\yolo3D_first\evaluator\kitti\eval.py", line 759, in get_official_eval_result
metrics = do_eval_v3(
File "C:\Users\FangGZ\Desktop\yolo3D_first\evaluator\kitti\eval.py", line 662, in do_eval_v3
ret = eval_class(
File "C:\Users\FangGZ\Desktop\yolo3D_first\evaluator\kitti\eval.py", line 505, in eval_class
rets = calculate_iou_partly(
File "C:\Users\FangGZ\Desktop\yolo3D_first\evaluator\kitti\eval.py", line 387, in calculate_iou_partly
gt_boxes = np.concatenate([a["bbox"] for a in gt_annos_part], 0)
File "<array_function internals>", line 180, in concatenate
ValueError: need at least one array to concatenate

@18845108835
Copy link
Author

感觉评估函数出了一些问题,正在改动,不知道您有什么建议嘞,期待您的回复>.<

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