fromCaffeBytesAsync static method

Future<Net> fromCaffeBytesAsync(
  1. Uint8List bufferProto,
  2. Uint8List bufferModel
)

Implementation

static Future<Net> fromCaffeBytesAsync(Uint8List bufferProto, Uint8List bufferModel) async {
  final p = calloc<cvg.Net>();
  final bufP = VecUChar.fromList(bufferProto);
  final bufM = VecUChar.fromList(bufferModel);
  return cvRunAsync0((callback) => cdnn.cv_dnn_Net_readNetFromCaffeBytes(bufP.ref, bufM.ref, p, callback),
      (c) {
    final net = Net.fromPointer(p);
    return c.complete(net);
  });
}