Skip to content

Commit

Permalink
Pybinds for Dataset module. (isl-org#4633)
Browse files Browse the repository at this point in the history
  • Loading branch information
reyanshsolis authored Feb 2, 2022
1 parent aa72ad1 commit 58ce081
Show file tree
Hide file tree
Showing 129 changed files with 3,329 additions and 1,274 deletions.
7 changes: 3 additions & 4 deletions cpp/benchmarks/geometry/TriangleMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <benchmark/benchmark.h>

#include "open3d/data/Dataset.h"
#include "open3d/io/PointCloudIO.h"

namespace open3d {
Expand All @@ -36,12 +37,10 @@ namespace registration {

// This pcd does not contains non-finite points.
// TODO: Change this to pcd with non-finite poins.
static const std::string input_pcd =
std::string(TEST_DATA_DIR) + "/ICP/cloud_bin_0.pcd";

static void BenchmarkCreateFromPointCloudBallPivoting(
benchmark::State& state, const bool remove_non_finite_points) {
auto pcd = io::CreatePointCloudFromFile(input_pcd);
data::SamplePointCloudPCD sample_pcd;
auto pcd = io::CreatePointCloudFromFile(sample_pcd.GetPath());

if (remove_non_finite_points) {
pcd->RemoveNonFinitePoints();
Expand Down
9 changes: 4 additions & 5 deletions cpp/benchmarks/pipelines/registration/Registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ static std::tuple<geometry::PointCloud, geometry::PointCloud> LoadPointCloud(

static void BenchmarkICPLegacy(benchmark::State& state,
const TransformationEstimationType& type) {
data::dataset::SampleICPPointClouds sample_icp_pointclouds;
data::DemoICPPointClouds demo_icp_pointclouds;
geometry::PointCloud source, target;
std::tie(source, target) =
LoadPointCloud(sample_icp_pointclouds.GetPaths(0),
sample_icp_pointclouds.GetPaths(1),
/*voxel_downsampling_factor =*/0.02);
std::tie(source, target) = LoadPointCloud(
demo_icp_pointclouds.GetPaths(0), demo_icp_pointclouds.GetPaths(1),
/*voxel_downsampling_factor =*/0.02);

std::shared_ptr<TransformationEstimation> estimation;
if (type == TransformationEstimationType::PointToPlane) {
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/t/pipelines/registration/Registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@ static void BenchmarkICP(benchmark::State& state,
const core::Dtype& dtype,
const TransformationEstimationType& type) {
utility::SetVerbosityLevel(utility::VerbosityLevel::Error);
data::dataset::SampleICPPointClouds sample_icp_pointclouds;
data::DemoICPPointClouds demo_icp_pointclouds;
geometry::PointCloud source, target;
std::tie(source, target) = LoadTensorPointCloudFromFile(
sample_icp_pointclouds.GetPaths(0),
sample_icp_pointclouds.GetPaths(1),
demo_icp_pointclouds.GetPaths(0), demo_icp_pointclouds.GetPaths(1),
/*voxel_downsampling_factor =*/0.02, dtype, device);

std::shared_ptr<TransformationEstimation> estimation;
Expand Down
3 changes: 0 additions & 3 deletions cpp/open3d/data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ open3d_ispc_add_library(data OBJECT)

target_sources(data PRIVATE
Dataset.cpp
Download.cpp
Extract.cpp
ExtractZIP.cpp
)

open3d_show_and_abort_on_warning(data)
Expand Down
Loading

0 comments on commit 58ce081

Please sign in to comment.