robot-grasp-detection
robot-grasp-detection copied to clipboard
How can I transfer this project to python3, it seems this project is writen in python2, thank you.
There are little difference between python2 and python3 in this project.
There are some differences in some file reading, encoding and decoding APIs, and some issues in tensorflow version make it impossible to run with python3 even after some modification. For example, when I run "build_cgd_dataset.py", I came into this error.
Traceback (most recent call last):
File "build_cgd_dataset.py", line 115, in <module>
main()
File "build_cgd_dataset.py", line 98, in main
example = _convert_to_example(filename, bboxes, image_buffer, height, width)
File "build_cgd_dataset.py", line 62, in _convert_to_example
'image/filename': _bytes_feature(filename),
File "build_cgd_dataset.py", line 57, in _bytes_feature
return tf.train.Feature(bytes_list=tf.train.BytesList(value=[v]))
TypeError: 'D:\\JiangShan\\cornell_grasping_dataset\\02\\pcd0210r.png' has type str, but expected one of: bytes
It seems there are some errors in the encoding and decoding of PNG, and when I ran grasp_det.py, the loss is NaN. I want to run the training of this network on windows, and tensorflow is not supported in python2 on windows.
1.https://blog.csdn.net/qq_29921623/article/details/80047339 before example = _convert_to_example(filename, bboxes, image_buffer, height, width) add filename = filename.encode() 2.deleted the Nan valude in pcd0132cpos.txt and pcd0165cpos.txt file
Thanks, I rewrote some scripts and solved this problem. 谢谢,问题已解决,以后多多交流
Hello, when I run "build_cgd_dataset.py", I met one error as follows:
runfile('F:/robot-grasp-detection/build_cgd_dataset.py', wdir='F:/robot-grasp-detection')
F:\RGB-D_grasp_datasets\ rain-cgd
F:\RGB-D_grasp_datasets
alidation-cgd
Traceback (most recent call last):
File "C:\Users\DSL\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\IPython\core\interactiveshell.py", line 2879, in run_code self.showtraceback(running_compiled_code=True)
File "C:\Users\DSL\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\IPython\core\interactiveshell.py", line 1811, in showtraceback self._showtraceback(etype, value, stb)
File "C:\Users\DSL\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\ipykernel\zmqshell.py", line 554, in _showtraceback dh.parent_header, ident=topic)
File "C:\Users\DSL\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\jupyter_client\session.py", line 730, in send to_send = self.serialize(msg, ident)
File "C:\Users\DSL\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\jupyter_client\session.py", line 625, in serialize content = self.pack(content)
File "C:\Users\DSL\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\jupyter_client\session.py", line 103, in
File "C:\Users\DSL\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\zmq\utils\jsonapi.py", line 43, in dumps s = s.encode('utf8')
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcce' in position 1994: surrogates not allowed
Could you give me some suggestions? Thanks very much
I may know why I met this error, but I have another problem as follows"
runfile('F:/robot-grasp-detection/build_cgd_dataset.py', wdir='F:/robot-grasp-detection') F:\RGB-D_grasp_datasets\train-cgd F:\RGB-D_grasp_datasets\validation-cgd Done converting 0 images in TFRecords with 0 train images and 0 validation image
Could you give me some suggestions? Thanks very much.
@dingshenglan Have you modified the line 15 in build_cgd_dataset.py? You should change it to the path on your computer.
@dingshenglan Have you modified the line 15 in build_cgd_dataset.py? You should change it to the path on your computer.
大佬,你知道如何用生成的模型来测试自己的数据吗?
@soldatjiang I have deleted the Nan valude in pcd0132cpos.txt and pcd0165cpos.txt file and run build_cgd_dataset.py.However,when I run grasp_det.py for train,the loss is nan. Step 0 | loss = nan | x = [ 97.125 125.65 100.625] | x_hat = [nan nan nan] | tan = [ 0.1700947 -5.7376623 -0.2632446] | tan_hat = [-1.0320765 -1.0320765 -1.0320765] | h = [10.650811 22.422993 21.715439] | h_hat = [nan nan nan] | w = [11.328764 8.444719 17.096458] | w_hat = [nan nan nan] | (2.996 sec/batch
When I run grasp_det.py for validation,I get some errors.
No handlers could be found for logger "shapely.geos"
Traceback (most recent call last):
File "grasp_det.py", line 162, in
@jinhuan-hit In my memory, in cornell dataset, four lines correspod to one bbox, if you delete the NaN lines, you should delete other lines in the same bbox.
@soldatjiang Thanks,I'll check it.
@soldatjiang Thanks,I'll check it. Excuse me,I have the same problem. How did you solve it in the end?
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float64: 'Tensor("truediv:0", shape=(), dtype=float64, device=/device:CPU:0)' May I ask how to solve this problem? Thanks, I've been working on it for a long time!