GithubHelp home page GithubHelp logo

raytorch's Introduction

raytorch

Raytorch : a differentiable ray intersection using Pytorch.

lidar_1

lidar_2

Usage

Simulating LiDAR sampling on mesh scenes (with possible support for more graphic representative in the future).

Explore test/LiDAR_test.ipynb for more details.

obj = ico_sphere(level = 1)
translate = Translate(x=0, y=10, z=0)
new_verts = translate.transform_points(obj.verts_padded())
obj = obj.update_padded(new_verts)
vertices = obj.verts_packed()
faces = obj.faces_packed()
vert_aligned = vertices[faces]

lidar = LiDAR_base(torch.tensor([0.0, 0.0, 0.0]),
                    azi_range = [0, 180],
                    polar_range = [80, 100],
                    res = [2.5, 2.5],
                    min_range = 1.5,
                    max_range = 20)

intersection = lidar.scan_triangles(obj)
plot_scene({
    "test": {"ray": visualize_LiDAR(lidar),
             "points": visualize_point_clouds(intersection)},
},
    raybundle_ray_line_width=2.0,
    pointcloud_marker_size=2.0
)

Installation

a. Install pytorch following the instructions from https://pytorch.org/ or as follows:

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

b. Install pytorch3d following the instructions from https://github.com/facebookresearch/pytorch3d

c. Install ploty as follows (optional, to visualize)):

pip install ploty

d. Clone this repository and install as follows:

git clone [email protected]:Uzukidd/raytorch.git
cd raytorch
pip install -e .

raytorch's People

Contributors

uzukidd avatar

Stargazers

 avatar

Watchers

焓韡 avatar  avatar

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.