tk3dv:3D视觉工具包(tk3dv)是用于深度学习和3D计算机视觉的工具集合

  • J6_157800
    了解作者
  • 156KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-07 09:40
    上传日期
tk3dv 3D视觉工具包(tk3dv)是用于深度学习和3D计算机视觉的工具集合。 注意:要使用pyEasel(tk3dv的可视化组件),您必须在带有显示器的计算机上使用tk3dv,因为它使用OpenGL。 要求 :conda install pytorch torchvision cudatoolkit=9.0 -c pytorch : pip install palettable : pip install gputil 安装 安装完上述要求后,您可以像这样安装tk3dv: pip install git+https://github.com/drsrinathsridhar/tk3dv.git 如果要在Ubuntu上重新安装,请确保卸载并重复安装。 问题 在macOS Big Sur上导入错误 请在找到解决方案。
tk3dv-master.zip
内容介绍
# binvox-rw-py Small Python module to read and write `.binvox` files. The voxel data is represented as dense 3-dimensional Numpy arrays in Python (a direct if somewhat wasteful representation for sparse models) or as an array of 3D coordinates (more memory-efficient for large and sparse models). [Binvox](http://www.cs.princeton.edu/~min/binvox/) is a neat little program to convert 3D models into binary voxel format. The `.binvox` file format is a simple run length encoding format described [here](http://www.cs.princeton.edu/~min/binvox/binvox.html). ## Code example Suppose you have a voxelized chair model, `chair.binvox` (you can try it on the one in the repo). Here's how it looks in [`viewvox`](http://www.cs.princeton.edu/~min/viewvox/): ![chair](https://raw.githubusercontent.com/dimatura/binvox-rw-py/public/chair.png) Then >>> import binvox_rw >>> with open('chair.binvox', 'rb') as f: ... model = binvox_rw.read_as_3d_array(f) ... >>> model.dims [32, 32, 32] >>> model.scale 41.133000000000003 >>> model.translate [0.0, 0.0, 0.0] >>> model.data array([[[ True, False, False, ..., False, False, False], [ True, False, False, ..., False, False, False], [ True, False, False, ..., False, False, False], ..., [[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]]], dtype=bool) You get the idea. `model.data` has the boolean 3D array. You can then manipulate however you wish. For example, here we dilate it with `scipy.ndimage` and write the dilated version to disk: >>> import scipy.ndimage >>> scipy.ndimage.binary_dilation(model.data.copy(), output=model.data) >>> model.write('dilated.binvox') Then we get a fat chair: ![fat chair](https://raw.githubusercontent.com/dimatura/binvox-rw-py/public/fat_chair.png) ## Sparse representation To get the data as an array of coordinates, look at `binvox_rw.read_coords`. ## Installation This is a really simple, 200-line module. You should just stick into whatever project you're using. Or copy it to `/usr/share/lib/pythonX.Y/site-packages` if you really want a system-wide installation. --- Daniel Maturana `dimatura@cmu.edu`
评论
    相关推荐
    • 初识Papervision3D
      NULL 博文链接:https://longleg.iteye.com/blog/341873
    • J2ME3D构筑
      NULL 博文链接:https://ting100.iteye.com/blog/509167
    • 3D Pie Chart
      NULL 博文链接:https://yan3999.iteye.com/blog/1717789
    • 图片3D旋转
      NULL 博文链接:https://vip-chenlin.iteye.com/blog/1883302
    • Alternativa3D资料
      NULL 博文链接:https://as3.iteye.com/blog/1149811
    • 3D照片墙
      NULL 博文链接:https://fxz-2008.iteye.com/blog/649168
    • 3d标签云
      NULL 博文链接:https://chanmao.iteye.com/blog/1729500
    • Layout3D旋转
      NULL 博文链接:https://aichixihongshi.iteye.com/blog/1182533
    • 3D玫瑰
      NULL 博文链接:https://anllin.iteye.com/blog/1684463
    • 3D图片效果
      NULL 博文链接:https://techpool.iteye.com/blog/503341