Closed yaio4109 closed 5 months ago
Adding more ray generating methods in raytracing module
when testing function create_ray_from_grid_w_luminous_angle
, but the Pytest failed the test. Becuase function rotate_points
use different datatype in odak/learn/tools/transformation.py
(ndarray) and odak/tools/transformation.py
(tensor).
If you guys want to switch all the code with torch, I can help🫡.
Thank you, @yaio4109 , for your continued support.
I am happy to incorporate these in the repository:
odak.learn.raytracing.boundary
has gone through cosmetic changes, and odak.learn.raytracing.boundary.intersect_w_triangle_batch
has gone through major changes.odak.learn.tools.sample
, thank you for doing that!test/test_ray_create_ray_from_grid_w_luminous_angle.py,
test/test_ray_create_ray_from_point_w_luminous_angle.py,
test/test_ray_create_ray_from_all_pairs.py
read well, but needs a tiny modification in their names by adding learn
in their naming conventions (e.g., test/test_ray_create_ray_from_grid_w_luminous_angle.py
-> test/test_learn_ray_create_ray_from_grid_w_luminous_angle.py
).However, these need revision in order to merge your code in the repository:
odak.raytracing.boundary
which suppose to be pure CPU
based now uses torch
functions. odak.raytracing.ray
submodule.Unfortunately, these create an issue. odak
is designed to be a development platform but it is also an educational platform where a graduate student can read its code to develop their basic understanding on the matter both on old school Pythonic computations with Numpy and modern Pythonic computations with torch on the GPUs. Simply, put, we use Numpy
when it is under odak
and we use Torch
when it is under odak.learn
. I am unsure how to resolve this issue at this point and this is one of the reasons why I didn't merge this pull request.
@kaanaksit, Sorry for late revision. I recall the original python code with numpy
in raytracing
module and move the function with torch
into learn
module.
There were too many commits and I wanted to make sure that I have followed your updates as I merge it in the repository. Along the way, I had to delete the history and merge all your commits into a single commit to see what has really changed. The current version in the repository contains all your updates.
Thank you for your valuable contributions to odak
! I would be happy to meet you if you have some availability for me. Please reach out to me using kaanaksit@kaanaksit.com
. Thanks!
Make the function return the correct number of intersection points between the triangle and the ray.