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.39k stars 345 forks source link

Deserialise engine failed because [model_b1_gpu0_fp32.engine] file missing #84

Closed maheshksingh closed 2 years ago

maheshksingh commented 2 years ago

image

model_b1_gpu0_fp32.engine file missing, please see the image for details. Thanks,

marcoslucianops commented 2 years ago

It's generated automatically when you run the deepstream-app (for YOLOv2, v3 or v4) and the file doesn't exist. The path for yolov4.cfg is wrong (see the log).

JangDongMan commented 2 years ago

image

Hello I got the same problem. Fist time I did install DeepSteam SDK and yolo.

Aand I step by step "YOLOR usage" Finally I do step 9.Run Please help me . thanks

marcoslucianops commented 2 years ago

@JangDongMan, you forgot the step 8

  1. Change the deepstream_app_config.txt file
...
[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yolor.txt

Change config-file=config_infer_primary.txt to config-file=config_infer_primary_yolor.txt

JangDongMan commented 2 years ago

So, sorry I miss mention it "YOLOR usage" I tried "YOLOv5 usage" So I forgot step 8. [primary-gie] enable=1 gpu-id=0 gie-unique-id=1 nvbuf-memory-type=0 config-file=config_infer_primary_yolov5.txt

then I got error message under. image

what config file I miss it? thanks Do I step "Basic usage" ? I did not "Basiic usage"

marcoslucianops commented 2 years ago

@JangDongMan the correct path is config_infer_primary_yoloV5.txt. The 'V' is in uppercase.

JangDongMan commented 2 years ago

Thanks for your kindly reply. and I fixed it and run agian

image

that result are means I got mistake some configures?

image

marcoslucianops commented 2 years ago

I saw the error cuGraphicsGLRegisterBuffer failed with error(219). Are you using a physical monitor?

JangDongMan commented 2 years ago

Thanks for your reply. I did test via RealVNC and still connected local monitor and keyboard. image

obove screen is caputred after by local keyboard and monitor. Did RealVNC influenced for test result?

thanks a lot.

marcoslucianops commented 2 years ago

There's no problem to use RealVNC.

Did you install the requirements as it's in README.md page?

JangDongMan commented 2 years ago

Sure I did all install for requirements .

And I remember when "deepstream-app -c deepstream_app_config.txt" screen go to black screen about 0.5 second. And I connected monitor by RGB in server computer not graphic card.

[Ubuntu 18.04] [CUDA 11.4.3] [TensorRT 8.0 GA (8.0.1)] [cuDNN >= 8.2] [NVIDIA Driver >= 470.82.01 [NVIDIA DeepStream SDK 6.0]

What should I check more? I can not found any soultion in google search.

marcoslucianops commented 2 years ago

You can use without the display by change the [sink] type from 2 to 1.

This error is related to OpenGL. It seems missing in your NVIDIA Driver installation, but I'm not sure about it. I recommend you check this specific error in NVIDIA forums.

imSrbh commented 2 years ago

@marcoslucianops & team I noticed with this custom parser: Every time I see the model engine file is generated with model_b1_gpu0_fp32.engine this kind of name. It's not picking the name which I am providing inmodel-engine-file=/path/<somename>.engine & The engine is not getting generated in the desired path which I am providing in model-engine-file here.

The engine file is generated from where you are running the application.

marcoslucianops commented 2 years ago

It's a limitation in DeepStream SDK custom parser. The model engine file always will be generated in current path and as modelb{batch-size}{network-mode}.engine .

marcoslucianops commented 2 years ago

@JangDongMan,

Please uninstall your driver

sudo nvidia-uninstall

Reboot your computer and install this driver

wget https://us.download.nvidia.com/XFree86/Linux-x86_64/470.63.01/NVIDIA-Linux-x86_64-470.63.01.run
sudo sh NVIDIA-Linux-x86_64-470.63.01.run

Then reboot your computer again.

It should solve the problem related to cuGraphicsGLRegisterBuffer error.

JangDongMan commented 2 years ago

I did reinstall nvidia driver ver-470.63.01 and I rebooted then it auto matically upgrade 470.103.01 So I reinstall and prevent upgrade driver.

I got blelow result. Monitor connected to onboard RGB port. Server PC is Intel® Server System R2308WFTZS , 2U, zeon cpu. graphic nvidia A4000. thanks image

marcoslucianops commented 2 years ago

Why did it install automatically?

Did you do this step?

3. Disable Nouveau

sudo nano /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u

4. Reboot the computer

sudo reboot
JangDongMan commented 2 years ago

Thanks a lot for your reply.!!

I did not install "nouveau". so I edit 20auto-upgrades file like this APT::Periodic::Update-Package-Lists "0"; APT::Periodic::AutocleanInterval "0"; APT::Periodic::Unattended-Upgrade "0"; then no more driver upgrade. So I test it driver version "470.63.01" . But result is same.

marcoslucianops commented 2 years ago

You don't to install nouveau, you need to blacklist it doing the steps I sent.

ingbeeedd commented 2 years ago

@marcoslucianops

In this storage, I have to create a trt.engine file in advance, right?

marcoslucianops commented 2 years ago

No, the engine will be created by the DeepStream when you run it.

ingbeeedd commented 2 years ago

@marcoslucianops

Thank you for rapid response. I have an additional question.

I did a yolov4 train based on yolov4.cfg here(https://github.com/WongKinYiu/PyTorch_YOLOv4), and if I get a pt file from custom train, can it be executed immediately after generating the trt engine? Or should I have a darknet-based weight file? Thank you

marcoslucianops commented 2 years ago

It's supported only Darknet for YOLOv4.

millionmilk commented 2 years ago

Hello I got the some problem when I training own yolov5 model. please see detail as bellow, image image

I change all parameters of gpu-id to 1 and batch-size to 16 in deepstream_app_config.txt what config file I miss it ? thanks

marcoslucianops commented 2 years ago

@millionmilk, please rename your wts and cfg files to yolov5_best and try again.

millionmilk commented 2 years ago

@marcoslucianops Thanks for you reply after rename the file name and try again I found that maybe it's my GPU source problem Thanks a lot

ecardozog commented 2 years ago

Tuve el mismo problema. El error que cometí fué que copié un archivo incorrecto en yolov4.cfg, verifiqué bien, copié el archivo correcto y se ejecutó correctamente.