AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.8k stars 7.97k forks source link

Docker not able to load model for inference using dll invoke #8574

Open nielsmunters opened 2 years ago

nielsmunters commented 2 years ago

For a project I am using Yolov4 as a object detection model in a c# application inside of a docker container.

The problem: When trying to load the model the application crashes with different error codes. The compiled darknet works on the container but there seems to be a problem with the generated libdarknet.so file.

Errors: Error1: image

Error2: image

The setup: My system: Intel laptop with 2070 MaxQ - Windows OS Inside of a Docker container I built Darknet with GPU=1, CUDNN=1, CUDNN_HALF=1, OPENCV=1 and LIBSSO=1. Architecture was set to "-gencode arch=compute_75,code=[sm_75,compute_75]". The Docker container was based on: nvidia/cuda:11.4.2-cudnn8-devel-ubuntu20.04

In the c# application I try to load the model using: image

Is this an issue with Darknet or with Docker? Any help would be greatly appreciated!

UPDATE: Issue was fixed by using older commit. Commit used was: https://github.com/AlexeyAB/darknet/commit/08088dccbbae7bb68c41d5ae3355380ce6654663

nielsmunters commented 2 years ago

Issue was fixed by using older commit. Commit used was: 08088dccbbae7bb68c41d5ae3355380ce6654663

mhwahdan commented 2 years ago

I beleive the problem is with docker.

you can try this fork of the repository

RoBen-AAST/darknet

All you need is to run: docker-compose run yolo-gpu bash you can also adjust the docker-compos file to suit your needs and don't forget to configure the Makefile

nielsmunters commented 2 years ago

I beleive the problem is with docker.

you can try this fork of the repository

RoBen-AAST/darknet

All you need is to run: docker-compose run yolo-gpu bash you can also adjust the docker-compos file to suit your needs and don't forget to configure the Makefile

I've fixed the error by using an older version of Darknet, so not sure it is just an issue with docker. But thanks for your comment!