Hello AI World, Classification

Hallo everyone,
I want to train a network to detect the errors, so I want to create the label file first:
jetson-inference/python/training/classification/data
I have 2 classes bad and good.
for training i have 24 Images for good and 24 Images for bad.
for val i have 6 Images for good and 6 Images for bad.
but for test i don’t have Images because i want just run the camera to test my model. (i don’t know if that makes problem as long as i don’t have photos for testing)

i follow the Steps :
$ cd jetson-inference/python/training/classification

  • Training the Model:
    $ python3 train.py --model-dir=models/Yazan data/Yazan --batch-size=3 --workers=1 --epochs=5
  • Convert the Model:
    $ python3 onnx_export.py --model-dir=models/Yazan
  • Run the Model:
    $ imagenet.py --model=models/Yazan/resnet18.onnx --input_blob=input_0 --output_blob=output_0 --labels=data/Yazan/labels.txt csi://0

with the last Command i get a problem:

but i want to share for something, when i train my Model the accuracy sometimes is 0

Now there is something new when I want to run my model, but with a new command, instead the command mentioned above:
$ imagenet --model=models/Yazan/resnet18.onnx labels=data/Yazan/labels.txt --input_blob=input_0 --output_blob=output_0 – csi://0
my camera runs well but i don’t came a classification

abosalah@abosalah-desktop:~/Downloads/jetson-inference/python/training/classification$ imagenet --model=models/Yazan/resnet18.onnx --labels=data/Yazan/labels.txt --input_blob=input_0 --output_blob=output_0 csi://0
[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=2 ! video/x-raw(memory:NVMM) ! appsink name=mysink
[gstreamer] gstCamera successfully created device csi://0
[video] created gstCamera from csi://0

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: rotate-180
– loop: 0
– rtspLatency 2000

[OpenGL] glDisplay – X screen 0 resolution: 1680x1050
[OpenGL] glDisplay – X window resolution: 1680x1050
[OpenGL] glDisplay – display device initialized (1680x1050)
[video] created glDisplay from display://0

glDisplay video options:

– URI: display://0
- protocol: display
- location: 0
– deviceType: display
– ioType: output
– codec: raw
– width: 1680
– height: 1050
– frameRate: 0.000000
– bitRate: 0
– numBuffers: 4
– zeroCopy: true
– flipMethod: none
– loop: 0
– rtspLatency 2000

imageNet – loading classification network model from:
– prototxt (null)
– model models/Yazan/resnet18.onnx
– class_labels data/Yazan/labels.txt
– input_blob ‘input_0’
– output_blob ‘output_0’
– 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
[TRT] Could not register plugin creator - ::FlattenConcat_TRT version 1
[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 - ONNX (extension ‘.onnx’)
[TRT] desired precision specified for GPU: FASTEST
[TRT] requested fasted precision for device GPU without providing valid calibrator, disabling INT8
[TRT] [MemUsageChange] Init CUDA: CPU +198, GPU +0, now: CPU 231, GPU 1593 (MiB)
[TRT] native precisions detected for GPU: FP32, FP16
[TRT] selecting fastest native precision for GPU: FP16
[TRT] attempting to open engine cache file models/Yazan/resnet18.onnx.1.1.8001.GPU.FP16.engine
[TRT] loading network plan from engine cache… models/Yazan/resnet18.onnx.1.1.8001.GPU.FP16.engine
[TRT] device GPU, loaded models/Yazan/resnet18.onnx
[TRT] [MemUsageChange] Init CUDA: CPU +0, GPU +0, now: CPU 276, GPU 1684 (MiB)
[TRT] Loaded engine size: 45 MB
[TRT] [MemUsageSnapshot] deserializeCudaEngine begin: CPU 276 MiB, GPU 1684 MiB
[TRT] Using cublas a tactic source
[TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +158, GPU +215, now: CPU 434, GPU 1939 (MiB)
[TRT] Using cuDNN as a tactic source
[TRT] [MemUsageChange] Init cuDNN: CPU +241, GPU -8, now: CPU 675, GPU 1931 (MiB)
[TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +0, now: CPU 675, GPU 1934 (MiB)
[TRT] Deserialization required 4329680 microseconds.
[TRT] [MemUsageSnapshot] deserializeCudaEngine end: CPU 675 MiB, GPU 1934 MiB
[TRT] [MemUsageSnapshot] ExecutionContext creation begin: CPU 675 MiB, GPU 1934 MiB
[TRT] Using cublas a tactic source
[TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +0, now: CPU 675, GPU 1934 (MiB)
[TRT] Using cuDNN as a tactic source
[TRT] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 675, GPU 1934 (MiB)
[TRT] Total per-runner device memory is 42887680
[TRT] Total per-runner host memory is 23920
[TRT] Allocated activation device memory of size 2408960
[TRT] [MemUsageSnapshot] ExecutionContext creation end: CPU 675 MiB, GPU 1941 MiB
[TRT]
[TRT] CUDA engine context initialized on device GPU:
[TRT] – layers 26
[TRT] – maxBatchSize 1
[TRT] – deviceMemory 2408960
[TRT] – bindings 2
[TRT] binding 0
– index 0
– name ‘input_0’
– type FP32
– in/out INPUT
– # dims 4
– dim #0 1
– dim #1 3
– dim #2 224
– dim #3 224
[TRT] binding 1
– index 1
– name ‘output_0’
– type FP32
– in/out OUTPUT
– # dims 2
– dim #0 1
– dim #1 2
[TRT]
[TRT] binding to input 0 input_0 binding index: 0
[TRT] binding to input 0 input_0 dims (b=1 c=3 h=224 w=224) size=602112
[TRT] binding to output 0 output_0 binding index: 1
[TRT] binding to output 0 output_0 dims (b=1 c=2 h=1 w=1) size=8
[TRT]
[TRT] device GPU, models/Yazan/resnet18.onnx initialized.
[TRT] imageNet – loaded 2 class info entries
[TRT] imageNet – models/Yazan/resnet18.onnx initialized.
[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: 4032 x 3040 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[gstreamer] gstDecoder – failed to retrieve next image buffer
imagenet: failed to capture next frame
[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
RingBuffer – allocated 4 buffers (8 bytes each, 32 bytes total)
[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)
[OpenGL] glDisplay – set the window size to 1280x720
[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 models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.07984ms CUDA 0.79724ms
[TRT] Network CPU 113.55257ms CUDA 107.00526ms
[TRT] Post-Process CPU 0.03328ms CUDA 0.03365ms
[TRT] Total CPU 113.66569ms CUDA 107.83615ms
[TRT] ------------------------------------------------

[TRT] note – when processing a single image, run ‘sudo jetson_clocks’ before
to disable DVFS for more accurate profiling/timing measurements

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.06052ms CUDA 0.62995ms
[TRT] Network CPU 31.00145ms CUDA 27.92917ms
[TRT] Post-Process CPU 0.01802ms CUDA 0.00088ms
[TRT] Total CPU 31.07999ms CUDA 28.56000ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05599ms CUDA 0.85771ms
[TRT] Network CPU 20.84521ms CUDA 18.41016ms
[TRT] Post-Process CPU 0.01583ms CUDA 0.00057ms
[TRT] Total CPU 20.91703ms CUDA 19.26844ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.10453ms CUDA 0.56870ms
[TRT] Network CPU 18.27733ms CUDA 15.87172ms
[TRT] Post-Process CPU 0.03714ms CUDA 0.03760ms
[TRT] Total CPU 18.41900ms CUDA 16.47802ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.09125ms CUDA 0.60208ms
[TRT] Network CPU 19.82242ms CUDA 17.47104ms
[TRT] Post-Process CPU 0.03198ms CUDA 0.00062ms
[TRT] Total CPU 19.94565ms CUDA 18.07375ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05094ms CUDA 0.58604ms
[TRT] Network CPU 16.95198ms CUDA 14.57333ms
[TRT] Post-Process CPU 0.01609ms CUDA 0.01661ms
[TRT] Total CPU 17.01902ms CUDA 15.17599ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.32714ms CUDA 0.79833ms
[TRT] Network CPU 17.54179ms CUDA 15.45088ms
[TRT] Post-Process CPU 0.01531ms CUDA 0.00062ms
[TRT] Total CPU 17.88425ms CUDA 16.24984ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.08688ms CUDA 0.71344ms
[TRT] Network CPU 16.81927ms CUDA 14.53818ms
[TRT] Post-Process CPU 0.01646ms CUDA 0.01698ms
[TRT] Total CPU 16.92261ms CUDA 15.26859ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.06485ms CUDA 0.74135ms
[TRT] Network CPU 16.83094ms CUDA 14.49141ms
[TRT] Post-Process CPU 0.01536ms CUDA 0.01557ms
[TRT] Total CPU 16.91115ms CUDA 15.24833ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05229ms CUDA 0.57214ms
[TRT] Network CPU 16.83443ms CUDA 14.50750ms
[TRT] Post-Process CPU 0.01703ms CUDA 0.01661ms
[TRT] Total CPU 16.90376ms CUDA 15.09625ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.06906ms CUDA 0.70771ms
[TRT] Network CPU 18.57437ms CUDA 16.33130ms
[TRT] Post-Process CPU 0.01615ms CUDA 0.00057ms
[TRT] Total CPU 18.65958ms CUDA 17.03958ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05328ms CUDA 0.58953ms
[TRT] Network CPU 23.08323ms CUDA 20.72891ms
[TRT] Post-Process CPU 0.01818ms CUDA 0.02448ms
[TRT] Total CPU 23.15469ms CUDA 21.34292ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.06667ms CUDA 0.71203ms
[TRT] Network CPU 19.91836ms CUDA 17.67562ms
[TRT] Post-Process CPU 0.01588ms CUDA 0.00057ms
[TRT] Total CPU 20.00091ms CUDA 18.38823ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.07016ms CUDA 0.70615ms
[TRT] Network CPU 20.59859ms CUDA 18.27682ms
[TRT] Post-Process CPU 0.02094ms CUDA 0.02120ms
[TRT] Total CPU 20.68968ms CUDA 19.00417ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.07870ms CUDA 0.74479ms
[TRT] Network CPU 18.52843ms CUDA 17.07771ms
[TRT] Post-Process CPU 0.01771ms CUDA 0.00057ms
[TRT] Total CPU 18.62484ms CUDA 17.82307ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05412ms CUDA 0.68349ms
[TRT] Network CPU 20.19785ms CUDA 17.79776ms
[TRT] Post-Process CPU 0.02063ms CUDA 0.02047ms
[TRT] Total CPU 20.27259ms CUDA 18.50172ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05250ms CUDA 0.61146ms
[TRT] Network CPU 20.84677ms CUDA 18.52021ms
[TRT] Post-Process CPU 0.04761ms CUDA 0.04776ms
[TRT] Total CPU 20.94687ms CUDA 19.17943ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05110ms CUDA 0.67563ms
[TRT] Network CPU 15.90826ms CUDA 13.57714ms
[TRT] Post-Process CPU 0.05110ms CUDA 0.05099ms
[TRT] Total CPU 16.01045ms CUDA 14.30375ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05401ms CUDA 0.93703ms
[TRT] Network CPU 17.11366ms CUDA 14.47844ms
[TRT] Post-Process CPU 0.04682ms CUDA 0.04698ms
[TRT] Total CPU 17.21449ms CUDA 15.46245ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05573ms CUDA 0.61057ms
[TRT] Network CPU 13.46039ms CUDA 11.37339ms
[TRT] Post-Process CPU 0.01604ms CUDA 0.00083ms
[TRT] Total CPU 13.53216ms CUDA 11.98479ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.04990ms CUDA 0.67354ms
[TRT] Network CPU 13.54956ms CUDA 11.38323ms
[TRT] Post-Process CPU 0.01922ms CUDA 0.01922ms
[TRT] Total CPU 13.61867ms CUDA 12.07599ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05198ms CUDA 0.59495ms
[TRT] Network CPU 13.48054ms CUDA 12.98021ms
[TRT] Post-Process CPU 0.02063ms CUDA 0.00047ms
[TRT] Total CPU 13.55315ms CUDA 13.57562ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.10995ms CUDA 0.57818ms
[TRT] Network CPU 13.22851ms CUDA 11.27057ms
[TRT] Post-Process CPU 0.01490ms CUDA 0.00052ms
[TRT] Total CPU 13.35335ms CUDA 11.84927ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05396ms CUDA 0.56198ms
[TRT] Network CPU 17.09834ms CUDA 15.94682ms
[TRT] Post-Process CPU 0.01474ms CUDA 0.00047ms
[TRT] Total CPU 17.16704ms CUDA 16.50927ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05328ms CUDA 0.57000ms
[TRT] Network CPU 13.31049ms CUDA 12.45000ms
[TRT] Post-Process CPU 0.02104ms CUDA 0.00052ms
[TRT] Total CPU 13.38481ms CUDA 13.02052ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.07610ms CUDA 0.77625ms
[TRT] Network CPU 13.18580ms CUDA 11.14089ms
[TRT] Post-Process CPU 0.01432ms CUDA 0.00052ms
[TRT] Total CPU 13.27622ms CUDA 11.91766ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.08495ms CUDA 0.84438ms
[TRT] Network CPU 16.22035ms CUDA 13.13625ms
[TRT] Post-Process CPU 0.01594ms CUDA 0.00052ms
[TRT] Total CPU 16.32124ms CUDA 13.98114ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.10229ms CUDA 0.60036ms
[TRT] Network CPU 14.80980ms CUDA 14.33052ms
[TRT] Post-Process CPU 0.01656ms CUDA 0.00047ms
[TRT] Total CPU 14.92865ms CUDA 14.93135ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.10151ms CUDA 0.59255ms
[TRT] Network CPU 13.50372ms CUDA 11.71463ms
[TRT] Post-Process CPU 0.01594ms CUDA 0.01573ms
[TRT] Total CPU 13.62117ms CUDA 12.32292ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.07959ms CUDA 0.69089ms
[TRT] Network CPU 13.51877ms CUDA 11.54234ms
[TRT] Post-Process CPU 0.01594ms CUDA 0.00052ms
[TRT] Total CPU 13.61430ms CUDA 12.23375ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.10620ms CUDA 0.70781ms
[TRT] Network CPU 13.68524ms CUDA 11.71927ms
[TRT] Post-Process CPU 0.01615ms CUDA 0.00047ms
[TRT] Total CPU 13.80758ms CUDA 12.42755ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.06948ms CUDA 0.65938ms
[TRT] Network CPU 13.66222ms CUDA 11.70510ms
[TRT] Post-Process CPU 0.03349ms CUDA 0.03375ms
[TRT] Total CPU 13.76519ms CUDA 12.39823ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.08172ms CUDA 0.56557ms
[TRT] Network CPU 14.60099ms CUDA 12.76089ms
[TRT] Post-Process CPU 0.01620ms CUDA 0.01651ms
[TRT] Total CPU 14.69891ms CUDA 13.34297ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.09245ms CUDA 0.60922ms
[TRT] Network CPU 14.41489ms CUDA 14.37693ms
[TRT] Post-Process CPU 0.01620ms CUDA 0.00052ms
[TRT] Total CPU 14.52354ms CUDA 14.98667ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.07302ms CUDA 0.67875ms
[TRT] Network CPU 13.63378ms CUDA 11.67953ms
[TRT] Post-Process CPU 0.01531ms CUDA 0.00047ms
[TRT] Total CPU 13.72211ms CUDA 12.35875ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.07052ms CUDA 0.65260ms
[TRT] Network CPU 13.63633ms CUDA 11.77734ms
[TRT] Post-Process CPU 0.04714ms CUDA 0.00047ms
[TRT] Total CPU 13.75399ms CUDA 12.43042ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.11084ms CUDA 2.05917ms
[TRT] Network CPU 14.90542ms CUDA 14.23229ms
[TRT] Post-Process CPU 0.02047ms CUDA 0.00052ms
[TRT] Total CPU 15.03673ms CUDA 16.29198ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.11662ms CUDA 0.59088ms
[TRT] Network CPU 13.24465ms CUDA 11.44594ms
[TRT] Post-Process CPU 0.08875ms CUDA 0.08698ms
[TRT] Total CPU 13.45002ms CUDA 12.12380ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.08761ms CUDA 0.75703ms
[TRT] Network CPU 15.98613ms CUDA 14.11187ms
[TRT] Post-Process CPU 0.01828ms CUDA 0.00052ms
[TRT] Total CPU 16.09201ms CUDA 14.86943ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.10307ms CUDA 0.59688ms
[TRT] Network CPU 13.25663ms CUDA 11.48219ms
[TRT] Post-Process CPU 0.01594ms CUDA 0.01599ms
[TRT] Total CPU 13.37564ms CUDA 12.09505ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.05162ms CUDA 0.57974ms
[TRT] Network CPU 14.34411ms CUDA 13.14026ms
[TRT] Post-Process CPU 0.02177ms CUDA 0.00052ms
[TRT] Total CPU 14.41749ms CUDA 13.72052ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.20115ms CUDA 0.57906ms
[TRT] Network CPU 13.24783ms CUDA 11.44719ms
[TRT] Post-Process CPU 0.04021ms CUDA 0.04062ms
[TRT] Total CPU 13.48919ms CUDA 12.06688ms
[TRT] ------------------------------------------------

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.10209ms CUDA 0.68120ms
[TRT] Network CPU 15.63919ms CUDA 13.70339ms
[TRT] Post-Process CPU 0.04510ms CUDA 0.00073ms
[TRT] Total CPU 15.78638ms CUDA 14.38531ms
[TRT] ------------------------------------------------

[OpenGL] glDisplay – the window has been closed

[TRT] ------------------------------------------------
[TRT] Timing Report models/Yazan/resnet18.onnx
[TRT] ------------------------------------------------
[TRT] Pre-Process CPU 0.13589ms CUDA 0.66776ms
[TRT] Network CPU 13.40929ms CUDA 11.46505ms
[TRT] Post-Process CPU 0.04693ms CUDA 0.04745ms
[TRT] Total CPU 13.59211ms CUDA 12.18026ms
[TRT] ------------------------------------------------

imagenet: 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.
abosalah@abosalah-desktop:~/Downloads/jetson-inference/python/training/classification$

Hi @yazan.doha, when there is no classification made, it means that none of the classes had confidence value > 0 from the DNN. This typically means that the model wasn’t trained fully/accurately or that the source material is quite different from the data that the model was trained on.

I would try collecting more images in your dataset, and also training your model for more epochs (like ~30 epochs, or until it has higher accuracy)

If you re-export your PyTorch model to ONNX, please also delete the *.engine file from your model’s folder, so that TensorRT will use your updated ONNX model the next time you run imagenet program.

I also recommend running imagenet program on some test/val images from your dataset first, just to make sure that the model is working before trying it on a camera.

Hi @dusty_nv,
Ok, i will try it and tell you the result.
thank you very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.