Net.fromTensorflow constructor

Net.fromTensorflow(
  1. String path, {
  2. String config = "",
})

Reads a network model stored in TensorFlow framework's format.

https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga91c313cd8269ddddaf3cb8299df2d4cb

Implementation

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