TensorRT: write image_size to onnx.yaml; fix demo output dir and intrinsics#37
Open
kvnptl wants to merge 1 commit intoNVlabs:masterfrom
Open
TensorRT: write image_size to onnx.yaml; fix demo output dir and intrinsics#37kvnptl wants to merge 1 commit intoNVlabs:masterfrom
kvnptl wants to merge 1 commit intoNVlabs:masterfrom
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
make_onnx.py: When exporting, writeimage_size: [height, width]intoonnx.yamlusing existing--height/--width, so the TensorRT demo knows the engine resolution without guessing.run_demo_tensorrt.py: Onlyrm -rfout_dirwhen it is not the same asonnx_dirandonnx_diris not underout_dir— avoids deleting.enginefiles when both point at e.g.output/. Alwaysos.makedirs(out_dir, exist_ok=True).run_demo_tensorrt.py: Scale intrinsics after resize withK[:2] *= …[:, np.newaxis]so NumPy broadcasts correctly afterfx/fy.Why
image_sizeinonnx.yamlcaused wrong resize vs engine shape and reshape errors.rm -rfout_dirdeleted engine artifacts whenout_dirandonnx_diroverlapped.K[:2] *= [fx, fy]failed with a broadcast error for(2,3)vs(2,).How to verify
make_onnx.pywith--height/--width; confirmonnx.yamlcontainsimage_size.run_demo_tensorrt.pywith--onnx_dir output/and--out_dir output/— engines should remain; run should complete through point cloud.