Can't work in JESTON AGX ORIN

Aberta
#26 16 comentários 0 reações 1 responsável Ver no GitHub

@jantonguirao já está trabalhando nisso.

Desde 21/1/2025.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

bug
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
Linguagem predominante
Jupyter Notebook
Estrelas
164
Forks
26
Merge médio
27min
PRs com merge (30d)
1

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de NVIDIA/nvImageCodec

Todas as issues de NVIDIA/nvImageCodec

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.