Code Monkey home page Code Monkey logo

pointnetgpd's People

Contributors

hymwgk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pointnetgpd's Issues

有关pointnetgpd训练的问题

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 512])
你好,大佬我想问下原版的Pointnetgpd必须要训练完整的YCB数据集吗?不能只训练一部分吗?当我用python main_1v.py --epoch 200 --mode train --batch-size 16的时候,训练一轮后,就出现了KeyError: '037_scissors',而我并没全部下载YCB数据集,只是想下载一部分训练。

关于直接输入点云

目前我已得到了一个点云数据,我想直接输入这个点云,通过这个网络在仿真环境中查看抓取效果应该怎么做呢?

运行python main_test.py的问题

当我运行python main_test.py --model_type 3class的时候,出现下面的问题:
/mnt/f/code/PointNetGPD/PointNetGPD
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.PointNetCls' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.PointNetfeat' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.STN3d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.activation.ReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
load model ../data/pointnetgpd_3class.model
voting: [tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0])]
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/scipy/stats/stats.py:249: FutureWarning: The input object of type 'Tensor' is an array-like implementing one of the corresponding protocols (__array__, __array_interface__ or __array_struct__); but not a sequence (or 0-D). In the future, this object will be coerced as if it was first converted using np.array(obj). To retain the old behaviour, you have to either modify the type 'Tensor', or assign to an empty array created with np.empty(correct_shape, dtype=object).
a = np.asarray(a)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/scipy/stats/stats.py:249: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
a = np.asarray(a)
Test result: tensor([0])
我改过一些代码,请问下有谁知道这是什么原因导致的,应该怎么解决呢?

关于训练时的报错

请问一下博主几个训练网络时的报错问题:

  1. main1v.py中的parser.add_argument('--data-path', type=str, default='~/dataset/PointNetGPD/', help='data path')需要修改吗,会显示dataset.py中self.transform = pickle.load(open(os.path.join(self.path, 'google2cloud.pkl'), 'rb'))在改路径下无法找到point2cloud.pkl文件
  2. main1v.py函数中的shuffle需要改为False吗,不然也会报错
  3. 在安装python-pcl的是时候会报一个cython的错误,博主是否有遇到过
  4. 博主能否提供一下pytorch的版本,不清楚pytorch版本是否对本项目有影响

关于ubuntu20.04 中python-pcl的问题以及generate dataset canny

1 由于python-pcl只支持pcl1.6-1.9,而ubuntu20.04配套的ros自带pcl1.10. 而dexnet中的部分功能似乎极大的依赖python-pcl。

2 后面关于generate dataset canny代码部分,我看过你的注释后,了解到:

#如果每个摩擦系数下,有效的抓取(满足力闭合或者其他判断标准)小于要求值,就一直循环查找,直到所有摩擦系数条件下至少都存在20个有效抓取
while np.sum(good_count_perfect < minimum_grasp_per_fc) != 0:
#开始使用antipodes sample获得对映随机抓取,此时并不判断是否满足力闭合,只是先采集满足夹爪条件的抓取
#如果一轮多次随机采样之后,发现无法获得指定数量的随机抓取,就会重复迭代计算3次,之后放弃,并把已经找到的抓取返回来

我在参照步骤 python generate-dataset-canny.py [prefix],然而终端中针对某一物体的采样 一直重复迭代3次, 之后似乎始终达不到全部要求,始终对一个物体进行计算。挂着跑了一天仍旧在对第一个物体002进行采样,generated_grasps文件夹始终为空。
我用了默认的 antipodal 采样方式。

关于数据集

博主你好,我看了原作者提供的数据集,每个点都是12维的数据,我只知道前3维是位置坐标,请问其他9维是什么信息?

关于执行 Python main_1v.py --mode train报错问题

环境:18.04 python3.7 CPU训练 num_worker=0
数据集:YCB数据集中的003类 生成了cloud pc_*
经过跟踪发现在执行def train(model, loader, epoch):
.....
for batch_idx, (data, target) in enumerate(loader):
.............
if len(data) <=1:
continue
....
输出发现print(len(data))是1,进入if语句后,就开始报错,但是loader内有16800。

执行语句后输出的日志:
(grasp) ly@ly:~/code/PointNetGPD$ python main_1v.py --mode train

/home/ly/anaconda3/envs/grasp/lib/python3.7/site-packages/torch/optim/lr_scheduler.py:134: UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning)
16800 loader
/home/ly/dataset/PointNetGPD/ycb_grasp/train/panda_003_cracker_box_1400.npy
/home/ly/dataset/PointNetGPD/ycb_rgbd/003_cracker_box/google_512k/nontextured.ply
Traceback (most recent call last):
File "main_1v.py", line 387, in
main()
File "main_1v.py", line 365, in main
acc_train = train(model, train_loader, epoch_i)
File "main_1v.py", line 278, in train
for batch_idx, (data, target) in enumerate(loader):
File "/home/ly/anaconda3/envs/grasp/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/ly/anaconda3/envs/grasp/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/ly/anaconda3/envs/grasp/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
return self.collate_fn(data)
File "main_1v.py", line 120, in my_collate
return torch.utils.data.dataloader.default_collate(batch)
File "/home/ly/anaconda3/envs/grasp/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 46, in default_collate
elem = batch[0]
IndexError: list index out of range

read_grasps_from_file.py可视化抓取过程出现错误

当我尝试新建的模型python generate-dataset-canny.py生成的抓取后,在read_grasps_from_file.py可视化抓取过程出现错误:
valueerror: a must be greater than 0 unless no samples are takenvalueerror: a must be greater than 0 unless no samples are taken,有谁知道是什么原因吗?官方的模型能够可视化。

运行generate-dataset-canny.py报错

主要是BinaryImage, ColorImage, DepthImage, ObjectRender, RenderMode这几个包的问题。

python3环境下,原代码中均是从perception中import,但是autolab_core升级后BinaryImage, ColorImage, DepthImage几个包都包含到autolab_core里了,但是ObjectRender, RenderMode不知道从哪里import,perception和autolab_core都不行

GLEW could not be initialized: Missing GL version

When running the read_grasp_from_file.py file, the visual interface crashes and displays "GLEW could not be initialized: Missing GL version". According to the method on google, the path to libGLEW in bashrc has been set, but it does not work. Does anyone know what to do, thanks!

大家一起来探讨啊

感谢作者的分享,很多补充帮了很大的忙,但感觉这个配置环境还是太难了,希望想深入研究的朋友一起来探讨,我建了个扣扣群928165547

Question about autolab-core and autolab-preception

When I ran the code in python3 ,I encountered this error:

(pointnetgpd) klxue@dell-XPS:~/code/PointNetGPD/apps$ python generate-dataset-canny.py
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
Traceback (most recent call last):
File "generate-dataset-canny.py", line 13, in
from dexnet.grasping.quality import PointGraspMetrics3D
File "/home/klxue/code/dex-net/src/dexnet/init.py", line 24, in
from dexnet.api import DexNet
File "/home/klxue/code/dex-net/src/dexnet/api.py", line 42, in
import dexnet.database.database as db
File "/home/klxue/code/dex-net/src/dexnet/database/init.py", line 22, in
from dexnet.database.hdf5_factory import Hdf5ObjectFactory
File "/home/klxue/code/dex-net/src/dexnet/database/hdf5_factory.py", line 39, in
from perception import RenderMode
ImportError: cannot import name 'RenderMode' from 'perception' (/home/klxue/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/perception/init.py)

I changed from perception import RenderMode into from autolab_core import RenderMode ,but encountered this error:

(pointnetgpd) klxue@dell-XPS:~/code/PointNetGPD/apps$ python generate-dataset-canny.py
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
WARNING:root:Failed to import gqcnn! Grasp2D functions will not be available.
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import OpenRAVE
WARNING:root:Failed to import mayavi
WARNING:dexnet.grasping.grasp_sampler:Failed to import rospy, you can't grasp now.
WARNING:dexnet.grasping.grasp_sampler:Do not have mayavi installed, please set the vis to False
Traceback (most recent call last):
File "generate-dataset-canny.py", line 13, in
from dexnet.grasping.quality import PointGraspMetrics3D
File "/home/klxue/code/dex-net/src/dexnet/init.py", line 24, in
from dexnet.api import DexNet
File "/home/klxue/code/dex-net/src/dexnet/api.py", line 42, in
import dexnet.database.database as db
File "/home/klxue/code/dex-net/src/dexnet/database/init.py", line 22, in
from dexnet.database.hdf5_factory import Hdf5ObjectFactory
File "/home/klxue/code/dex-net/src/dexnet/database/hdf5_factory.py", line 46, in
class Hdf5ObjectFactory(object):
File "/home/klxue/code/dex-net/src/dexnet/database/hdf5_factory.py", line 226, in Hdf5ObjectFactory
def rendered_images(data, render_mode=RenderMode.SEGMASK):
NameError: name 'RenderMode' is not defined

Could someone help me? Thanks very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.