Open Moresweet opened 2 years ago
Hi @Moresweet, you shouldn't need to manually edit gstCamera.cpp anymore, you can just run the programs with --input-flip=rotate-180
argument: https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-streaming.md#input-options
Thanks for your reply. But it shows same scene above when I use "--input-flip=rotate-180
". Although the image frame is inverse, it only has one static image and output errors.
Can you try other --input-flip settings to see if they have any impact?
Can you provide the console log with the errors? Thanks.
From: Moresweet @.> Sent: Tuesday, February 15, 2022 8:20:47 PM To: dusty-nv/jetson-utils @.> Cc: Dustin Franklin @.>; Comment @.> Subject: Re: [dusty-nv/jetson-utils] How to reverse the vedio stream (Issue #113)
Thanks for your reply. But it shows same scene above when I use "--input-flip=rotate-180". Although the image frame is inverse, it only has one static image and output errors.
— Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/jetson-utils/issues/113#issuecomment-1040992585, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVEGK2JWQP4UTXPA7LXI23U3L3W7ANCNFSM5ON7ZLVA. Triage notifications on the go with GitHub Mobile for iOShttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cdustinf%40nvidia.com%7C6e3e11d20c5e4ee9ce1b08d9f0ea9017%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637805712499060699%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=hGW16wix2ATqT2ZR8m%2B15QdS9sDj56Dy%2Fsz7cQChLS4%3D&reserved=0 or Androidhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cdustinf%40nvidia.com%7C6e3e11d20c5e4ee9ce1b08d9f0ea9017%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637805712499060699%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=UGblj%2Bk0sQ9moWs1ldM9kqtf9L6pVIzUNXiuheadQzk%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>
Thank you. I try all the '--input-flip' paramters. Except of --input-flip=rotate-180
, others all sucessful pass. When I use --input-flip=rotate-180
the error logs follow:
[gstreamer] initialized gstreamer, version 1.14.5.0
[gstreamer] gstCamera -- attempting to create device csi://0
[gstreamer] gstCamera pipeline string:
[gstreamer] nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=30/1, format=(string)NV12 ! nvvidconv flip-method=0 ! video/x-raw(memory:NVMM) ! appsink name=mysink
[gstreamer] gstCamera successfully created device csi://0
[0;32m[video] created gstCamera from csi://0
[0m------------------------------------------------
gstCamera video options:
------------------------------------------------
-- URI: csi://0
- protocol: csi
- location: 0
-- deviceType: csi
-- ioType: input
-- codec: raw
-- width: 1280
-- height: 720
-- frameRate: 30.000000
-- bitRate: 0
-- numBuffers: 4
-- zeroCopy: true
-- flipMethod: none
-- loop: 0
-- rtspLatency 2000
------------------------------------------------
[OpenGL] glDisplay -- X screen 0 resolution: 640x480
[OpenGL] glDisplay -- X window resolution: 640x480
[OpenGL] glDisplay -- display device initialized (640x480)
[0;32m[video] created glDisplay from display://0
[0m------------------------------------------------
glDisplay video options:
------------------------------------------------
-- URI: display://0
- protocol: display
- location: 0
-- deviceType: display
-- ioType: output
-- codec: raw
-- width: 640
-- height: 480
-- frameRate: 0.000000
-- bitRate: 0
-- numBuffers: 4
-- zeroCopy: true
-- flipMethod: none
-- loop: 0
-- rtspLatency 2000
------------------------------------------------
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 1
[TRT] TensorRT version 8.0.1
[TRT] loading NVIDIA plugins...
[TRT] Registered plugin creator - ::GridAnchor_TRT version 1
[TRT] Registered plugin creator - ::GridAnchorRect_TRT version 1
[TRT] Registered plugin creator - ::NMS_TRT version 1
[TRT] Registered plugin creator - ::Reorg_TRT version 1
[TRT] Registered plugin creator - ::Region_TRT version 1
[TRT] Registered plugin creator - ::Clip_TRT version 1
[TRT] Registered plugin creator - ::LReLU_TRT version 1
[TRT] Registered plugin creator - ::PriorBox_TRT version 1
[TRT] Registered plugin creator - ::Normalize_TRT version 1
[TRT] Registered plugin creator - ::ScatterND version 1
[TRT] Registered plugin creator - ::RPROI_TRT version 1
[TRT] Registered plugin creator - ::BatchedNMS_TRT version 1
[TRT] Registered plugin creator - ::BatchedNMSDynamic_TRT version 1
[0;31m[TRT] Could not register plugin creator - ::FlattenConcat_TRT version 1
[0m[TRT] Registered plugin creator - ::CropAndResize version 1
[TRT] Registered plugin creator - ::DetectionLayer_TRT version 1
[TRT] Registered plugin creator - ::EfficientNMS_ONNX_TRT version 1
[TRT] Registered plugin creator - ::EfficientNMS_TRT version 1
[TRT] Registered plugin creator - ::Proposal version 1
[TRT] Registered plugin creator - ::ProposalLayer_TRT version 1
[TRT] Registered plugin creator - ::PyramidROIAlign_TRT version 1
[TRT] Registered plugin creator - ::ResizeNearest_TRT version 1
[TRT] Registered plugin creator - ::Split version 1
[TRT] Registered plugin creator - ::SpecialSlice_TRT version 1
[TRT] Registered plugin creator - ::InstanceNormalization_TRT version 1
[TRT] detected model format - caffe (extension '.caffemodel')
[TRT] desired precision specified for GPU: FASTEST
[0;33m[TRT] requested fasted precision for device GPU without providing valid calibrator, disabling INT8
[0m[TRT] [MemUsageChange] Init CUDA: CPU +198, GPU +0, now: CPU 231, GPU 2978 (MiB)
[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.1.1.8001.GPU.FP16.engine
[TRT] loading network plan from engine cache... networks/bvlc_googlenet.caffemodel.1.1.8001.GPU.FP16.engine
[0;32m[TRT] device GPU, loaded networks/bvlc_googlenet.caffemodel
[0m[TRT] [MemUsageChange] Init CUDA: CPU +0, GPU +0, now: CPU 251, GPU 2999 (MiB)
[TRT] Loaded engine size: 20 MB
[TRT] [MemUsageSnapshot] deserializeCudaEngine begin: CPU 251 MiB, GPU 2999 MiB
[TRT] Using cublas a tactic source
[TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +158, GPU +160, now: CPU 409, GPU 3159 (MiB)
[TRT] Using cuDNN as a tactic source
[TRT] [MemUsageChange] Init cuDNN: CPU +241, GPU +244, now: CPU 650, GPU 3403 (MiB)
[TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +0, now: CPU 650, GPU 3403 (MiB)
[TRT] Deserialization required 3521637 microseconds.
[TRT] [MemUsageSnapshot] deserializeCudaEngine end: CPU 650 MiB, GPU 3403 MiB
[TRT] [MemUsageSnapshot] ExecutionContext creation begin: CPU 650 MiB, GPU 3403 MiB
[TRT] Using cublas a tactic source
[TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +0, now: CPU 650, GPU 3403 (MiB)
[TRT] Using cuDNN as a tactic source
[TRT] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 650, GPU 3403 (MiB)
[TRT] Total per-runner device memory is 14754304
[TRT] Total per-runner host memory is 88288
[TRT] Allocated activation device memory of size 3612672
[TRT] [MemUsageSnapshot] ExecutionContext creation end: CPU 650 MiB, GPU 3403 MiB
[TRT]
[TRT] CUDA engine context initialized on device GPU:
[TRT] -- layers 68
[TRT] -- maxBatchSize 1
[TRT] -- deviceMemory 3612672
[TRT] -- bindings 2
[TRT] binding 0
-- index 0
-- name 'data'
-- type FP32
-- in/out INPUT
-- # dims 3
-- dim #0 3
-- dim #1 224
-- dim #2 224
[TRT] binding 1
-- index 1
-- name 'prob'
-- type FP32
-- in/out OUTPUT
-- # dims 3
-- dim #0 1000
-- dim #1 1
-- dim #2 1
[TRT]
[TRT] binding to input 0 data binding index: 0
[TRT] binding to input 0 data dims (b=1 c=3 h=224 w=224) size=602112
[TRT] binding to output 0 prob binding index: 1
[TRT] binding to output 0 prob dims (b=1 c=1000 h=1 w=1) size=4000
[TRT]
[0;32m[TRT] device GPU, networks/bvlc_googlenet.caffemodel initialized.
[0m[TRT] imageNet -- loaded 1000 class info entries
[0;32m[TRT] imageNet -- networks/bvlc_googlenet.caffemodel initialized.
[0m[gstreamer] opening gstCamera for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter1
[gstreamer] gstreamer changed state from NULL to READY ==> nvvconv0
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter0
[gstreamer] gstreamer changed state from NULL to READY ==> nvarguscamerasrc0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter1
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvvconv0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvarguscamerasrc0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer message new-clock ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvvconv0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvarguscamerasrc0
[gstreamer] gstreamer message stream-start ==> pipeline0
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 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: 3264 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: 1640 x 1232 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 = 5
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[gstreamer] gstCamera -- onPreroll
[gstreamer] gstBufferManager recieve caps: video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1
[gstreamer] gstBufferManager -- recieved first frame, codec=raw format=nv12 width=1280 height=720 size=1008
[gstreamer] gstBufferManager -- recieved NVMM memory
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink
[gstreamer] gstreamer message async-done ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> mysink
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> pipeline0
RingBuffer -- allocated 4 buffers (2764800 bytes each, 11059200 bytes total)
class 0412 - 0.011528 (ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin)
class 0421 - 0.048523 (bannister, banister, balustrade, balusters, handrail)
class 0446 - 0.010910 (binder, ring-binder)
class 0475 - 0.012268 (car mirror)
class 0478 - 0.016830 (carton)
class 0519 - 0.011482 (crate)
class 0534 - 0.024307 (dishwasher, dish washer, dishwashing machine)
class 0556 - 0.010872 (fire screen, fireguard)
class 0579 - 0.017303 (grand piano, grand)
class 0580 - 0.021027 (greenhouse, nursery, glasshouse)
class 0620 - 0.010094 (laptop, laptop computer)
class 0632 - 0.018631 (loudspeaker, speaker, speaker unit, loudspeaker system, speaker system)
class 0651 - 0.028976 (microwave, microwave oven)
class 0664 - 0.015625 (monitor)
class 0669 - 0.011749 (mosquito net)
class 0743 - 0.043152 (prison, prison house)
class 0760 - 0.019150 (refrigerator, icebox)
class 0791 - 0.017303 (shopping cart)
class 0799 - 0.024017 (sliding door)
class 0807 - 0.030487 (solar dish, solar collector, solar furnace)
class 0811 - 0.021362 (space heater)
class 0815 - 0.015152 (spider web, spider's web)
class 0818 - 0.010704 (spotlight, spot)
class 0859 - 0.012367 (toaster)
class 0879 - 0.014397 (umbrella)
class 0881 - 0.010658 (upright, upright piano)
class 0904 - 0.071716 (window screen)
class 0905 - 0.042999 (window shade)
imagenet: 7.17163% class #904 (window screen)
[OpenGL] glDisplay -- set the window size to 640x480
[OpenGL] creating 1280x720 texture (GL_RGB8 format, 2764800 bytes)
[cuda] registered openGL texture for interop access (1280x720, GL_RGB8, 2764800 bytes)
[TRT] ------------------------------------------------
[TRT] Timing Report networks/bvlc_googlenet.caffemodel
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.06281ms CUDA 1.70578ms
[TRT] Network CPU 88.60416ms CUDA 75.72511ms
[TRT] Post-Process CPU 0.22203ms CUDA 0.22198ms
[TRT] Total CPU 88.88901ms CUDA 77.65286ms
[TRT] ------------------------------------------------
[0;33m[TRT] note -- when processing a single image, run 'sudo jetson_clocks' before
to disable DVFS for more accurate profiling/timing measurements
[0mclass 0412 - 0.015732 (ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin)
class 0421 - 0.052216 (bannister, banister, balustrade, balusters, handrail)
class 0446 - 0.011559 (binder, ring-binder)
class 0475 - 0.011833 (car mirror)
class 0478 - 0.013893 (carton)
class 0519 - 0.012947 (crate)
class 0534 - 0.017899 (dishwasher, dish washer, dishwashing machine)
class 0556 - 0.011246 (fire screen, fireguard)
class 0579 - 0.016296 (grand piano, grand)
class 0580 - 0.021942 (greenhouse, nursery, glasshouse)
class 0620 - 0.013252 (laptop, laptop computer)
class 0632 - 0.023087 (loudspeaker, speaker, speaker unit, loudspeaker system, speaker system)
class 0651 - 0.023621 (microwave, microwave oven)
class 0664 - 0.014275 (monitor)
class 0681 - 0.014221 (notebook, notebook computer)
class 0743 - 0.044312 (prison, prison house)
class 0760 - 0.017014 (refrigerator, icebox)
class 0771 - 0.010406 (safe)
class 0791 - 0.012451 (shopping cart)
class 0799 - 0.031174 (sliding door)
class 0807 - 0.039886 (solar dish, solar collector, solar furnace)
class 0811 - 0.012207 (space heater)
class 0815 - 0.010284 (spider web, spider's web)
class 0879 - 0.012848 (umbrella)
class 0881 - 0.011559 (upright, upright piano)
class 0904 - 0.093811 (window screen)
class 0905 - 0.034637 (window shade)
imagenet: 9.38110% class #904 (window screen)
nvbuf_utils: dmabuf_fd 1233 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
NvBufferGetParams failed for dst_dmabuf_fd
nvbuffer_transform Failed
[TRT] ------------------------------------------------
[TRT] Timing Report networks/bvlc_googlenet.caffemodel
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.23031ms CUDA 0.63271ms
[TRT] Network CPU 28.10880ms CUDA 25.73349ms
[TRT] Post-Process CPU 0.22297ms CUDA 0.22281ms
[TRT] Total CPU 28.56208ms CUDA 26.58901ms
[TRT] ------------------------------------------------
class 0412 - 0.015434 (ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin)
class 0421 - 0.038361 (bannister, banister, balustrade, balusters, handrail)
class 0446 - 0.013626 (binder, ring-binder)
class 0478 - 0.023087 (carton)
class 0519 - 0.015869 (crate)
class 0534 - 0.039734 (dishwasher, dish washer, dishwashing machine)
class 0579 - 0.011559 (grand piano, grand)
class 0580 - 0.016235 (greenhouse, nursery, glasshouse)
class 0620 - 0.017975 (laptop, laptop computer)
class 0632 - 0.014221 (loudspeaker, speaker, speaker unit, loudspeaker system, speaker system)
class 0651 - 0.032562 (microwave, microwave oven)
class 0664 - 0.014786 (monitor)
class 0681 - 0.014618 (notebook, notebook computer)
class 0743 - 0.063232 (prison, prison house)
class 0760 - 0.026566 (refrigerator, icebox)
class 0771 - 0.012947 (safe)
class 0791 - 0.019516 (shopping cart)
class 0799 - 0.030579 (sliding door)
class 0807 - 0.028168 (solar dish, solar collector, solar furnace)
class 0811 - 0.012848 (space heater)
class 0815 - 0.010323 (spider web, spider's web)
class 0859 - 0.011429 (toaster)
class 0879 - 0.010529 (umbrella)
class 0904 - 0.054504 (window screen)
class 0905 - 0.025055 (window shade)
imagenet: 6.32324% class #743 (prison, prison house)
[TRT] ------------------------------------------------
[TRT] Timing Report networks/bvlc_googlenet.caffemodel
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.11833ms CUDA 0.65620ms
[TRT] Network CPU 31.70401ms CUDA 28.60287ms
[TRT] Post-Process CPU 0.21604ms CUDA 0.21599ms
[TRT] Total CPU 32.03838ms CUDA 29.47505ms
[TRT] ------------------------------------------------
[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0m[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0mreceived SIGINT
[0;31m[gstreamer] gstDecoder -- failed to retrieve next image buffer
[0m[0;31mimagenet: failed to capture next frame
[0mimagenet: shutting down...
[gstreamer] gstCamera -- stopping pipeline, transitioning to GST_STATE_NULL
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
[gstreamer] gstCamera -- pipeline stopped
imagenet: shutdown complete.
received SIGINT
received SIGINT
Which version of JetPack are you on? Can you try it with --input-flip=none
(that actually equates to rotate-180 because of this code
It should then flip it 180 degrees, because none
and rotate-180
get swapped in the code.
My JetPack version is 4.6. And I has read this source code. My first modification is here too. The --input-flip=none
is work correctly because it will rotate in the source code.
My first modification is follows:
if(mOptions.flipMethod == videoOptions::FLIP_NONE)
mOptions.flipMethod = videoOptions::FLIP_NONE;// orign is: mOptions.flipMethod = videoOptions::FLIP_ROTATE_180;
My camera outpouts is inverse when running on my board.I try modfing "gstCamera.cpp" as follow:
$ ./imagenet-camera --network=googlenet
After compile finishing, It only has a static image frame. And the console always output "[gstreamer] gstDecoder -- failed to retrieve next image buffer imagenet: failed to capture next frame
" My English is poor and I am a student, so the question I ask may be stupid. I hope getting a solution. Thanks very much.