Code Monkey home page Code Monkey logo

voxelization_api's Introduction

Voxelization_API

Voxelization on point clouds using cython wrapped CUDA/C++

This code provides an API to voxelize input point clouds and outputs the occupied information of each voxel.

Requirements:

  • cython (>=0.16)
  • CUDA

YOU need to first ensure you have added environment settings in your ~/.bashrc:

export PATH="/usr/local/cuda/bin:$PATH"

export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"

Install:

To inplace install:

$ python setup.py build_ext --inplace or install $ python setup.py install

to test:

$ python test.py

More sampling methods can be found in branches

API Usage

  • An example:
#### Settings
num_points = 4096
size = num_points
outsize = 2048
num_y = 120
num_x = 40
num_height = 20
max_height = 1  # max height
max_length = 1  # max_length in xy direction (same for x and y)

#### Usage for voxelization
test_data = test_data.transpose()
test_data = test_data.flatten()
voxelizer = voxelocc.GPUTransformer(test_data, size, max_length, max_height, num_x, num_y, num_height, outsize)
voxelizer.transform()
point_t = voxelizer.retreive()
point_t = point_t.reshape(-1,3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.