diff --git a/packages/.DS_Store b/packages/.DS_Store index 3b8fc21..0be6d47 100644 Binary files a/packages/.DS_Store and b/packages/.DS_Store differ diff --git a/packages/apple_vision/example/macos/Podfile b/packages/apple_vision/example/macos/Podfile index f2b2b61..43fd9c5 100644 --- a/packages/apple_vision/example/macos/Podfile +++ b/packages/apple_vision/example/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '12.0' +platform :osx, '14.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/packages/apple_vision/example/macos/Runner.xcodeproj/project.pbxproj b/packages/apple_vision/example/macos/Runner.xcodeproj/project.pbxproj index 389b635..2451df1 100644 --- a/packages/apple_vision/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/apple_vision/example/macos/Runner.xcodeproj/project.pbxproj @@ -404,7 +404,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -426,7 +426,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; @@ -484,7 +484,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -531,7 +531,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -553,7 +553,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -574,7 +574,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; diff --git a/packages/apple_vision/pubspec.yaml b/packages/apple_vision/pubspec.yaml index a7b1a62..2e12225 100644 --- a/packages/apple_vision/pubspec.yaml +++ b/packages/apple_vision/pubspec.yaml @@ -12,7 +12,6 @@ dependencies: sdk: flutter apple_vision_animal_pose: ^0.0.2 - apple_vision_pose_3d: ^0.0.1 apple_vision_commons: ^0.0.2 apple_vision_face: ^0.0.3 apple_vision_face_detection: ^0.0.2 @@ -21,9 +20,10 @@ dependencies: apple_vision_object: ^0.0.2 apple_vision_object_tracking: ^0.0.2 apple_vision_pose: ^0.0.3 + apple_vision_pose_3d: ^0.0.1 apple_vision_recognize_text: ^0.0.2 - apple_vision_selfie: ^0.0.2 apple_vision_scanner: ^0.0.2 + apple_vision_selfie: ^0.0.2 dev_dependencies: flutter_test: diff --git a/packages/apple_vision_image_classification/README.md b/packages/apple_vision_image_classification/README.md index 2116b6c..2c7cb8f 100644 --- a/packages/apple_vision_image_classification/README.md +++ b/packages/apple_vision_image_classification/README.md @@ -5,7 +5,7 @@ [![Star on Github](https://img.shields.io/github/stars/Knightro63/apple_vision.svg?style=flat&logo=github&colorB=deeppink&label=stars)](https://github.com/Knightro63/apple_vision) [![License: MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT) -Apple Vision Selfie Detection is a Flutter plugin that enables Flutter apps to use [Apple Vision Image Classification](https://developer.apple.com/documentation/vision/classifying_images_with_vision_and_core_ml). +Apple Vision Image Classification is a Flutter plugin that enables Flutter apps to use [Apple Vision Image Classification](https://developer.apple.com/documentation/vision/classifying_images_with_vision_and_core_ml). - This plugin is not sponsor or maintained by Apple. The [authors](https://github.com/Knightro63/apple_vision/blob/main/AUTHORS) are developers who wanted to make a similar plugin to Google's ml kit for macos. diff --git a/packages/apple_vision_image_classification/darwin/Classes/AppleVisionImageClassificationPlugin.swift b/packages/apple_vision_image_classification/darwin/Classes/AppleVisionImageClassificationPlugin.swift index 6cb6b56..fe07888 100644 --- a/packages/apple_vision_image_classification/darwin/Classes/AppleVisionImageClassificationPlugin.swift +++ b/packages/apple_vision_image_classification/darwin/Classes/AppleVisionImageClassificationPlugin.swift @@ -161,7 +161,7 @@ public class AppleVisionImageClassificationPlugin: NSObject, FlutterPlugin { } func processObservation(_ observation: VNClassificationObservation,_ imageSize: CGSize) -> [String:Any?]? { - if observation.confidence > 0.75{ + if observation.confidence > 0.0{ return [ "label":observation.identifier, "confidence": observation.confidence diff --git a/packages/apple_vision_image_classification/pubspec.yaml b/packages/apple_vision_image_classification/pubspec.yaml index 620008d..3826093 100644 --- a/packages/apple_vision_image_classification/pubspec.yaml +++ b/packages/apple_vision_image_classification/pubspec.yaml @@ -1,5 +1,5 @@ name: apple_vision_image_classification -description: A Flutter plugin to use Apple Vision Image Classification the classifies an image. +description: A Flutter plugin to use Apple Vision Image Classification to classifies an image. version: 0.0.2 homepage: https://github.com/Knightro63/apple_vision/tree/main/packages/apple_vision_image_classification diff --git a/packages/apple_vision_image_depth/.gitignore b/packages/apple_vision_image_depth/.gitignore new file mode 100644 index 0000000..ff6ca49 --- /dev/null +++ b/packages/apple_vision_image_depth/.gitignore @@ -0,0 +1,132 @@ +# Miscellaneous +*.class +*.lock +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.ipr +*.iws +.idea/ + +# Visual Studio Code related +.classpath +.project +.settings/ +.vscode/* + +# Flutter repo-specific +/bin/cache/ +/bin/internal/bootstrap.bat +/bin/internal/bootstrap.sh +/bin/mingit/ +/dev/benchmarks/mega_gallery/ +/dev/bots/.recipe_deps +/dev/bots/android_tools/ +/dev/devicelab/ABresults*.json +/dev/docs/doc/ +/dev/docs/flutter.docs.zip +/dev/docs/lib/ +/dev/docs/pubspec.yaml +/dev/integration_tests/**/xcuserdata +/dev/integration_tests/**/Pods +/packages/flutter/coverage/ +version +analysis_benchmark.json + +# packages file containing multi-root paths +.packages.generated + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +**/generated_plugin_registrant.dart +.packages +.pub-preload-cache/ +.pub/ +build/ +flutter_*.png +linked_*.ds +unlinked.ds +unlinked_spec.ds + +# Android related +**/android/**/gradle-wrapper.jar +.gradle/ +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java +**/android/key.properties +*.jks + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/ephemeral +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# macOS +**/Flutter/ephemeral/ +**/Pods/ +**/macos/Flutter/GeneratedPluginRegistrant.swift +**/macos/Flutter/ephemeral +**/xcuserdata/ + +# Windows +**/windows/flutter/generated_plugin_registrant.cc +**/windows/flutter/generated_plugin_registrant.h +**/windows/flutter/generated_plugins.cmake + +# Linux +**/linux/flutter/generated_plugin_registrant.cc +**/linux/flutter/generated_plugin_registrant.h +**/linux/flutter/generated_plugins.cmake + +# Coverage +coverage/ + +# Symbols +app.*.symbols + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +!/dev/ci/**/Gemfile.lock +!.vscode/settings.json \ No newline at end of file diff --git a/packages/apple_vision_image_depth/CHANGELOG.md b/packages/apple_vision_image_depth/CHANGELOG.md new file mode 100644 index 0000000..29f648f --- /dev/null +++ b/packages/apple_vision_image_depth/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* Initial release diff --git a/packages/apple_vision_image_depth/LICENSE b/packages/apple_vision_image_depth/LICENSE new file mode 100644 index 0000000..fad3dc4 --- /dev/null +++ b/packages/apple_vision_image_depth/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 John Sparkman. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/apple_vision_image_depth/README.md b/packages/apple_vision_image_depth/README.md new file mode 100644 index 0000000..a63db2e --- /dev/null +++ b/packages/apple_vision_image_depth/README.md @@ -0,0 +1,133 @@ +# apple\_vision\_image\_depth + +[![Pub Version](https://img.shields.io/pub/v/apple_vision_image_depth)](https://pub.dev/packages/apple_vision_image_depth) +[![analysis](https://github.com/Knightro63/apple_vision/actions/workflows/flutter.yml/badge.svg)](https://github.com/Knightro63/apple_vision/actions/) +[![Star on Github](https://img.shields.io/github/stars/Knightro63/apple_vision.svg?style=flat&logo=github&colorB=deeppink&label=stars)](https://github.com/Knightro63/apple_vision) +[![License: MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT) + +Apple Vision Depth Detection is a Flutter plugin that enables Flutter apps to use [Apple Vision Image Depth](https://developer.apple.com/documentation/avfoundation/additional_data_capture/capturing_photos_with_depth). + +- This plugin is not sponsor or maintained by Apple. The [authors](https://github.com/Knightro63/apple_vision/blob/main/AUTHORS) are developers who wanted to make a similar plugin to Google's ml kit for macos. + +## Requirements + +**MacOS** + - Minimum osx Deployment Target: 10.13 + - Xcode 13 or newer + - Swift 5 + - ML Kit only supports 64-bit architectures (x86_64 and arm64). + +**iOS** + - Minimum ios Deployment Target: 14.0 + - Xcode 13 or newer + - Swift 5 + - ML Kit only supports 64-bit architectures (x86_64 and arm64). + +## Getting Started + +You need to first import 'package:apple_vision/apple_vision.dart'; + +```dart + final GlobalKey cameraKey = GlobalKey(debugLabel: "cameraKey"); + AppleVisionImageClassificationController visionController = AppleVisionImageClassificationController(); + InsertCamera camera = InsertCamera(); + Size imageSize = const Size(640,640*9/16); + String? deviceId; + bool loading = true; + + List