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

The explanation of dpviewer #17

Open
HibanaSledge opened this issue Dec 5, 2024 · 3 comments
Open

The explanation of dpviewer #17

HibanaSledge opened this issue Dec 5, 2024 · 3 comments

Comments

@HibanaSledge
Copy link

Really appreciated for your contribution.

Right now I am trying to using the model to test for my own data, and with the parameter of "evs","viz","viz_flow" both set as string, there is a wrong in the terminal saying "No module named dpviewer" in devo.py.

However I cannot find any information about it. Can you please provide me something about it?

Really appreciated!

@motzet
Copy link
Collaborator

motzet commented Jan 13, 2025

Hi,

The parameter viz should be set to false because we are not using the dpviewer (Pangolin). The parameter evs must be true. I will update it accordingly. You can see how to call DEVO here:

DEVO/utils/eval_utils.py

Lines 109 to 139 in 93801a4

@torch.no_grad()
def run_voxel(voxeldir, cfg, network, viz=False, iterator=None, timing=False, H=480, W=640, viz_flow=False, scale=1.0, **kwargs):
slam = DEVO(cfg, network, evs=True, ht=H, wd=W, viz=viz, viz_flow=viz_flow, **kwargs)
for i, (voxel, intrinsics, t) in enumerate(iterator):
if timing and i == 0:
t0 = torch.cuda.Event(enable_timing=True)
t1 = torch.cuda.Event(enable_timing=True)
t0.record()
if viz:
# import matplotlib.pyplot as plt
# plt.switch_backend('Qt5Agg')
visualize_voxel(voxel.detach().cpu())
with Timer("DEVO", enabled=timing):
slam(t, voxel, intrinsics, scale=scale)
for _ in range(12):
slam.update()
poses, tstamps = slam.terminate()
if timing:
t1.record()
torch.cuda.synchronize()
dt = t0.elapsed_time(t1)/1e3
print(f"{voxeldir}\nDEVO Network {i+1} frames in {dt} sec, e.g. {(i+1)/dt} FPS")
flowdata = slam.flow_data if viz_flow else None
return poses, tstamps, flowdata

When viz_flow=True, the selected patches k of the current voxel grid i are visualized, and their projected (predicted) flow onto the adjacent grids j is shown. This visualization is time-consuming.

@motzet
Copy link
Collaborator

motzet commented Jan 13, 2025

I have attached a figure showing flow_viz (predicted flow visualization) of rpg_bin. Center is the current voxel grid i. The black 3x3 dots visualize the patches.

t00088

@HibanaSledge
Copy link
Author

Ok,I see it. Really appreciated for your reply!

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

No branches or pull requests

2 participants