marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.4k stars 345 forks source link

Config file path:/home/sckj/yolov8/DeepStream-Yolo-master/config_infer_primary_ yolov8.txt,NvDsInfer Error:NVDSINFER CONFIG FAILED #395

Open 1354065425 opened 1 year ago

1354065425 commented 1 year ago

ferContextImpl::generateBackendContext() [UID = 1]: build backend context failed 0:17:27.919840104 15844 0xaaaaefab6300 ERROR nvinfer gstnvinfer.c pp:674:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsIn ferContextImpl::initialize() [UID = 1]: genera te backend failed, check config file settings 0:17:27.919939849 15844 0xaaaaefab6300 WARN nvinfer gstnvinfer.c pp:888:gst_nvinfer_start: error: Failed to create NvDsInferContext instance 0:17:27.919998569 15844 0xaaaaefab6300 WARN nvinfer gstnvinfer.c pp:888:gst_nvinfer_start: error: Config file path: /home/sckj/yolov 8/Deepstream-Yolo-master/config_infer_primary_yoloV8.txt,NvDsInfer Error: NVDSI NFER CONFIG FAILED ** ERROR: : Failed to set pipeline to PAUSED Quitting

1354065425 commented 1 year ago

image

Today-fine commented 1 year ago

Same error with my model using V5, working on it

1354065425 commented 1 year ago

my model is yolov8,follow the guidance,but not work

Today-fine commented 1 year ago

I have no problem switching to Orin according to the official document, but I can’t switch to Xavier

Today-fine commented 1 year ago

my model is yolov8,follow the guidance,but not work

I found the problem, unplugged the monitor, and then changed it to file output to generate the engine file, but my device has a problem and the power is cut off when playing the video, OP can try

marcoslucianops commented 1 year ago

0:17:27.919998569 15844 0xaaaaefab6300 WARN nvinfer gstnvinfer.cpp:888:gst_nvinfer_start: error: Config file path: /home/sckj/yolov8/Deepstream-Yolo-master/config_infer_primary_yoloV8.txt,NvDsInfer Error: NVDSINFER CONFIG FAILED

Try to use the model exported without the --dynamic flag.

1354065425 commented 1 year ago

0:17:27.919998569 15844 0xaaaaefab6300 WARN nvinfer gstnvinfer.cpp:888:gst_nvinfer_start: error: Config file path: /home/sckj/yolov8/Deepstream-Yolo-master/config_infer_primary_yoloV8.txt,NvDsInfer Error: NVDSINFER CONFIG FAILED

Try to use the model exported without the --dynamic flag.

ok, the model exported without the --dynamic flag, but not detection

1354065425 commented 1 year ago

image python3 gen_wts_yoloV8.py -w yolov8s.pt -s 640 cp labels.txt Deepstream-yolo cp yolov8s.onnx Deepstream-yolo cd Deepstream-yolo && CUDA_VER=11.4 make -C nvdsinfer_custom_impl_Yolo deepstream-app -c deepstream_app_config.txt for model_b1_gpu0_fp32.engine, but not detect this videos

marcoslucianops commented 1 year ago

The wts method is outdated and isn't supported anymore. Please check the new docs for export method.

1354065425 commented 1 year ago

The wts method is outdated and isn't supported anymore. Please check the new docs for export method.

i use the command python3 export_yoloV8.py -w yolov8s.pt -s 640 not wts method

marcoslucianops commented 1 year ago

The last comment was python3 gen_wts_yoloV8.py -w yolov8s.pt -s 640. That's why I said that.

marcoslucianops commented 1 year ago

Please send here the output from the terminal when you run the deepstream-app.

1354065425 commented 1 year ago

Please send here the output from the terminal when you run the deepstream-app.

68b6afd62dd4ad2609d31787e96ed1b

marcoslucianops commented 1 year ago

Please send the full output. I would like to see the output layers/shapes.

1354065425 commented 1 year ago

Please send the full output. I would like to see the output layers/shapes

049f6e16ee17c2b4132d73d49f9d614

marcoslucianops commented 1 year ago

It seems ok. Can you send the deepstream_app_config.txt and the config_infer_primary_yoloV8.txt files?

1354065425 commented 1 year ago

It seems ok. Can you send the deepstream_app_config.txt and the config_infer_primary_yoloV8.txt files?

Okay, thank you for your reply This is my deepstream_app_config.txt and config_infer_primary_yoloV8.txt config_infer_primary_yoloV8.txt deepstream_app_config.txt

marcoslucianops commented 1 year ago

Please change

#net-scale-factor=0.0039215697906911373

to

net-scale-factor=0.0039215697906911373

in the config_infer_primary_yoloV8.txt file.

1354065425 commented 1 year ago

Please change

#net-scale-factor=0.0039215697906911373

to

net-scale-factor=0.0039215697906911373

in the config_infer_primary_yoloV8.txt file.

no decetion

marcoslucianops commented 1 year ago

Can you test the official YOLOv8s or other variant with uncomented net-scale-factor=0.0039215697906911373? Did you add normalization to your model in the training?

1354065425 commented 1 year ago

Can you test the official YOLOv8s or other variant with uncomented net-scale-factor=0.0039215697906911373? Did you add normalization to your model in the training?

Okay, I'll try yolov8s now

1354065425 commented 1 year ago

Can you test the official YOLOv8s or other variant with uncomented net-scale-factor=0.0039215697906911373? Did you add normalization to your model in the training?

The steps are all based on your document, but even if it is not recognized, the video can still be played out

marcoslucianops commented 1 year ago

The YOLOv8 needs the net-scale-factor=0.0039215697906911373. You need to change it only if your model is trained with image normalization.

1354065425 commented 1 year ago

The YOLOv8 needs the net-scale-factor=0.0039215697906911373. You need to change it only if your model is trained with image normalization. 3e3210bc903f251dc8698fd2f26fe4c yolov8s Still the Same

marcoslucianops commented 1 year ago

Did you delete the old engine file to run the YOLOv8s?

1354065425 commented 1 year ago

Did you delete the old engine file to run the YOLOv8s?

yes,I removed previous engine

1354065425 commented 1 year ago

Did you delete the old engine file to run the YOLOv8s?

I still haven't found where the problem lies

marcoslucianops commented 1 year ago

Hi, send the ONNX model to my email please.

1354065425 commented 1 year ago

Hi, send the ONNX model to my email please.

Okay, I sent you an email,My email name is wangjin0992@gmail.com

1354065425 commented 1 year ago

Hi, send the ONNX model to my email please.

Hey, brother, I tried using YOLOV7 and it's okay. It can recognize it normally, but YOLOV8 doesn't recognize it. Is the network structure of YOLOV8 different? Is the head and network separate?

marcoslucianops commented 11 months ago

What's your PyTorch version?

1354065425 commented 11 months ago

What's your PyTorch version?

torch version is 1.14 image

marcoslucianops commented 11 months ago

It should work with PyTorch 1.14. The network is different, but the code is ready to work with the YOLOv7 and YOLOv8 when exported with the export file available on this repo.