Click or drag to resize

NetReadNetFromDarknet Method

Reads a network model stored in Darknet (https://pjreddie.com/darknet/) model files.

Namespace:  OpenCvSharp.Dnn
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static Net ReadNetFromDarknet(
	string cfgFile,
	string darknetModel = null
)

Parameters

cfgFile
Type: SystemString
path to the .cfg file with text description of the network architecture.
darknetModel (Optional)
Type: SystemString
path to the .weights file with learned network.

Return Value

Type: Net
Network object that ready to do forward, throw an exception in failure cases.
Remarks
This is shortcut consisting from DarknetImporter and Net::populateNet calls.
See Also