Skip to content

Commit 297c7b5

Browse files
committed
Patch bug if no occlusion
- Crash when try to squeeze occlusion if occlusion is None. Signed-off-by: Valentin Dury <valentin03dury@gmail.com>
1 parent 24ee5b0 commit 297c7b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aloscene/scene_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def from_optical_flow(
123123
if not has_batch:
124124
scene_flow_vector = scene_flow_vector.squeeze(0)
125125
optical_flow = optical_flow.squeeze(0)
126-
occlusion = occlusion.squeeze(0)
126+
occlusion = occlusion.squeeze(0) if occlusion is not None else None
127127

128128
# Create the scene flow object
129129
tensor = cls(

0 commit comments

Comments
 (0)