Пример #1
0
 /// <summary>
 /// Reads a network model stored in Darknet (https://pjreddie.com/darknet/) model files.
 /// </summary>
 /// <param name="cfgFile">path to the .cfg file with text description of the network architecture.</param>
 /// <param name="darknetModel">path to the .weights file with learned network.</param>
 /// <returns>Network object that ready to do forward, throw an exception in failure cases.</returns>
 /// <remarks>This is shortcut consisting from DarknetImporter and Net::populateNet calls.</remarks>
 public static Net ReadNetFromDarknet(string cfgFile, string?darknetModel = null)
 {
     return(Net.ReadNetFromDarknet(cfgFile, darknetModel));
 }
Пример #2
0
 /// <summary>
 /// Reads a network model stored in Darknet (https://pjreddie.com/darknet/) model files from memory.
 /// </summary>
 /// <param name="bufferCfg">A buffer contains a content of .cfg file with text description of the network architecture.</param>
 /// <param name="bufferModel">A buffer contains a content of .weights file with learned network.</param>
 /// <returns></returns>
 /// <remarks>This is shortcut consisting from DarknetImporter and Net::populateNet calls.</remarks>
 public static Net?ReadNetFromDarknet(byte[] bufferCfg, byte[]?bufferModel = null)
 {
     return(Net.ReadNetFromDarknet(bufferCfg, bufferModel));
 }