If the function o3d.pipelines.registration.compute_fpfh_feature is excecuted inside a Process that is not the main one, it never exits the function. It works fine with Threads though.
[input]
from multiprocessing import Process
import open3d as o3d
o3d.utility.set_verbosity_level(o3d.utility.VerbosityLevel.Debug)
path = "any/pointcloud/file.pcd"
pcd = o3d.io.read_point_cloud(path)
def compute_fpfh(pcd):
print("start")
pcd_fpfh = o3d.pipelines.registration.compute_fpfh_feature(
pcd,
o3d.geometry.KDTreeSearchParamHybrid(radius=1, max_nn=100)
)
print("end")
return pcd_fpfh
[input]
compute_fpfh(pcd)
[output]
start
end
Feature class with dimension = 33 and num = 1000
Access its data via data member.
[input]
process = Process(
target=compute_fpfh,
args=(pcd,)
)
process.start()
process.join()
[output]
start
Steps to reproduce the bug
from multiprocessing import Process
import open3d as o3d
o3d.utility.set_verbosity_level(o3d.utility.VerbosityLevel.Debug)
path = "any/pointcloud/file.pcd"
pcd = o3d.io.read_point_cloud(path)
def compute_fpfh(pcd):
print("start")
pcd_fpfh = o3d.pipelines.registration.compute_fpfh_feature(
pcd,
o3d.geometry.KDTreeSearchParamHybrid(radius=1, max_nn=100)
)
print("end")
return pcd_fpfh
compute_fpfh(pcd)
process = Process(
target=compute_fpfh,
args=(pcd,)
)
process.start()
process.join()
Error message
No response
Expected behavior
No response
Open3D, Python and System information
- Operating system: Ubuntu 20.04 (WSL)
- Python version: Python 3.8
- Open3D version: 0.16.1+1c84344a
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): ?
Hi @amarion35, this is because the pybinding of compute_fpfh_feature does not realsed python GIL. The problem is common among legacy API, and might be fixed in PR #5888
Checklist
master
branch).Describe the issue
If the function
o3d.pipelines.registration.compute_fpfh_feature
is excecuted inside a Process that is not the main one, it never exits the function. It works fine with Threads though.[input]
[input]
[output]
[input]
[output]
Steps to reproduce the bug
Error message
No response
Expected behavior
No response
Open3D, Python and System information
Additional information
No response