Ben-Jamin-Griff
Ben-Jamin-Griff

Reputation: 45

Do you need to install Darknet on your machine to use YOLOv4 weights & .cfg in openCV

I'm trying to use OpenCV and YOLOv4 / YOLOv4 tiny weights and .cfg to make object detection predictions. My code doesn't want to run and keeps running into an error at

modelConfiguration = "yolov4.cfg";
modelWeights = "yolov4.weights";

# Load Yolo
net = cv2.dnn.readNetFromDarknet(modelConfiguration, modelWeights)

Do I need to have Darknet installed on my machine for this to work? I assumed I could use the exported weights and cfg with OpenCV without this?

I'm having trouble installing Darknet on my machine because I don't have admin rights. Is there a way around this? Can I use an ONNX file?

Upvotes: 0

Views: 403

Answers (1)

Hans Zimmer
Hans Zimmer

Reputation: 60

With opencv dnn module no need to install darknet or tensorflow or any other framework.

Upvotes: 1

Related Questions