isaacguan / pointnet-plane-detection Goto Github PK
View Code? Open in Web Editor NEWA 3D plane detection approach using PointNet
License: GNU General Public License v3.0
A 3D plane detection approach using PointNet
License: GNU General Public License v3.0
Hi Isaac!
Thank you for your idea!
I tried to train your network but cannot find tf_util.py and provider.py file in your project.
Shall I write them or where can I find them?
Thank you!
Hi, I received this error while converting the data from ply to h5. Not sure what's wrong.
FileNotFoundError: [Errno 2] No such file or directory: './ply/ply.ply'
Do I need to provide path in the loop?
Here is the code with my path:
[import h5py
import numpy as np
from plyfile import PlyData, PlyElement
filenames = [line.rstrip() for line in open("build.ply", 'r')]
#f = h5py.File("./hdf5_data/data_training.h5", 'w')
f = h5py.File("C:/Users/Asus/Desktop/CODINGTRY/Writehdf5/hdf5_data/builda.h5", 'w')
a_data = np.zeros((len(filenames), 2048, 3), dtype = np.uint8)
a_pid = np.zeros((len(filenames), 2048), dtype = np.uint8)
for i in range(0, len(filenames)):
plydata = PlyData.read("./ply/" + filenames[i] + ".ply")
piddata = [line.rstrip() for line in open("./points_label/" + filenames[i] + ".seg", 'r')]
for j in range(0, 2048):
a_data[i, j] = [plydata['vertex']['x'][j], plydata['vertex']['y'][j], plydata['vertex']['z'][j]]
a_pid[i,j] = piddata[j]
data = f.create_dataset("data", data = a_data)
pid = f.create_dataset("pid", data = a_pid)](url)
Hello @IsaacGuan
I wanted to ask you regarding the steps needed for preparing my dataset for feeding into pointnet++ network. Im using astyx data set and i have 539 frames in total and each frame consist of arounf 2000 points. I have these x,y,z,mag,radialspeed in txt format and the ground truth for each frame is in json format. Can you help me as to how i can move forward with this data set .it would be really helpfull i have used the model net data set and it works fine but the issue is how do i bring the astyx dataset into a format where i can feed it into a network.
I tried converting the txt files into .h5 as you mentioned but i dont understand how to assosiate the ground truth data of each frame. Can you help me with this.
Hi, Isaac,
Could you please explain how can we visualize the point cloud after segmentation prediction?
Thank you!
Joanne
Besides changing NUM_PART_CATS = 2
what else needs to be modified to have train.py accept more than 2 classes?
Thank you :)
In provider.py I have made these changes on the following function
def load_h5_data_label_seg(train_filename):
f = h5py.File(train_filename)
data = f['data'][:]
#label = f['points_label'][:]
seg = f['pid'][:]
return (data, seg) #label can be added later
and got this output error after running it
Training for the epoch 1/100 ...
Loading train file /home/vrmslab/Downloads/PointNet-Plane-Detection-master/./data/hdf5_data/data_training.h5
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273024 thread 1 bound to OS proc set 1
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273073 thread 2 bound to OS proc set 2
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273074 thread 3 bound to OS proc set 3
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273075 thread 4 bound to OS proc set 4
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273076 thread 5 bound to OS proc set 5
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273077 thread 6 bound to OS proc set 6
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273078 thread 7 bound to OS proc set 7
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273079 thread 8 bound to OS proc set 8
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273080 thread 9 bound to OS proc set 9
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273081 thread 10 bound to OS proc set 10
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273083 thread 12 bound to OS proc set 12
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273082 thread 11 bound to OS proc set 11
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273084 thread 13 bound to OS proc set 13
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273085 thread 14 bound to OS proc set 14
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273086 thread 15 bound to OS proc set 15
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273087 thread 16 bound to OS proc set 0
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273025 thread 17 bound to OS proc set 1
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273088 thread 18 bound to OS proc set 2
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273089 thread 19 bound to OS proc set 3
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273090 thread 20 bound to OS proc set 4
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273091 thread 21 bound to OS proc set 5
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273092 thread 22 bound to OS proc set 6
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273093 thread 23 bound to OS proc set 7
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273094 thread 24 bound to OS proc set 8
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273095 thread 25 bound to OS proc set 9
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273096 thread 26 bound to OS proc set 10
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273097 thread 27 bound to OS proc set 11
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273098 thread 28 bound to OS proc set 12
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273099 thread 29 bound to OS proc set 13
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273100 thread 30 bound to OS proc set 14
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273101 thread 31 bound to OS proc set 15
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273102 thread 32 bound to OS proc set 0
Training Total Mean_loss: 0.344301
Training Seg Mean_loss: 0.344301
Training Seg Accuracy: 0.455200
<<< Testing on the test dataset ...
Loading test file /home/vrmslab/Downloads/PointNet-Plane-Detection-master/./data/hdf5_data/data_testing.h5
Traceback (most recent call last):
File "/home/vrmslab/Downloads/PointNet-Plane-Detection-master/train.py", line 333, in
train()
File "/home/vrmslab/Downloads/PointNet-Plane-Detection-master/train.py", line 315, in train
eval_one_epoch(epoch)
File "/home/vrmslab/Downloads/PointNet-Plane-Detection-master/train.py", line 253, in eval_one_epoch
cur_data, cur_seg = provider.load_h5_data_label_seg(train_filename)
NameError: global name 'train_filename' is not defined
Hi, IsaacGuan
Thank you so much for sharing the application code of pointnet.
When I run your code, I have the following doubts.
Hi, Isaac!
Thanks for sharing the code. I am also studying Pointnet but I am new to the 3D point cloud.
Could you please tell me how to get the .pts files from the .ply files?
Thanks before!
Joanne
Hello @IsaacGuan
Please check that I understand how you prepare your data
If not, could you tell me the right order for preparing my own data using your git codes?
Sorry for my poor english skills, and I will really really appreciate if you reply me.
I run your code as follow order without ply, hdf5_data, points_label folder
however, when I run write_hdf5.py, it shows that it needs points_label dats, so I put it.
Then only data_testing.h5 came out.
can you help me?
I'am trying to classify pointcloud data, but, I can't make my own data as hdf5 format :(
plz help me
Hi IsaacGuan @IsaacGuan
Thank you for publishing your code. I have used your code to train my own data. My data also has two classes like yours. However, my model can't segment any positive point. It segmented all points in one class.
What should I check now?
Thank you.
Hello,
how to generate the .seg file
Thank you very much for your program. But I ran your program and kept reporting an error. For example, Import Error: No module named tf_util. I have been looking for a long time and still can't solve this problem. I hope you can reply to me, thank you again.
Hi Isaac, thanks for your work.
But I do not know how to label the points of the plane? What kind of efficient tools can I use to mark out targets points?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.