fromCaffeAsync static method

Future<Net> fromCaffeAsync(
  1. String prototxt,
  2. String caffeModel
)

Implementation

static Future<Net> fromCaffeAsync(String prototxt, String caffeModel) async {
  final cProto = prototxt.toNativeUtf8().cast<ffi.Char>();
  final cCaffe = caffeModel.toNativeUtf8().cast<ffi.Char>();
  final rval = await cvRunAsync<Net>(
      (callback) => cdnn.Net_ReadNetFromCaffe_Async(cProto, cCaffe, callback), (c, p) {
    return c.complete(Net.fromPointer(p.cast<cdnn.Net>()));
  });
  calloc.free(cProto);
  calloc.free(cCaffe);

  return rval;
}