Skip to content

fix(core): update build-map image metadata loading and imu propagator logging#126

Open
junlinp wants to merge 14 commits intomainfrom
junlinp/build-map-mp4-index
Open

fix(core): update build-map image metadata loading and imu propagator logging#126
junlinp wants to merge 14 commits intomainfrom
junlinp/build-map-mp4-index

Conversation

@junlinp
Copy link
Copy Markdown
Collaborator

@junlinp junlinp commented Apr 29, 2026

Summary

  • fix missing json import used by build_map_node metadata serialization
  • return lazy image loaders from TinyNavDB image accessor path
  • update imu_propagator_node logging behavior in callback path

Type

  • fix(core)

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.14 s (305.9 files/s, 45731.9 lines/s)
Language files blank comment code
Python 13 620 259 3498
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 940 356 4984

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (245.0 files/s, 36547.8 lines/s)
Language files blank comment code
Python 13 620 259 3483
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 940 356 4969

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.13 s (324.1 files/s, 48657.9 lines/s)
Language files blank comment code
Python 13 626 262 3514
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 946 359 5000

@dvorak0
Copy link
Copy Markdown
Member

dvorak0 commented Apr 30, 2026

https://github.com/dmlc/decord useful?

@junlinp
Copy link
Copy Markdown
Collaborator Author

junlinp commented Apr 30, 2026

https://github.com/dmlc/decord useful?

Decord provides efficient random-access capabilities and integrates well with hardware decoders. We also need to generate timestamp-to-frame-index metadata using PyAV. The build-map node only saves the images and does not read them afterward. Decord is therefore a better choice when these images are used to train a model.

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.13 s (327.2 files/s, 49118.1 lines/s)
Language files blank comment code
Python 13 626 262 3514
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 946 359 5000

@junlinp junlinp marked this pull request as ready for review April 30, 2026 03:09
@junlinp junlinp requested a review from dvorak0 April 30, 2026 03:09
@dvorak0
Copy link
Copy Markdown
Member

dvorak0 commented Apr 30, 2026

@junlinp It's too messy to have so much of code doing "writing". Can we have a better one?

Like a in-house package of VideoDB with interface of:

  1. open("infra1") gives a folder infra1
  2. write(timestamp, Image)
  3. read(timestamp, Image)
  4. iter()

So we could hide all timestamp2index inside the video_db.py

It would be great if we do statistics (avg encode/decode time per-frame) inside video_db.py, as I'm concerned about the CPU consumption of encode/decode.

We end up with two kind of DB in the folder: 1. generic key-value shelve DB; 2. key-Image Video DB.

❯ ls -l
.rw-r--r--  136 root 20 Apr 16:22 baseline.npy
.rw-r--r-- 4.0G root 20 Apr 16:22 depths.db
.rw-r--r--  39k root 20 Apr 16:22 edges.npy
.rw-r--r--  11M root 20 Apr 16:22 embeddings.db
.rw-r--r-- 1.3G root 20 Apr 16:22 features.db
.rw-r--r-- 1.0G root 20 Apr 16:22 infra1_images.db
.rw-r--r--  200 root 20 Apr 16:22 intrinsics.npy
.rw-r--r-- 697k root 20 Apr 16:22 mapping_continuous_odom.npy
.rw-r--r-- 4.1k root 20 Apr 16:22 occupancy_2d_image.png
.rw-r--r-- 2.8M root 20 Apr 16:22 occupancy_grid.npy
.rw-r--r--  144 root 20 Apr 16:22 occupancy_meta.npy
.rw-r--r--  451 root 20 Apr 17:44 pois.json
.rw-r--r-- 467k root 20 Apr 16:22 poses.npy
.rw-r--r--  200 root 20 Apr 16:22 rgb_camera_intrinsics.npy
.rw-r--r-- 3.0G root 20 Apr 16:22 rgb_images.db
.rw-r--r--  11M root 20 Apr 16:22 sdf_map.npy
.rw-r--r--  278 root 20 Apr 16:22 T_rgb_to_infra1.npy

to

❯ ls -l
.rw-r--r--  136 root 20 Apr 16:22 baseline.npy
.rw-r--r-- 4.0G root 20 Apr 16:22 depths.db
.rw-r--r--  39k root 20 Apr 16:22 edges.npy
.rw-r--r--  11M root 20 Apr 16:22 embeddings.db
.rw-r--r-- 1.3G root 20 Apr 16:22 features.db
.rw-r--r-- 1.0G root 20 Apr 16:22 infra1_images_db/
.rw-r--r--  200 root 20 Apr 16:22 intrinsics.npy
.rw-r--r-- 697k root 20 Apr 16:22 mapping_continuous_odom.npy
.rw-r--r-- 4.1k root 20 Apr 16:22 occupancy_2d_image.png
.rw-r--r-- 2.8M root 20 Apr 16:22 occupancy_grid.npy
.rw-r--r--  144 root 20 Apr 16:22 occupancy_meta.npy
.rw-r--r--  451 root 20 Apr 17:44 pois.json
.rw-r--r-- 467k root 20 Apr 16:22 poses.npy
.rw-r--r--  200 root 20 Apr 16:22 rgb_camera_intrinsics.npy
.rw-r--r-- 3.0G root 20 Apr 16:22 rgb_images_db/
.rw-r--r--  11M root 20 Apr 16:22 sdf_map.npy
.rw-r--r--  278 root 20 Apr 16:22 T_rgb_to_infra1.npy

infra1_images.db -> infra1_images_db/

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (244.7 files/s, 36856.9 lines/s)
Language files blank comment code
Python 13 625 262 3537
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 945 359 5023

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (249.4 files/s, 37575.2 lines/s)
Language files blank comment code
Python 13 625 262 3538
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 945 359 5024

@junlinp
Copy link
Copy Markdown
Collaborator Author

junlinp commented Apr 30, 2026

image The encoding time for the RGB task is 20 ms in pc

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (249.6 files/s, 37602.8 lines/s)
Language files blank comment code
Python 13 625 262 3538
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 945 359 5024

@dvorak0
Copy link
Copy Markdown
Member

dvorak0 commented Apr 30, 2026

image The encoding time for the RGB task is 20 ms in pc

@junlinp For sure my concern is around the jetson. And would you mind moving VideoDB into tool, so we could make the core code really "core".

@junlinp
Copy link
Copy Markdown
Collaborator Author

junlinp commented Apr 30, 2026

image The encoding time for the RGB task is 20 ms in pc

@junlinp For sure my concern is around the jetson. And would you mind moving VideoDB into tool, so we could make the core code really "core".

I see. I’ve modified the conversion tool to benchmark read performance and integrated VideoDB into the tool to make the core logic cleaner.

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.13 s (320.1 files/s, 47209.4 lines/s)
Language files blank comment code
Python 13 615 262 3414
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
TOML 1 4 0 59
JSON 2 8 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 935 359 4901

@dvorak0
Copy link
Copy Markdown
Member

dvorak0 commented Apr 30, 2026

@junlinp looks good. let me know if it's ready to merge.

@junlinp
Copy link
Copy Markdown
Collaborator Author

junlinp commented Apr 30, 2026

img_v3_02118_884216f3-fcd8-4db0-a61a-ee15cec968hu img_v3_02118_83176e3d-b8bf-4181-a07e-bec1fae2d6hu simple test on jetson,avg read :0.5ms, avg write: 8ms. I think this is acceptable.

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (245.4 files/s, 36259.4 lines/s)
Language files blank comment code
Python 13 615 262 3414
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 31 30 200
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 936 360 4909

@junlinp
Copy link
Copy Markdown
Collaborator Author

junlinp commented Apr 30, 2026

@dvorak0 This PR is ready to be merged, and the Docker image needs to be updated.

@dvorak0
Copy link
Copy Markdown
Member

dvorak0 commented Apr 30, 2026

@junlinp shall we just fail fast when decord is missing. Try catch wont save us.

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.19 s (225.4 files/s, 33296.0 lines/s)
Language files blank comment code
Python 13 615 262 3414
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 31 30 200
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 936 360 4909

@junlinp
Copy link
Copy Markdown
Collaborator Author

junlinp commented Apr 30, 2026

@junlinp shall we just fail fast when decord is missing. Try catch wont save us.

yep.the AI tends to over-defensive programming.

@dvorak0
Copy link
Copy Markdown
Member

dvorak0 commented Apr 30, 2026

@junlinp shall we just fail fast when decord is missing. Try catch wont save us.

yep.the AI tends to over-defensive programming.

@junlinp you can merge this as you want. Note CI fails now.

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