getImagePredictionListObjectDetection method

Future<List<ResultObjectDetection?>> getImagePredictionListObjectDetection(
  1. int arg_index,
  2. Uint8List? arg_imageData,
  3. List<Uint8List?>? arg_imageBytesList,
  4. int? arg_imageWidthForBytesList,
  5. int? arg_imageHeightForBytesList,
  6. double arg_minimumScore,
  7. double arg_IOUThreshold,
  8. int arg_boxesLimit,
)

predicts image but returns the output detections

Implementation

Future<List<ResultObjectDetection?>> getImagePredictionListObjectDetection(
    int arg_index,
    Uint8List? arg_imageData,
    List<Uint8List?>? arg_imageBytesList,
    int? arg_imageWidthForBytesList,
    int? arg_imageHeightForBytesList,
    double arg_minimumScore,
    double arg_IOUThreshold,
    int arg_boxesLimit) async {
  final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
      'dev.flutter.pigeon.ModelApi.getImagePredictionListObjectDetection',
      codec,
      binaryMessenger: _binaryMessenger);
  final List<Object?>? replyList = await channel.send(<Object?>[
    arg_index,
    arg_imageData,
    arg_imageBytesList,
    arg_imageWidthForBytesList,
    arg_imageHeightForBytesList,
    arg_minimumScore,
    arg_IOUThreshold,
    arg_boxesLimit
  ]) as List<Object?>?;
  if (replyList == null) {
    throw PlatformException(
      code: 'channel-error',
      message: 'Unable to establish connection on channel.',
    );
  } else if (replyList.length > 1) {
    throw PlatformException(
      code: replyList[0]! as String,
      message: replyList[1] as String?,
      details: replyList[2],
    );
  } else if (replyList[0] == null) {
    throw PlatformException(
      code: 'null-error',
      message: 'Host platform returned null value for non-null return value.',
    );
  } else {
    return (replyList[0] as List<Object?>?)!.cast<ResultObjectDetection?>();
  }
}