Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing parameters to nlos-z.yaml and refactor tal.render.render module #4

Closed

Conversation

curldivergence
Copy link
Contributor

Hi! Please note it is more of a draft/request for comments than a polished change. E.g. it was only tested with scan_type == "single", so likely there are problems in other regimes

Copy link
Owner

@diegoroyo diegoroyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, thanks a lot for the PR. The tal.render.render module was just one huge function and now it feels much better. I'll need to use tal these days so I'll be able to check if the render function works with different capture types (e.g. confocal or exhaustive). I'll merge the PR when I check that it also works well for these cases.

I added some comments/curiosities of mine, overall I like the result. Thanks again for the work :D

examples/render-reconstruct/nlos-z/nlos-z.yaml Outdated Show resolved Hide resolved
examples/render-reconstruct/nlos-z/nlos-z.yaml Outdated Show resolved Hide resolved
examples/render-reconstruct/nlos-z/nlos-z.yaml Outdated Show resolved Hide resolved
# NOTE: Windows does not support multiprocessing
run_mitsuba_f()
else:
# HACK: on macOS "spawn" method, which is the default since 3.8,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK you are the first macOS user of tal so it's nice to know that it works. Windows gave some problems to other guys in our lab

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And do you remember, by any chance, what those problems were? If it's the same issue, maybe it's better to make a proper fix then?..

tal/render/render.py Outdated Show resolved Hide resolved


@dataclass
class Point2D:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity: is there any special advantage of using Point2D instead of just a tuple, apart from the nicer class name?

Seems fine for me, I'm just asking in case this would be useful in other parts of my projects

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is a bit controversial, initially I made it into a named tuple along the lines of

Point2D = namedtuple('Point2D', 'x y')

But then got an impression that it would be convenient to have numpy conversion methods directly on instances. But it doesn't seem to be the case, so it's probably better to revert to named tuples since they

  • would provide the convenience accessors like pt.x,
  • be compatible with the regular tuples, and
  • require less code (literally a line per type :)

curldivergence and others added 3 commits April 11, 2024 22:54
Co-authored-by: Diego Royo <diego.roymen@gmail.com>
Co-authored-by: Diego Royo <diego.roymen@gmail.com>
@diegoroyo
Copy link
Owner

Thanks a lot for the PR. Recently I had to make some changes to tal.render.render myself which were based on this PR: f7321e2 . So I consider this effectively merged 🙂

@diegoroyo diegoroyo closed this Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants