I have transformed my Mask R-CNN .h5 file to .uff file on the host and want to run inference on AGX Xavier. At first, I choose Jetpack4.2 within tensorrt 5.1 to run it and terminal reports error:
[TensorRT] ERROR: UffParser: Validator error: roi_align_mask_trt: Unsupported opeartion _PyramidROIAlign_TRT
[TensorRT] ERROR: Network must have at least one output
I refer to your plugin in release5.0 and find that it may not support some layers in Mask R-CNN. Hence, I update my Xavier to Jetpack4.3 within tensorrt 6.0 and retry running inference. However, the error still exist. Does it mean that I need to build tensorrt OSS not only on host but also on AGX Xavier?
edit: See below comment instead
https://github.com/NVIDIA/TensorRT/issues/244#issuecomment-561031150
I have got confused by the instructions. Does the same location mean that I need to copy files from build/out to $TRT_SOURCE directly or $TRT_RELEASE/lib or a blank build file under $TRT_SOURCE on target device?
I copy the files from build/out to Xavier and add their path to ~/.bashrc. Then I run sudo ./sample_uff_maskRCNN -d /home/nvidia/Mask_RCNN --fp16 and it throws out the following error:
./sample_uff_maskRCNN: 1: ./sample_uff_maskRCNN: Syntax error: "(" unexpected
The error is plain enough and I do not know how to solve it.
Hi @Programmakememad,
Your error is likely due to compiling for an incompatible architecture, ex: x86 vs. ARM, though I'm not positive on that.
Yes, it is most likely that the Xavier cannot support the compiled files from the host without cross compilation. I am trying to refer to
Building The TensorRT OSS Components
and using parameter CMAKE_TOOLCHAIN_FILE to perform cross compilation.
I try to add cmake_aarch64.toolchain under TensorRT/cmake to parameters of cmake and cmake is configured. Then I make it and find errors:
/home/jhm/TensorRT-6.0.1.5/lib/libnvinfer.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
parsers/onnx/CMakeFiles/nvonnxparser_runtime.dir/build.make:146: recipe for target 'out/libnvonnxparser_runtime.so.6.0.1' failed
make[2]: *** [out/libnvonnxparser_runtime.so.6.0.1] Error 1
CMakeFiles/Makefile2:1087: recipe for target 'parsers/onnx/CMakeFiles/nvonnxparser_runtime.dir/all' failed
make[1]: *** [parsers/onnx/CMakeFiles/nvonnxparser_runtime.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
I have no idea how to fix this problem in cross compiler. Could anyone give some suggestions?
I try to build it on Xavier with the professional tuturial https://devtalk.nvidia.com/default/topic/1067542/jetson-agx-xavier/indexerror-list-index-out-of-range-object-detection-and-instance-segmentations-with-a-tensorflow-ma-/post/5409680/#5409680 . Although I follow it step by step, there are still some errors:
-- The C compiler identification is GNU 7.4.0
-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
CMake Error at CMakeLists.txt:12 (project):
No CMAKE_C_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Check for working C compiler: /usr/bin/gcc
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "/home/nvidia/TensorRT/build/third_party.protobuf_aarch64/src/third_party.protobuf_aarch64/CMakeFiles/CMakeOutput.log".
See also "/home/nvidia/TensorRT/build/third_party.protobuf_aarch64/src/third_party.protobuf_aarch64/CMakeFiles/CMakeError.log".
CMakeFiles/third_party.protobuf_aarch64.dir/build.make:108: recipe for target 'third_party.protobuf_aarch64/src/third_party.protobuf_aarch64-stamp/third_party.protobuf_aarch64-configure' failed
make[2]: *** [third_party.protobuf_aarch64/src/third_party.protobuf_aarch64-stamp/third_party.protobuf_aarch64-configure] Error 1
CMakeFiles/Makefile2:173: recipe for target 'CMakeFiles/third_party.protobuf_aarch64.dir/all' failed
make[1]: *** [CMakeFiles/third_party.protobuf_aarch64.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.11")
CMake Warning (dev) at install.cmake:41 (message):
The file
"/home/nvidia/TensorRT/build/third_party.protobuf/src/third_party.protobuf/src/google/protobuf/repeated_field_reflection.h"
is listed in
"/home/nvidia/TensorRT/build/third_party.protobuf/src/third_party.protobuf/cmake/cmake/extract_includes.bat.in"
but there not exists. The file will not be installed.
Call Stack (most recent call first):
CMakeLists.txt:169 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
[ 39%] Completed 'third_party.protobuf'
[ 39%] Built target third_party.protobuf
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
So why does it not work?
This problem has been solved by your stuff. I just put the link here
and anyone who meets the same problem could refer to it.