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 Map<Object?, Object?>? replyMap =
  await channel.send(<Object?>[arg_index, arg_imageData, arg_imageBytesList, arg_imageWidthForBytesList, arg_imageHeightForBytesList, arg_minimumScore, arg_IOUThreshold, arg_boxesLimit]) as Map<Object?, Object?>?;
  if (replyMap == null) {
    throw PlatformException(
      code: 'channel-error',
      message: 'Unable to establish connection on channel.',
    );
  } else if (replyMap['error'] != null) {
    final Map<Object?, Object?> error = (replyMap['error'] as Map<Object?, Object?>?)!;
    throw PlatformException(
      code: (error['code'] as String?)!,
      message: error['message'] as String?,
      details: error['details'],
    );
  } else if (replyMap['result'] == null) {
    throw PlatformException(
      code: 'null-error',
      message: 'Host platform returned null value for non-null return value.',
    );
  } else {
    return (replyMap['result'] as List<Object?>?)!.cast<ResultObjectDetection?>();
  }
}