PVNet复现笔记《PVNet Pixel-Wise Voting Network for 6DoF Pose Estimation》

libceres路径问题
我采取的办法是将下载的libceres文件拷贝到/usr/local/lib中,然后在~/.bashrc文件中的LD_LIBRARY_PATH添加/usr/local/lib。

数据从onedrive下载困难的问题,没办法,科学上网!

合成图像时提示缺少transforms3d库(但是在虚拟环境中已经安装),在pycham中选择blender中的python解释器,然后在setting中添加缺失的库。
Traceback (most recent call last):
  File "/home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/blender/render_backend.py", line 7, in <module>
    from transforms3d.euler import euler2mat
ImportError: No module named 'transforms3d'
found bundled python: /home/lxj/blender-2.79b-linux-glibc219-x86_64/2.79/python
Read blend: /home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/data/blank.blend

Blender quit


解决办法:当使用pycharm工具时,将程序的运行环境直接修改为blender-2.79b-linux-glibc219-x86_64中的python环境即可。

遇到:

ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in [‘D:\Anaconda3\envs\tensorflow\lib\site-packages\numpy’]. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.


解决办法:按照提示操作即可,重复卸载numpy,直到找不见为止。在pycharm环境中怎么办呢?在出错文件的开始位置,根据import的库,双击找到对应文件的位置,然后删除即可。按照此操作重复即可。

正常配置后,就会提示缺失文件中用到的第三方库,然后按照提示安装。有时候可能遇到从pycharm中安装不成功的情况,我采取的办法是把相同python版本环境中安装的库文件夹拷贝到我运行环境中的site-packages中,文件就可找到。

当上述库不在报错后,又出现如下错误:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

解决办法:与作者沟通后,换使用虚拟环境的python版本,不再报此错误。继续下一步。

i followed your instruction and used the python from virtual environment, however, i reported following error:
>>>
/home/lxj/anaconda3/envs/tf367/bin/python /home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/run.py --type rendering found bundled python: /home/lxj/blender-2.79-linux-glibc219-x86_64/2.79/python
Read blend: /home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/data/blank.blend
Traceback (most recent call last):
File "/home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/blender/render_backend.py", line 456, in 
batch_render_with_linemod(args, camera)
File "/home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/blender/render_backend.py", line 366, in batch_render_with_linemod
bg_imgs = np.random.choice(bg_imgs, size=cfg.NUM_SYN)
File "mtrand.pyx", line 773, in numpy.random.mtrand.RandomState.choice
ValueError: 'a' cannot be empty unless no samples are taken

Successfully imported '/home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/data/LINEMOD/cat/cat.ply' in 1.470 sec

Blender quit

Process finished with exit code 0
<<<


根据报错信息,得知bg_imgs值为空,检查后发现路径错误,修改后代码正常运行。

执行如下命令:
python tools/train_linemod.py --cfg_file configs/linemod_train.json --linemod_cls cat
报错:
ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).
 ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).
 ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).
 ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).
 ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).
 ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).
 ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).
 Traceback (most recent call last):
  File "/home/Storage/lxj/PoseEst/pvnet/tools/train_linemod.py", line 358, in <module>
    train_net()
  File "/home/Storage/lxj/PoseEst/pvnet/tools/train_linemod.py", line 342, in train_net
    train(net, optimizer, train_loader, epoch)
  File "/home/Storage/lxj/PoseEst/pvnet/tools/train_linemod.py", line 142, in train
    for idx, data in enumerate(dataloader):
  File "/home/lxj/anaconda3/envs/tf367/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 330, in __next__
    idx, batch = self._get_batch()
  File "/home/lxj/anaconda3/envs/tf367/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 309, in _get_batch
    return self.data_queue.get()
  File "/home/lxj/anaconda3/envs/tf367/lib/python3.6/multiprocessing/queues.py", line 335, in get
    res = self._reader.recv_bytes()
  File "/home/lxj/anaconda3/envs/tf367/lib/python3.6/multiprocessing/connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "/home/lxj/anaconda3/envs/tf367/lib/python3.6/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/home/lxj/anaconda3/envs/tf367/lib/python3.6/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
  File "/home/lxj/anaconda3/envs/tf367/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 227, in handler
    _error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 9514) is killed by signal: Bus error. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.


参考网络博客,两个解决办法:一是缩小batch_size尺寸,二是减小num_worker尺寸。
检查代码后发现,作者使用多块显卡,但是我们的机器只有一块卡,将batch_size由32改为10之后可以运行(1080Ti)

到多卡服务器配置环境时:
ImportError: libspqr.so.2.0.2: cannot open shared object file: No such file or directory
在~/.bashrc中加入:
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
 
export CUDA_HOME=/usr/local/cuda

后面一直提示缺少libsqrt.so.*之类库的问题,还没解决,后续更新后再放上来。
 

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
clean-pvnet是一个用于6DoF姿态估计的代码库,它是基于“PVNet: Pixel-wise Voting Network for 6DoF Pose Estimation”论文开发的。如果您想要下载clean-pvnet代码并配置环境,可以按照以下步骤进行操作: 1. 使用命令`git clone https://github.com/zju3dv/clean-pvnet.git`下载代码。 2. 配置环境,可以使用以下命令: ``` conda create -n pvnet python=3.7 conda activate pvnet conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.2 -c pytorch pip install Cython==0.28.2 sudo apt-get install libglfw3-dev libglfw3 pip install -r requirements.txt ``` 这些命令将创建一个名为`pvnet`的虚拟环境,并安装所需的依赖项。 3. 当您运行`run.py`时,输出日志将显示运行的进度和结果。根据提供的日志,运行看起来是成功的,并输出了一些信息。 4. 对于权重文件,根据提供的信息,训练好的权重文件可能存储在代码库的某个目录中。 请注意,这只是对clean-pvnet的简要介绍,如果您需要更多详细信息或有其他相关问题,请参考论文和代码库中的文档。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [【复现笔记】clean-pvnet复现](https://blog.csdn.net/weixin_54470372/article/details/128293400)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值