Not detect on custom data yolo-nas

setup:
• Hardware Platform:Jetson Xavier NX
• DeepStream Version: 6.1
• JetPack Version: 5.0.1 DP
• TensorRT Version: 8.4.0.11
• Issue Type( questions)

Hi,
I use the Git https://github.com/marcoslucianops/DeepStream-Yolo to run yolo-nas with deepstream and python bindings. I run Yolo-nas on coco weights, and everything works fine. When I convert the file.pth to file.onnx I do not use the flag –
dynamic.
Now I want to use my training network the model again is yolo nas-small version is name is Gazbo_Nas.pth I success to convert to Gazbo_Nas.onnx and I get Gazbo_Nas.onnx_b1_gpu0_fp32.engine but when I run the pipeline I detect nothing.
I think my problem is some configuration problem that I do not understand.
Of course, before I go to deep-stream I check my results and see that it works without deepstream using supergradient libraries.
I will be happy for any advice thank you.

I attached the configuration files:
config_infer_primary_yolonas.txt (576 Bytes)
deepstream_app_config.txt (860 Bytes)
labels2.txt (30 Bytes)

  1. could you share a whole log?
  2. please read the doc to understand the meaning of nvinfer parameters, and ensure the settings are correct.
  3. you can add log in NvDsInferParseYoloE to check how to deal with inference outputs.

what you mean about whole log?
GST_DEBUG=2 deepstream-app -c deepstream_app_config.txt ?

Using winsys: x11 
0:00:07.116725955  6603      0x162b150 INFO                 nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1900> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.1/sources/deepstream_python_apps/apps/DeepStream-Yolo/Gazbo_Nas.onnx_b1_gpu0_fp32.engine
INFO: [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT input           3x640x640       
1   OUTPUT kFLOAT output          8400x6          

0:00:07.174871448  6603      0x162b150 INFO                 nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2003> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.1/sources/deepstream_python_apps/apps/DeepStream-Yolo/Gazbo_Nas.onnx_b1_gpu0_fp32.engine
0:00:07.184229479  6603      0x162b150 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream-6.1/sources/deepstream_python_apps/apps/DeepStream-Yolo/config_infer_primary_yolonas.txt sucessfully
0:00:07.187108434  6603      0x162b150 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet
0:00:07.188430855  6603      0x162b150 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet

Runtime commands:
        h: Print this help
        q: Quit

        p: Pause
        r: Resume

NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
      To go back to the tiled display, right-click anywhere on the window.


**PERF:  FPS 0 (Avg)    
**PERF:  0.00 (0.00)    
** INFO: <bus_callback:194>: Pipeline ready

0:00:07.212219825  6603      0x162a5e0 WARN                 qtdemux qtdemux.c:3250:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
Opening in BLOCKING MODE 
0:00:07.344578127  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:4477:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:07.344710449  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:2394:gst_v4l2_object_add_interlace_mode:0xfffe880166e0 Failed to determine interlace mode
0:00:07.344817842  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:2394:gst_v4l2_object_add_interlace_mode:0xfffe880166e0 Failed to determine interlace mode
0:00:07.344895508  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:2394:gst_v4l2_object_add_interlace_mode:0xfffe880166e0 Failed to determine interlace mode
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
0:00:07.454657434  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:4477:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:07.454782620  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:2394:gst_v4l2_object_add_interlace_mode:0xfffe880166e0 Failed to determine interlace mode
0:00:07.454876189  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:2394:gst_v4l2_object_add_interlace_mode:0xfffe880166e0 Failed to determine interlace mode
0:00:07.454982143  6603 0xfffe8c07eb00 WARN                    v4l2 gstv4l2object.c:2394:gst_v4l2_object_add_interlace_mode:0xfffe880166e0 Failed to determine interlace mode
** INFO: <bus_callback:180>: Pipeline running

0:00:07.465235771  6603 0xfffe8c07eb00 WARN            v4l2videodec gstv4l2videodec.c:1779:gst_v4l2_video_dec_decide_allocation:<nvv4l2decoder0> Duration invalid, not setting latency
0:00:07.465693378  6603 0xfffe8c07eb00 WARN          v4l2bufferpool gstv4l2bufferpool.c:1049:gst_v4l2_buffer_pool_start:<nvv4l2decoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:07.469246744  6603 0xfffe84010aa0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1499:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:src> Driver should never set v4l2_buffer.field to ANY
**PERF:  21.01 (20.95)  
**PERF:  21.05 (20.98)  
**PERF:  21.04 (20.99)  
**PERF:  21.04 (20.99)  
** INFO: <bus_callback:217>: Received EOS. Exiting ...

Quitting
0:00:29.723298654  6603      0x162b150 ERROR                GST_BUS gstbus.c:1066:gst_bus_remove_watch:<bus1> no bus watch was present
App run successful

you can add log in NvDsInferParseYoloE to check if it is because the inference output score is low.

thank you for reply how can I do this?

here is the code line, DeepStream-Yolo/nvdsparsebbox_Yolo.cpp at master · marcoslucianops/DeepStream-Yolo · GitHub
please check if maxProb is too low.

I add to the code:
Screenshot 2023-06-05 171412
I don’t see in my terminal printed of maxProb to low.
I think I do something wrong I need compile again the .cpp files?

CUDA_VER=11.4 make -C nvdsinfer_custom_impl_Yolo

yes, will this line code be executed line?

thank you for your patience, I am not so expert in cpp when I try to compile I get this message:

sudo CUDA_VER=11.4 make -C nvdsinfer_custom_impl_Yolo
make: Entering directory '/opt/nvidia/deepstream/deepstream-6.1/sources/deepstream_python_apps/apps/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo'
g++ -c  -o nvdsparsebbox_Yolo.o -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-11.4/include nvdsparsebbox_Yolo.cpp
g++ -o libnvdsinfer_custom_impl_Yolo.so  utils.o yolo.o nvdsinfer_yolo_engine.o nvdsinitinputlayers_Yolo.o nvdsparsebbox_Yolo.o yoloPlugins.o layers/convolutional_layer.o layers/pooling_layer.o layers/reorg_layer.o layers/batchnorm_layer.o layers/activation_layer.o layers/channels_layer.o layers/sam_layer.o layers/deconvolutional_layer.o layers/route_layer.o layers/shortcut_layer.o layers/upsample_layer.o layers/implicit_layer.o yoloForward_v2.o yoloForward.o yoloForward_nc.o nvdsparsebbox_Yolo_cuda.o -shared -Wl,--start-group -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-11.4/lib64 -lcudart -lcublas -lstdc++fs -Wl,--end-group
make: Leaving directory '/opt/nvidia/deepstream/deepstream-6.1/sources/deepstream_python_apps/apps/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo'

and again I dont say any thing printed on the screen

  1. will decodeTensorYoloE be triggered? you can add log at the beginning of decodeTensorYoloE.
  2. will this line code be executed line?

I apologize for the first time I did not add ‘count’ in the right line you right now I see the printed message


how I can fix this problem?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

please read the doc to understand the meaning of nvinfer parameters, and ensure the settings are correct.

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