Can't work in JESTON AGX ORIN
Open
@jantonguirao is already working on this.
Since Jan 21, 2025.
bug
- Dominant language
- Jupyter Notebook
- Stars
- 159
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Version
0.4.0
Describe the bug.
I run the sample code in
But I got some error. I can see the first image, But I can't see the other. Could you give me some advice?
Minimum reproducible example
import os
import numpy as np
from matplotlib import pyplot as plt
from nvidia import nvimgcodec
resources_dir = './'
decoder = nvimgcodec.Decoder()
encoder = nvimgcodec.Encoder()
example_image = np.asarray(decoder.read(resources_dir + "cat-1046544_640.jp2").cpu())
plt.title(f"original image, size: {example_image.size // 1000}KB")
plt.imshow(example_image)
plt.show()
for extension in ["jpeg", "jpeg2k", "webp"]:
if extension == "jpeg2k":
# if Jpeg2kEncodeParams are ommited, reversible=False is assumed and target_psnr controls quality
encode_params = nvimgcodec.EncodeParams(target_psnr=27)
else:
# Other codecs use quality
encode_params = nvimgcodec.EncodeParams(quality=5)
encoded = encoder.encode(example_image, extension, encode_params)
decoded = np.asarray(decoder.decode(encoded).cpu())
plt.title(f"codec: {extension}, size: {len(encoded) // 1000}KB")
plt.imshow(decoded)
plt.show()
Environment details
jeston AGX Orin
L4T 36.4.3
Relevant log output
[ERROR] [nvjpeg2k_decoder] Could not decode jpeg2k code stream - nvjpeg2k error #6 (execution failed) when running nvjpeg2kDecodeImage(handle_, jpeg2k_state, t.nvjpeg2k_stream_, decode_params_raii.get(), &output_image, image_info.cuda_stream) at /home/jenkins/agent/workspace/nvimagecodec/helpers/release_v0.4.0/Release_12/build/extensions/nvjpeg2k/cuda_decoder.cpp:650
[ERROR] [nvjpeg_cuda_encoder] Could not encode jpeg code stream - nvjpeg error #6 (execution failed) when running nvjpegEncodeImage(handle_, state, encode_params.get(), &input_image, input_format, image_info.plane_info[0].width, image_info.plane_info[0].height, image_info.cuda_stream) at /home/jenkins/agent/workspace/nvimagecodec/helpers/release_v0.4.0/Release_12/build/extensions/nvjpeg/cuda_encoder.cpp:425
Fatal Python error: Segmentation fault
Thread 0x0000ffffa938f120 (most recent call first):
File "/usr/lib/python3.10/threading.py", line 324 in wait
File "/usr/lib/python3.10/threading.py", line 607 in wait
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/pydevd.py", line 325 in _on_run
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 53 in run
File "/usr/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
File "/usr/lib/python3.10/threading.py", line 973 in _bootstrap
Thread 0x0000ffffa9b9f120 (most recent call first):
File "/usr/lib/python3.10/threading.py", line 324 in wait
File "/usr/lib/python3.10/threading.py", line 607 in wait
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/pydevd.py", line 279 in _on_run
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 53 in run
File "/usr/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
File "/usr/lib/python3.10/threading.py", line 973 in _bootstrap
Thread 0x0000ffffaa3af120 (most recent call first):
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 227 in _read_line
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 245 in _on_run
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 53 in run
File "/usr/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
File "/usr/lib/python3.10/threading.py", line 973 in _bootstrap
Thread 0x0000ffffaabbf120 (most recent call first):
File "/usr/lib/python3.10/threading.py", line 324 in wait
File "/usr/lib/python3.10/queue.py", line 180 in get
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 390 in _on_run
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 53 in run
File "/usr/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
File "/usr/lib/python3.10/threading.py", line 973 in _bootstrap
Current thread 0x0000ffffac441a60 (most recent call first):
File "/data/DeltaElect/ubuntu2204/sensors_plat_ws/src/debug.py", line 23 in <module>
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118 in _run_code
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127 in _run_module_code
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310 in run_path
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 351 in run_file
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 501 in main
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.14.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 71 in <module>
File "/usr/lib/python3.10/runpy.py", line 86 in _run_code
File "/usr/lib/python3.10/runpy.py", line 196 in _run_module_as_main
Other/Misc.
No response
Check for duplicates
- I have searched the open bugs/issues and have found no duplicates for this bug report
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.