Closed z14git closed 5 years ago
Are you able to view the camera feed with nvgstcapture program?
From: z14git notifications@github.com Sent: Wednesday, June 26, 2019 3:40 AM To: dusty-nv/jetson-inference jetson-inference@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [dusty-nv/jetson-inference] fail to run ./imagenet-camera googlenet on jetson nano (#345)
I follow the instruction step by step. I can run the ./imagenet-console orange_0.jpg output_0.jpg command successfully. I also build the my-recognition program and run the command ./my-recognition polar_bear.jpg successfully. However, when i try to run ./imagenet-camera googlenet , it fails.
My camera's information:
nocits@nocits-desktop:~/jetson-inference/build/aarch64/bin$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'RG10'
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 3280x2464
Interval: Discrete 0.048s (21.000 fps)
Size: Discrete 3280x1848
Interval: Discrete 0.036s (28.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
nocits@nocits-desktop:~/jetson-inference/build/aarch64/bin$ v4l2-ctl --list-devices --list-formats
vi-output, imx219 6-0010 (platform:54080000.vi:0):
/dev/video0
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'RG10'
Name : 10-bit Bayer RGRG/GBGB
Here is the information when i run ./imagenet-camera googlenet :
nocits@nocits-desktop:~/jetson-inference/build/aarch64/bin$ ./imagenet-camera googlenet
imagenet-camera
args (2): 0 [./imagenet-camera] 1 [googlenet]
[gstreamer] initialized gstreamer, version 1.14.1.0
[gstreamer] gstCamera attempting to initialize with GST_SOURCE_NVCAMERA
[gstreamer] gstCamera pipeline string:
nvcamerasrc fpsRange="30.0 30.0" ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12 ! nvvidconv flip-method=2 ! video/x-raw ! appsink name=mysink
[gstreamer] gstCamera failed to create pipeline
[gstreamer] (no element "nvcamerasrc")
[gstreamer] failed to init gstCamera (GST_SOURCE_NVCAMERA)
[gstreamer] gstCamera attempting to initialize with GST_SOURCE_NVARGUS
[gstreamer] gstCamera pipeline string:
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=30/1, format=(string)NV12 ! nvvidconv flip-method=2 ! video/x-raw ! appsink name=mysink
[gstreamer] gstCamera successfully initialized with GST_SOURCE_NVARGUS
imagenet-camera: successfully initialized video device
width: 1280
height: 720
depth: 12 (bpp)
imageNet -- loading classification network model from:
-- prototxt networks/googlenet.prototxt
-- model networks/bvlc_googlenet.caffemodel
-- class_labels networks/ilsvrc12_synset_words.txt
-- input_blob 'data'
-- output_blob 'prob'
-- batch_size 2
[TRT] TensorRT version 5.0.6
[TRT] detected model format - caffe (extension '.caffemodel')
[TRT] desired precision specified for GPU: FASTEST
[TRT] requested fasted precision for device GPU without providing valid calibrator, disabling INT8
[TRT] native precisions detected for GPU: FP32, FP16
[TRT] selecting fastest native precision for GPU: FP16
[TRT] attempting to open engine cache file networks/bvlc_googlenet.caffemodel.2.1.GPU.FP16.engine
[TRT] loading network profile from engine cache... networks/bvlc_googlenet.caffemodel.2.1.GPU.FP16.engine
[TRT] device GPU, networks/bvlc_googlenet.caffemodel loaded
[TRT] device GPU, CUDA engine context initialized with 2 bindings
[TRT] binding -- index 0
-- name 'data'
-- type FP32
-- in/out INPUT
-- # dims 3
-- dim #0 3 (CHANNEL)
-- dim #1 224 (SPATIAL)
-- dim #2 224 (SPATIAL)
[TRT] binding -- index 1
-- name 'prob'
-- type FP32
-- in/out OUTPUT
-- # dims 3
-- dim #0 1000 (CHANNEL)
-- dim #1 1 (SPATIAL)
-- dim #2 1 (SPATIAL)
[TRT] binding to input 0 data binding index: 0
[TRT] binding to input 0 data dims (b=2 c=3 h=224 w=224) size=1204224
[cuda] cudaAllocMapped 1204224 bytes, CPU 0x100e30000 GPU 0x100e30000
[TRT] binding to output 0 prob binding index: 1
[TRT] binding to output 0 prob dims (b=2 c=1000 h=1 w=1) size=8000
[cuda] cudaAllocMapped 8000 bytes, CPU 0x100f60000 GPU 0x100f60000
device GPU, networks/bvlc_googlenet.caffemodel initialized.
[TRT] networks/bvlc_googlenet.caffemodel loaded
imageNet -- loaded 1000 class info entries
networks/bvlc_googlenet.caffemodel initialized.
default X screen 0: 2560 x 1440
[OpenGL] glDisplay display window initialized
[OpenGL] creating 1280x720 texture
loaded image fontmapA.png (256 x 512) 2097152 bytes
[cuda] cudaAllocMapped 2097152 bytes, CPU 0x101060000 GPU 0x101060000
[cuda] cudaAllocMapped 8192 bytes, CPU 0x100f62000 GPU 0x100f62000
[gstreamer] gstreamer transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter2
[gstreamer] gstreamer changed state from NULL to READY ==> nvvconv1
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter1
[gstreamer] gstreamer changed state from NULL to READY ==> nvarguscamerasrc0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline1
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter2
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvvconv1
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter1
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvarguscamerasrc0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline1
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer msg new-clock ==> pipeline1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvvconv1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvarguscamerasrc0
[gstreamer] gstreamer msg stream-start ==> pipeline1
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:532 Failed to create CaptureSession
imagenet-camera: camera open for streaming
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
[cuda] registered 14745600 byte openGL texture for interop access (1280x720)
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
^Creceived SIGINT ###### i type Ctrl-C here
imagenet-camera: failed to capture frame
imagenet-camera: failed to convert from NV12 to RGBA
[TRT] imageNet::Classify( 0x(nil), 1280, 720 ) -> invalid parameters
[cuda] cudaNormalizeRGBA((float4)imgRGBA, make_float2(0.0f, 255.0f), (float4)imgRGBA, make_float2(0.0f, 1.0f), camera->GetWidth(), camera->GetHeight())
[cuda] invalid device pointer (error 17) (hex 0x11)
[cuda] /home/nocits/jetson-inference/imagenet-camera/imagenet-camera.cpp:193
imagenet-camera: un-initializing video device
imagenet-camera: video device has been un-initialized.
imagenet-camera: this concludes the test of the video device.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/jetson-inference/issues/345?email_source=notifications&email_token=ADVEGK62EITCBG6FUELWPY3P4MMMTA5CNFSM4H3PLRZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G3XNLEA, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADVEGK2DQGIECCSONPMOHA3P4MMMTANCNFSM4H3PLRZQ.
I can see the camera feed with nvgstcapture program. Here is some inforamtion when i exec nvgstcapture program.
nocits@nocits-desktop:~$ nvgstcapture
Encoder null, cannot set bitrate!
Encoder Profile = High
##### i get rid of some usage information #####
bitrate = 4000000
Encoder Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
** Message: 08:50:57.887: <main:4564> iterating capture loop ....
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 100, Level = 40
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: PowerService: requested_clock_Hz=2016000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
q^C** Message: 08:51:29.847: <_intr_handler:4162> User Interrupted..
Terminating the camera pipeline ...
GST_ARGUS: Cleaning up
GST_ARGUS:
PowerServiceHwVic::cleanupResources
CONSUMER: Done Success
GST_ARGUS: Done Success
** Message: 08:51:30.391: <main:4574> Capture completed
** Message: 08:51:30.391: <main:4623> Camera application will now exit
I follow the instruction step by step. I can run the
./imagenet-console orange_0.jpg output_0.jpg
command successfully. I also build the my-recognition program and run the command./my-recognition polar_bear.jpg
successfully. However, when i try to run./imagenet-camera googlenet
, it fails.My camera's information:
Here is the information when i run
./imagenet-camera googlenet
: