Comments (7)
For details how to generate basis point set, you can use the script from https://github.com/otaheri/bps_torch to do it. This basis point set are fixed for the entire dataset so you only need to generate once. @yys-abu
from ffhnet.
For details how to generate basis point set, you can use the script from https://github.com/otaheri/bps_torch to do it. This basis point set are fixed for the entire dataset so you only need to generate once. @yys-abu
Thank you for your reply. Are you saying that I don't need to mark which point cloud can be captured and which cannot?
Just need to provide 1024 point clouds and the grasping posture relative to the center of the object
from ffhnet.
For details how to generate basis point set, you can use the script from https://github.com/otaheri/bps_torch to do it. This basis point set are fixed for the entire dataset so you only need to generate once. @yys-abu
I found that the point cloud data size of the object is 1024x3, and the bps data of the object is 4096x1. How is this size of bps generated specifically? This is the code for generating bps:
import torch
import time
from bps_torch.bps import bps_torch
import open3d as o3d
import numpy as np
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
file_path = "kit_BakingVanilla_pcd000.pcd"
bps = bps_torch(bps_type='random_uniform',
n_bps_points=1024,
radius=1.,
n_dims=3,
custom_basis=None)
cloud1 = o3d.io.read_point_cloud(file_path)
points = cloud1.points
points_tensor = torch.tensor(points, dtype=torch.float32)
s = time.time()
bps_enc = bps.encode(points_tensor,
feature_type=['dists','deltas'],
x_features=None,
custom_basis=None)
print(time.time() - s)
deltas = bps_enc['deltas']
print(deltas)
bps_dec = bps.decode(deltas)
from ffhnet.
For details how to generate basis point set, you can use the script from https://github.com/otaheri/bps_torch to do it. This basis point set are fixed for the entire dataset so you only need to generate once. @yys-abu
I used the following code to generate a basis point set. Do I need to generate 4096 dists and save them
import torch
import time
from bps_torch.bps import bps_torch
import open3d as o3d
import numpy as np
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
file_path = "kit_BakingVanilla_pcd000.pcd"
bps = bps_torch(bps_type='random_uniform',
n_bps_points=4096,
radius=1.,
n_dims=3,
custom_basis=None)
cloud1 = o3d.io.read_point_cloud(file_path)
points = cloud1.points
points_tensor = torch.tensor(points, dtype=torch.float32)
s = time.time()
bps_enc = bps.encode(points_tensor,
feature_type=['dists','deltas'],
x_features=None,
custom_basis=None)
print(time.time() - s)
dists= bps_enc['dists']
deltas = bps_enc['deltas']
from ffhnet.
First, bps can encode arbitrary number of point cloud, either 1024 or more.
Second, you should only run
bps = bps_torch(bps_type='random_uniform', n_bps_points=1024, radius=1., n_dims=3, custom_basis=None)
only once to generate a fixed basis point. Then you should save this generated bps to file. bps
here is a numpy array.
When you use this basis point, you should load the saved basis point like this:
bps_path = os.path.join('path/to/basis_point_set.npy')
bps_np = np.load(bps_path)
bps = b_torch.bps_torch(custom_basis=bps_np)
So what you should save is the basis point set which will be needed for training and inference if you input bps encoded value to your neural network. Because during inference, you need exact same basis point set. You can also save the encoded bps and load it for training.
For details, please read the source code https://github.com/otaheri/bps_torch/blob/master/bps_torch/bps.py and also the paper https://arxiv.org/abs/1908.09186 because any small mistake will make training fails :D
from ffhnet.
bps = bps_torch(bps_type='random_uniform', n_bps_points=1024, radius=1., n_dims=3, custom_basis=None)
bps = bps_torch(bps_type='random_uniform', n_bps_points=4096, radius=1., n_dims=3, custom_basis=None)
I use the above line of code to generate fixed basis point and I load fixed basis point:
bps_path = os.path.join('path/to/basis_point_set.npy')
bps = bps .encode(points, custom_basis=bps_np)
dists= bps_enc['dists']
There are 4096 pieces of data in the npy file of your dataset. Where did these 4096 pieces of data come from? Is it formed by encoding 4096 dists or generated 4096 fixed basis points?
from ffhnet.
You first have bps (basis point set) which you can find in my dataset basis_point_set.npy
.
The image you showed are already encoded 4096 dists based on basis_point_set.npy
My wechat: Albert_fq @yys-abu
from ffhnet.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffhnet.