Net.fromCaffeBytes constructor

Net.fromCaffeBytes(
  1. Uint8List bufferProto,
  2. Uint8List bufferModel
)

Reads a network model stored in Caffe model in memory. https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga5b1fd56ca658f10c3bd544ea46f57164

Implementation

factory Net.fromCaffeBytes(Uint8List bufferProto, Uint8List bufferModel) {
  final p = calloc<cvg.Net>();
  final bufP = VecUChar.fromList(bufferProto);
  final bufM = VecUChar.fromList(bufferModel);
  cvRun(() => cffi.Net_ReadNetFromCaffeBytes(bufP.ref, bufM.ref, p));
  final net = Net._(p);
  return net;
}