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

关于更换数据的问题 #86

Closed
micki-37 opened this issue Jul 15, 2022 · 7 comments
Closed

关于更换数据的问题 #86

micki-37 opened this issue Jul 15, 2022 · 7 comments

Comments

@micki-37
Copy link

王博,您好!
您的工作对我的帮助很大,非常感谢您提供的开源项目。现在我想使用自己的数据在您的模型上训练,之前的一些issue里您只提到了应该如何处理和组织自己的数据,但并没有提及如果要使用自己的数据,应该修改哪些部分的代码。因为之前在lm数据集上训练时需要先生成一些文件,所以我猜测如果要将模型应用在自己的数据上,可能需要修改的地方有很多,可以请您具体讲讲吗?
期待您的回复,再次致谢!

@wangg12
Copy link
Member

wangg12 commented Jul 17, 2022

建议你研究下我们代码的datasets里面不同的数据集是怎么从硬盘读成一个通用数据结构的,仿照着也就能换其他数据了

@micki-37
Copy link
Author

micki-37 commented Aug 5, 2022

王博您好,非常感谢您上次提出的建议,我研究了一下,您原始代码给出的训练数据有两部分组成,一部分是从lm/test中划分出来的lm_13_train,另一部分是lm_imgn,所以我还有几个疑惑,希望您可以为我我解答:
1.如果换成自己的数据,是否可以只修改第一部分,舍弃lm_imgn来训练
2.换成自己的数据,大概需要多大的数据量
3.我发现训练时您写的config文件里用到了lm/test/test_bboxes/bbox_faster_all.json,如果换成我自己的数据,这个json文件有没有可用的代码来生成呢 @wangg12
期待您的回复,再次致谢!

@wangg12
Copy link
Member

wangg12 commented Aug 5, 2022

  1. 可以,按自己的需求准备数据就行
  2. 大概讲的话,真实数据一个物体几百张图片以上,虚拟的大概一万以上吧
  3. 用2D检测器训练你的数据, 把检测结果仿照这个格式保存下来就行

@micki-37
Copy link
Author

micki-37 commented Aug 6, 2022

王博您好,首先感谢您的及时回复,关于您回复我的第三点,您开源的项目中有您提到的这部分用2D检测器训练数据的代码吗 @wangg12

@wangg12
Copy link
Member

wangg12 commented Aug 6, 2022

@micki-37
Copy link
Author

王博您好,我还在尝试更换数据来进行实验,但是在生成xyz_crop的过程中遇到了问题,我就想着先生成lm_test中的图片的xyz_crop,生成之后和您在百度网盘中提供的xyz_crop对比,看下是否一致,但在我对应的换了data的路径再运行程序时,出现了问题,报错如下
using egl
split: train selected scene ids: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
0%| | 0/15 [00:00<?, ?it/s, train_all]split: train scene: 1
0%| | 0/1236 [00:00<?, ?it/s, 1]
0%| | 0/15 [00:00<?, ?it/s, train_all]
Traceback (most recent call last):
File "lm_test_1_gen_xyz_crop.py", line 235, in
xyz_gen.main()
File "lm_test_1_gen_xyz_crop.py", line 142, in main
bgr_gl, depth_gl = self.get_renderer().render(render_obj_id, IM_W, IM_H, K, R, t, near, far)
File "lm_test_1_gen_xyz_crop.py", line 104, in get_renderer
model_paths, vertex_tmp_store_folder=osp.join(PROJ_ROOT, ".cache"), vertex_scale=0.001
File "/home/fxj/GDR-Net-main/tools/lm/../../lib/meshrenderer/meshrenderer_phong.py", line 19, in init
self._context = gu.OffscreenContext()
File "/home/fxj/GDR-Net-main/tools/lm/../../lib/meshrenderer/gl_utils/egl_offscreen_context.py", line 91, in init
assert eglInitialize(self._egl_display, major, minor)
File "/home/fxj/miniconda3/envs/gdrnet/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 415, in call
return self( *args, **named )
File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.raw.EGL._errors.EGLError: EGLError(
err = EGL_NOT_INITIALIZED,
baseOperation = eglInitialize,
cArguments = (
<OpenGL._opaque.EGLDisplay_pointer object at 0x7f38351267a0>,
c_long(0),
c_long(0),
),
result = 0
)
请问是我哪里的操作不对吗 @wangg12

@wangg12
Copy link
Member

wangg12 commented Sep 26, 2022

可能是你gpu driver不对,我装的是这里的https://developer.nvidia.com/opengl-driver 。另外,可以参考下其他关于egl rendering的issues。

@wangg12 wangg12 closed this as completed Sep 26, 2022
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