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

Pixel Kernels (1/2): Color Kernels #147

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

horizon-blue
Copy link
Contributor

This PR implements the first piece of the new image kernel: the per-pixel kernels that generates the observed color given the latent (when available), as outlined in this Notion card. The organization of the kernels may still subject to changes as we start to connect the different pieces together.

Test Plan

I've added some unit tests to make sure that the kernels roughly have the behaviors that we expected:

pytest tests/gen3d/test_pixel_color_kernels.py

@horizon-blue horizon-blue force-pushed the xyw/gen3d/color-pixel-kernel branch from d2c8919 to 66a3c56 Compare September 9, 2024 05:44
@horizon-blue horizon-blue merged commit 56ddf51 into main Sep 9, 2024
7 checks passed
@horizon-blue horizon-blue deleted the xyw/gen3d/color-pixel-kernel branch September 9, 2024 06:43
@georgematheos
Copy link
Collaborator

This looks so good!

horizon-blue added a commit that referenced this pull request Sep 9, 2024
This PR implements the second piece of the new image kernel: the
per-pixel kernels that generates the observed depth given the latent
(when available), as outlined [in this Notion
card](https://www.notion.so/chi-mit/Sep-9-Track-2-Image-Kernel-Deliverables-70f1490053564db7b4ab3197447f7aaa?pvs=4).
The organization of the kernels roughly follows the same structure as
the previous PR: #147

## Test Plan

I've added some unit tests to make sure that the kernels roughly have
the behaviors that we expected:

```bash
pytest pytest tests/gen3d/test_pixel_depth_kernels.py
```
horizon-blue added a commit that referenced this pull request Sep 10, 2024
While working on the image kernels, I realized that it might be useful
to have a unified class that sample the RGBD values jointly, so I'm
introducing this utility class that takes in an color kernel (from
#147) and a depth kernel (from
#149) to create an RGBD kernel,
which supports sample and logpdf computation.

This is a general class that's agnostic of the type of RGB and depth
kernels -- it'll pass in the arguments it receives to _both_ of the
kernels during `sample` and `logpdf` call. Since both color and depth
kernels have `*args, **kwargs` as part of their function signature, they
should simply ignore additional arguments that's not relevant to them.

(I also just realized that I was referring to these classes as "kernels"
but the actual class names are `*Distributions`... maybe I should fix
these in a future PR.)

I'm submitting this PR to `main` for now. Once I'm wrapping up my local
changes, I'm going to work on resolving merge conflicts with `gen3d`.

## Test Plan

Similar to the previous PRs, I've added some unit tests to make sure
that the kernels roughly have the behaviors that we expected:

```bash
pytest tests/gen3d/test_pixel_rgbd_kernels.py
```
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