-
Notifications
You must be signed in to change notification settings - Fork 6
Scene flow #204
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
Merged
Merged
Scene flow #204
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ Scene flow class on aloscene. + Classmethod to create sceneflow from optical flow, depth and intrinsic. + Function to load scene flow from a numpy file. Signed-off-by: Valentin Dury <[email protected]>
- For loop in points 3d to generate scene flow. + Numpy operation to calculate the scene flow. + Vertical and horizontal flip functions. Signed-off-by: Valentin Dury <[email protected]>
jsalotti
suggested changes
Jul 19, 2022
+ Use loop to correctly create scene flow - Flip on Z axis. Signed-off-by: Valentin Dury <[email protected]>
+ Translate every point a T+1 by the optical flow. + Numpy array indexing instead of for loop. Signed-off-by: Valentin Dury <[email protected]>
jsalotti
reviewed
Jul 21, 2022
jsalotti
reviewed
Jul 21, 2022
jsalotti
reviewed
Jul 21, 2022
+ Get the value of the scene flow with the mean of the 4 points around. + Reshape directly from the array. + Better name for variables. Signed-off-by: Valentin Dury <[email protected]>
+ Scene flow classmethod 'from_optical_flow' can now handle batch dimension. Signed-off-by: Valentin Dury <[email protected]>
+ Use grid_sample function to calculate scene flow to have a better precision than with the mean value. Signed-off-by: Valentin Dury <[email protected]>
jsalotti
suggested changes
Jul 25, 2022
- Error in calculation + Use only pytorch to create scene flow. Signed-off-by: Valentin Dury <[email protected]>
+ Compute the scene flow occlusion from the parameters occlusion and and calculation method. Signed-off-by: Valentin Dury <[email protected]>
jsalotti
suggested changes
Jul 28, 2022
+ Occlusion can be None if any parameters have occlusion. + Grid sample precision is verify only with occlusion of the depth at T+1. + Rename parameter 'mode' to 'sampling' and add it in the docstring. Signed-off-by: Valentin Dury <[email protected]>
- Useless operation. Signed-off-by: Valentin Dury <[email protected]>
jsalotti
approved these changes
Jul 28, 2022
Data-Iab
requested changes
Jul 28, 2022
+ Move 'load_scene_flow' to 'aloscene/io/flow'. + Better docstring + Test batch dimentions existance with the tensor names. Signed-off-by: Valentin Dury <[email protected]>
+ Verify if file extension is .npy. + Better docstring. + Occlusion is of type None by default. Signed-off-by: Valentin Dury <[email protected]>
- Useless variable. Signed-off-by: Valentin Dury <[email protected]>
Data-Iab
approved these changes
Jul 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job
Thanks, can you add a quick/simple example on how to use it in the description ? So that I can add it to the next release ? I'll merge after @Ardorax |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Scene flow class
Create scene flow by calling the class with a file path, a tensor or a ndarray.
If you have optical flow, depth at time T and T + 1 and the camera intrinsic. You can create scene flow with the class method
from_optical_flow
. It handle the creation of the occlusion mask if some parameters have one.