Skip to content

Commit

Permalink
update pigeon to v22.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelaziz-mahdy committed Oct 9, 2024
1 parent 73fb287 commit e0c0a39
Show file tree
Hide file tree
Showing 7 changed files with 423 additions and 343 deletions.
210 changes: 139 additions & 71 deletions android/src/main/java/com/abdelaziz_mahdy/pytorch_lite/Pigeon.java

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ packages:
dependency: transitive
description:
name: camera_android_camerax
sha256: "8bd9cab67551642eb33ceb33ece7acc0890014fc90ddfae637c7e2b683657e65"
sha256: e3627fdc2132d89212b8a8676679f5b07008c7e3d8ae00cea775c3397f9e742b
url: "https://pub.dev"
source: hosted
version: "0.6.7+2"
version: "0.6.10"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655"
sha256: "0d04cec8715b59fb6dc60eefb47e69024f51233c570e475b886dc9290568bca7"
url: "https://pub.dev"
source: hosted
version: "0.9.17+3"
version: "0.9.17+4"
camera_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -109,10 +109,10 @@ packages:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.5"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -133,10 +133,10 @@ packages:
dependency: transitive
description:
name: ffi
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.3"
file:
dependency: transitive
description:
Expand All @@ -149,18 +149,18 @@ packages:
dependency: transitive
description:
name: file_selector_linux
sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492"
sha256: "712ce7fab537ba532c8febdb1a8f167b32441e74acd68c3ccb2e36dcb52c4ab2"
url: "https://pub.dev"
source: hosted
version: "0.9.2+1"
version: "0.9.3"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385
sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc"
url: "https://pub.dev"
source: hosted
version: "0.9.4"
version: "0.9.4+2"
file_selector_platform_interface:
dependency: transitive
description:
Expand All @@ -173,10 +173,10 @@ packages:
dependency: transitive
description:
name: file_selector_windows
sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69"
sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4"
url: "https://pub.dev"
source: hosted
version: "0.9.3+2"
version: "0.9.3+3"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -199,10 +199,10 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "9d98bd47ef9d34e803d438f17fd32b116d31009f534a6fa5ce3a1167f189a6de"
sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398"
url: "https://pub.dev"
source: hosted
version: "2.0.21"
version: "2.0.23"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -254,10 +254,10 @@ packages:
dependency: transitive
description:
name: image_picker_android
sha256: c0e72ecd170b00a5590bb71238d57dc8ad22ee14c60c6b0d1a4e05cafbc5db4b
sha256: d3e5e00fdfeca8fd4ffb3227001264d449cc8950414c2ff70b0e06b9c628e643
url: "https://pub.dev"
source: hosted
version: "0.8.12+11"
version: "0.8.12+15"
image_picker_for_web:
dependency: transitive
description:
Expand Down Expand Up @@ -371,10 +371,10 @@ packages:
dependency: transitive
description:
name: mime
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
url: "https://pub.dev"
source: hosted
version: "1.0.5"
version: "1.0.6"
path:
dependency: transitive
description:
Expand All @@ -395,10 +395,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: "490539678396d4c3c0b06efdaab75ae60675c3e0c66f72bc04c2e2c1e0e2abeb"
sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a
url: "https://pub.dev"
source: hosted
version: "2.2.9"
version: "2.2.12"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -469,7 +469,7 @@ packages:
path: ".."
relative: true
source: path
version: "4.2.6"
version: "4.2.7"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -559,18 +559,18 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "14.2.4"
version: "14.2.5"
web:
dependency: transitive
description:
name: web
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.1.0"
webdriver:
dependency: transitive
description:
Expand All @@ -583,10 +583,10 @@ packages:
dependency: transitive
description:
name: xdg_directories
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.1.0"
xml:
dependency: transitive
description:
Expand All @@ -596,5 +596,5 @@ packages:
source: hosted
version: "6.5.0"
sdks:
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"
dart: ">=3.5.0 <4.0.0"
flutter: ">=3.24.0"
52 changes: 27 additions & 25 deletions ios/Classes/pigeon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v11.0.1), do not edit directly.
// Autogenerated from Pigeon (v22.4.2), do not edit directly.
// See also: https://pub.dev/packages/pigeon

#import <Foundation/Foundation.h>
Expand All @@ -16,50 +16,52 @@ NS_ASSUME_NONNULL_BEGIN
@interface PyTorchRect : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithLeft:(NSNumber *)left
top:(NSNumber *)top
right:(NSNumber *)right
bottom:(NSNumber *)bottom
width:(NSNumber *)width
height:(NSNumber *)height;
@property(nonatomic, strong) NSNumber * left;
@property(nonatomic, strong) NSNumber * top;
@property(nonatomic, strong) NSNumber * right;
@property(nonatomic, strong) NSNumber * bottom;
@property(nonatomic, strong) NSNumber * width;
@property(nonatomic, strong) NSNumber * height;
+ (instancetype)makeWithLeft:(double )left
top:(double )top
right:(double )right
bottom:(double )bottom
width:(double )width
height:(double )height;
@property(nonatomic, assign) double left;
@property(nonatomic, assign) double top;
@property(nonatomic, assign) double right;
@property(nonatomic, assign) double bottom;
@property(nonatomic, assign) double width;
@property(nonatomic, assign) double height;
@end

@interface ResultObjectDetection : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithClassIndex:(NSNumber *)classIndex
+ (instancetype)makeWithClassIndex:(NSInteger )classIndex
className:(nullable NSString *)className
score:(NSNumber *)score
score:(double )score
rect:(PyTorchRect *)rect;
@property(nonatomic, strong) NSNumber * classIndex;
@property(nonatomic, assign) NSInteger classIndex;
@property(nonatomic, copy, nullable) NSString * className;
@property(nonatomic, strong) NSNumber * score;
@property(nonatomic, assign) double score;
@property(nonatomic, strong) PyTorchRect * rect;
@end

/// The codec used by ModelApi.
NSObject<FlutterMessageCodec> *ModelApiGetCodec(void);
/// The codec used by all APIs.
NSObject<FlutterMessageCodec> *nullGetPigeonCodec(void);

@protocol ModelApi
- (void)loadModelModelPath:(NSString *)modelPath numberOfClasses:(nullable NSNumber *)numberOfClasses imageWidth:(nullable NSNumber *)imageWidth imageHeight:(nullable NSNumber *)imageHeight objectDetectionModelType:(nullable NSNumber *)objectDetectionModelType completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion;
///predicts abstract number input
- (void)getPredictionCustomIndex:(NSNumber *)index input:(NSArray<NSNumber *> *)input shape:(NSArray<NSNumber *> *)shape dtype:(NSString *)dtype completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion;
- (void)getPredictionCustomIndex:(NSInteger)index input:(NSArray<NSNumber *> *)input shape:(NSArray<NSNumber *> *)shape dtype:(NSString *)dtype completion:(void (^)(NSArray<id> *_Nullable, FlutterError *_Nullable))completion;
///predicts raw image but returns the raw net output
- (void)getRawImagePredictionListIndex:(NSNumber *)index imageData:(FlutterStandardTypedData *)imageData completion:(void (^)(NSArray<NSNumber *> *_Nullable, FlutterError *_Nullable))completion;
- (void)getRawImagePredictionListIndex:(NSInteger)index imageData:(FlutterStandardTypedData *)imageData completion:(void (^)(NSArray<NSNumber *> *_Nullable, FlutterError *_Nullable))completion;
///predicts raw image but returns the raw net output
- (void)getRawImagePredictionListObjectDetectionIndex:(NSNumber *)index imageData:(FlutterStandardTypedData *)imageData minimumScore:(NSNumber *)minimumScore IOUThreshold:(NSNumber *)IOUThreshold boxesLimit:(NSNumber *)boxesLimit completion:(void (^)(NSArray<ResultObjectDetection *> *_Nullable, FlutterError *_Nullable))completion;
- (void)getRawImagePredictionListObjectDetectionIndex:(NSInteger)index imageData:(FlutterStandardTypedData *)imageData minimumScore:(double)minimumScore IOUThreshold:(double)IOUThreshold boxesLimit:(NSInteger)boxesLimit completion:(void (^)(NSArray<ResultObjectDetection *> *_Nullable, FlutterError *_Nullable))completion;
///predicts image but returns the raw net output
- (void)getImagePredictionListIndex:(NSNumber *)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray<FlutterStandardTypedData *> *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList mean:(NSArray<NSNumber *> *)mean std:(NSArray<NSNumber *> *)std completion:(void (^)(NSArray<NSNumber *> *_Nullable, FlutterError *_Nullable))completion;
- (void)getImagePredictionListIndex:(NSInteger)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray<FlutterStandardTypedData *> *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList mean:(NSArray<NSNumber *> *)mean std:(NSArray<NSNumber *> *)std completion:(void (^)(NSArray<NSNumber *> *_Nullable, FlutterError *_Nullable))completion;
///predicts image but returns the output detections
- (void)getImagePredictionListObjectDetectionIndex:(NSNumber *)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray<FlutterStandardTypedData *> *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList minimumScore:(NSNumber *)minimumScore IOUThreshold:(NSNumber *)IOUThreshold boxesLimit:(NSNumber *)boxesLimit completion:(void (^)(NSArray<ResultObjectDetection *> *_Nullable, FlutterError *_Nullable))completion;
- (void)getImagePredictionListObjectDetectionIndex:(NSInteger)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray<FlutterStandardTypedData *> *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList minimumScore:(double)minimumScore IOUThreshold:(double)IOUThreshold boxesLimit:(NSInteger)boxesLimit completion:(void (^)(NSArray<ResultObjectDetection *> *_Nullable, FlutterError *_Nullable))completion;
@end

extern void ModelApiSetup(id<FlutterBinaryMessenger> binaryMessenger, NSObject<ModelApi> *_Nullable api);
extern void SetUpModelApi(id<FlutterBinaryMessenger> binaryMessenger, NSObject<ModelApi> *_Nullable api);

extern void SetUpModelApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger, NSObject<ModelApi> *_Nullable api, NSString *messageChannelSuffix);

NS_ASSUME_NONNULL_END
Loading

0 comments on commit e0c0a39

Please sign in to comment.