Net.fromOnnx constructor

Net.fromOnnx(
  1. String path
)

Implementation

factory Net.fromOnnx(String path) {
  final p = calloc<cvg.Net>();
  final cpath = path.toNativeUtf8().cast<ffi.Char>();
  cvRun(() => cdnn.cv_dnn_Net_readNetFromONNX(cpath, p, ffi.nullptr));
  calloc.free(cpath);
  final net = Net._(p);
  return net;
}