Next step.
I tried using webcam to recognize by jetson-inference command “./Imagenet-camera”.
However, the image of the web camera was black.
Do I need to set something?
I’m using Logicool C922 web camera.
I confirmed that the web camera can operate by using the command “/usr/local/driveworks/bin/sample_camera_usb --device=0”.
The log when executing the command “./imagenet-camera” is as follows
$ ./imagenet-camera
imagenet-camera
args (1): 0 [./imagenet-camera]
[gstreamer] initialized gstreamer, version 1.8.2.0
[gstreamer] gstreamer decoder pipeline string:
v4l2src device=/dev/video0 ! video/x-raw, width=(int)1280, height=(int)720, format=RGB ! videoconvert ! video/x-raw, format=RGB ! videoconvert !appsink name=mysink
imagenet-camera: successfully initialized video device
width: 1280
height: 720
depth: 24 (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
[GIE] TensorRT version 3.0.2, build 3002
[GIE] attempting to open cache file networks/bvlc_googlenet.caffemodel.2.tensorcache
[GIE] loading network profile from cache... networks/bvlc_googlenet.caffemodel.2.tensorcache
nvrm_gpu: Bug 200215060 workaround enabled.
[GIE] platform does not have FP16 support.
[GIE] networks/bvlc_googlenet.caffemodel loaded
[GIE] CUDA engine context initialized with 2 bindings
[GIE] networks/bvlc_googlenet.caffemodel input binding index: 0
[GIE] networks/bvlc_googlenet.caffemodel input dims (b=2 c=3 h=224 w=224) size=1204224
[cuda] cudaAllocMapped 1204224 bytes, CPU 0x1053e0000 GPU 0x1053e0000
[GIE] networks/bvlc_googlenet.caffemodel output 0 prob binding index: 1
[GIE] networks/bvlc_googlenet.caffemodel output 0 prob dims (b=2 c=1000 h=1 w=1) size=8000
[cuda] cudaAllocMapped 8000 bytes, CPU 0x1055e0000 GPU 0x1055e0000
networks/bvlc_googlenet.caffemodel initialized.
[GIE] networks/bvlc_googlenet.caffemodel loaded
imageNet -- loaded 1000 class info entries
networks/bvlc_googlenet.caffemodel initialized.
default X screen 0: 2960 x 1050
[OpenGL] glDisplay display window initialized
[OpenGL] creating 1280x720 texture
loaded image fontmapA.png (256 x 512) 2097152 bytes
[cuda] cudaAllocMapped 2097152 bytes, CPU 0x1057e0000 GPU 0x1057e0000
[cuda] cudaAllocMapped 8192 bytes, CPU 0x1055e2000 GPU 0x1055e2000
[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 ==> videoconvert1
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter1
[gstreamer] gstreamer changed state from NULL to READY ==> videoconvert0
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter0
[gstreamer] gstreamer changed state from NULL to READY ==> v4l2src0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> videoconvert1
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter1
[gstreamer] gstreamer changed state from READY to PAUSED ==> videoconvert0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> v4l2src0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer msg new-clock ==> pipeline0
[gstreamer] gstreamer msg stream-start ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videoconvert1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videoconvert0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> v4l2src0
imagenet-camera: camera open for streaming
[gstreamer] gstreamer decoder onPreroll
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x1059e0000 GPU 0x1059e0000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x105c90000 GPU 0x105c90000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x105f40000 GPU 0x105f40000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x1061f0000 GPU 0x1061f0000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x1064a0000 GPU 0x1064a0000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x106750000 GPU 0x106750000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x106a00000 GPU 0x106a00000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x106cb0000 GPU 0x106cb0000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x106f60000 GPU 0x106f60000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x107210000 GPU 0x107210000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x1074c0000 GPU 0x1074c0000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x107770000 GPU 0x107770000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x107a20000 GPU 0x107a20000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x107cd0000 GPU 0x107cd0000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x107f80000 GPU 0x107f80000
[cuda] cudaAllocMapped 2764800 bytes, CPU 0x108230000 GPU 0x108230000
[cuda] gstreamer camera -- allocated 16 ringbuffers, 2764800 bytes each
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink
[gstreamer] gstreamer msg async-done ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> mysink
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> pipeline0
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x1084e0000 GPU 0x1084e0000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x1092f0000 GPU 0x1092f0000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x10a100000 GPU 0x10a100000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x10af10000 GPU 0x10af10000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x10bd20000 GPU 0x10bd20000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x10cb30000 GPU 0x10cb30000
[gstreamer] gstreamer msg qos ==> v4l2src0
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x10d940000 GPU 0x10d940000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x10e750000 GPU 0x10e750000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x10f560000 GPU 0x10f560000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x110370000 GPU 0x110370000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x111180000 GPU 0x111180000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x111f90000 GPU 0x111f90000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x112da0000 GPU 0x112da0000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x113bb0000 GPU 0x113bb0000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x1149c0000 GPU 0x1149c0000
[cuda] cudaAllocMapped 14745600 bytes, CPU 0x1157d0000 GPU 0x1157d0000
[cuda] gstreamer camera -- allocated 16 RGBA ringbuffers
class 0475 - 0.283953 (car mirror)
class 0605 - 0.014470 (iPod)
class 0632 - 0.010347 (loudspeaker, speaker, speaker unit, loudspeaker system, speaker system)
class 0662 - 0.029539 (modem)
class 0664 - 0.098564 (monitor)
class 0782 - 0.026043 (screen, CRT screen)
class 0785 - 0.363981 (seat belt, seatbelt)
class 0851 - 0.013250 (television, television system)
class 0859 - 0.040571 (toaster)
imagenet-camera: 36.39809% class #785 (seat belt, seatbelt)
class 0475 - 0.297077 (car mirror)
class 0605 - 0.010207 (iPod)
class 0632 - 0.011224 (loudspeaker, speaker, speaker unit, loudspeaker system, speaker system)
class 0662 - 0.027714 (modem)
class 0664 - 0.093532 (monitor)
class 0782 - 0.026952 (screen, CRT screen)
class 0785 - 0.378346 (seat belt, seatbelt)
class 0851 - 0.012728 (television, television system)
class 0859 - 0.037469 (toaster)