├── android ├── app │ ├── src │ │ ├── main │ │ │ ├── assets │ │ │ │ ├── labels │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── fruit_label_list │ │ │ │ └── models │ │ │ │ │ └── .gitkeep │ │ │ ├── jniLibs │ │ │ │ ├── arm64-v8a │ │ │ │ │ ├── libhiai.so │ │ │ │ │ ├── libhiai_ir.so │ │ │ │ │ ├── libc++_shared.so │ │ │ │ │ ├── libhiai_ir_build.so │ │ │ │ │ └── libpaddle_lite_jni.so │ │ │ │ └── armeabi-v7a │ │ │ │ │ ├── libhiai.so │ │ │ │ │ ├── libhiai_ir.so │ │ │ │ │ ├── libc++_shared.so │ │ │ │ │ ├── libhiai_ir_build.so │ │ │ │ │ └── libpaddle_lite_jni.so │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── realtimeod │ │ │ │ ├── Utils.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── Predictor.java │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle.properties ├── .gitignore ├── .idea │ ├── caches │ │ └── build_file_checksums.ser │ ├── libraries │ │ ├── Gradle____local_aars_____app_libs_PaddlePredictor_jar_unspecified_jar.xml │ │ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml │ │ ├── Gradle____local_aars________build_app_intermediates_flutter_debug_libs_jar_unspecified_jar.xml │ │ ├── Gradle__io_flutter_x86_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml │ │ ├── Gradle__io_flutter_x86_64_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml │ │ ├── Gradle__io_flutter_arm64_v8a_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml │ │ ├── Gradle__io_flutter_armeabi_v7a_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml │ │ ├── Gradle__androidx_arch_core_core_common_2_0_0_jar.xml │ │ ├── Gradle__androidx_collection_collection_1_0_0_jar.xml │ │ ├── Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml │ │ ├── Gradle__androidx_lifecycle_lifecycle_common_java8_2_0_0_jar.xml │ │ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml │ │ ├── Gradle__junit_junit_4_12_jar.xml │ │ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml │ │ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml │ │ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml │ │ ├── Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml │ │ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml │ │ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml │ │ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml │ │ ├── Gradle__androidx_vectordrawable_vectordrawable_1_0_0_aar.xml │ │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml │ │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml │ │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml │ │ ├── Gradle__javax_inject_javax_inject_1_jar.xml │ │ ├── Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml │ │ ├── Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml │ │ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml │ │ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml │ │ ├── Gradle__org_jetbrains_annotations_13_0_jar.xml │ │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml │ │ ├── Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml │ │ ├── Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml │ │ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml │ │ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml │ │ ├── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml │ │ ├── Gradle__androidx_annotation_annotation_1_0_0_jar.xml │ │ ├── Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml │ │ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml │ │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_50_jar.xml │ │ ├── Gradle__androidx_core_core_1_0_0_aar.xml │ │ ├── Gradle__androidx_print_print_1_0_0_aar.xml │ │ ├── Gradle__androidx_test_runner_1_1_1_aar.xml │ │ ├── Gradle__androidx_test_monitor_1_1_1_aar.xml │ │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_50_jar.xml │ │ ├── Gradle__androidx_fragment_fragment_1_0_0_aar.xml │ │ ├── Gradle__io_flutter_flutter_embedding_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml │ │ ├── Gradle__androidx_appcompat_appcompat_1_0_0_aar.xml │ │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_50_jar.xml │ │ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml │ │ ├── Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml │ │ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml │ │ ├── Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml │ │ └── Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml │ ├── misc.xml │ ├── runConfigurations.xml │ ├── gradle.xml │ ├── modules.xml │ ├── codeStyles │ │ └── Project.xml │ └── workspace.xml ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ └── contents.xcworkspacedata ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj └── .gitignore ├── .idea ├── .gitignore └── misc.xml ├── imgs └── 20200324184756.jpg ├── test └── widget_test.dart ├── README.md ├── lib ├── object_detector.dart └── main.dart ├── pubspec.yaml ├── .gitignore └── LICENSE /android/app/src/main/assets/labels/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/app/src/main/assets/models/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /android/app/src/main/assets/labels/fruit_label_list: -------------------------------------------------------------------------------- 1 | apple 2 | banana 3 | orange 4 | -------------------------------------------------------------------------------- /imgs/20200324184756.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/imgs/20200324184756.jpg -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libhiai.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/arm64-v8a/libhiai.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libhiai.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/armeabi-v7a/libhiai.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libhiai_ir.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/arm64-v8a/libhiai_ir.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libhiai_ir.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/armeabi-v7a/libhiai_ir.so -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libhiai_ir_build.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/arm64-v8a/libhiai_ir_build.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libpaddle_lite_jni.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/arm64-v8a/libpaddle_lite_jni.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libhiai_ir_build.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/armeabi-v7a/libhiai_ir_build.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libpaddle_lite_jni.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/android/app/src/main/jniLibs/armeabi-v7a/libpaddle_lite_jni.so -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelErr/realtime-object-detector/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Mar 18 01:06:47 CST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle____local_aars_____app_libs_PaddlePredictor_jar_unspecified_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle____local_aars________build_app_intermediates_flutter_debug_libs_jar_unspecified_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:realtimeod/main.dart'; 12 | 13 | void main() { 14 | } 15 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__io_flutter_x86_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__io_flutter_x86_64_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__io_flutter_arm64_v8a_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__io_flutter_armeabi_v7a_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_java8_2_0_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__junit_junit_4_12_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__org_jetbrains_annotations_13_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_50_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_core_core_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_test_runner_1_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_test_monitor_1_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_50_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__io_flutter_flutter_embedding_debug_1_0_0_e1e6ced81d029258d449bdec2ba3cddca9c2ca0c_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_50_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.6.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | 33 | 34 | allprojects { 35 | gradle.projectsEvaluated { 36 | tasks.withType(JavaCompile) { 37 | options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Real-time Object Detector 2 | 3 | 这是一款基于[Paddle-Lite](https://github.com/paddlepaddle/paddle-lite)的实时目标检测App,使用Flutter开发,模型默认支持的是YOLO v3。 4 | 5 | ## 开发环境 6 | 7 | - OS: Ubuntu 8 | - Flutter version 1.22.5 9 | - Dart version 2.10.4 10 | - Paddle Lite预编译库 2.6.1 11 | - armv8测试通过 12 | 13 | ## 介绍及截图 14 | 15 | 模型下载地址: https://pan.baidu.com/s/1lO1HWiD-AZC_bXx92RqhmA 提取码: jgmd 16 | 17 | 请将模型放至`android/app/src/main/assets/models/fruit`路径下。 18 | 19 | 详细介绍位置:[基于Paddle-Lite的实时目标检测程序(Flutter & YOLO v3)](https://oldblog.lirui.tech/2020/%E5%9F%BA%E4%BA%8Epaddle-lite%E7%9A%84%E5%AE%9E%E6%97%B6%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B%E7%A8%8B%E5%BA%8F-flutter-yolo-v3/) 及 [使用飞桨框架部署SSD目标检测模型](https://oldblog.lirui.tech/2020/%E4%BD%BF%E7%94%A8%E9%A3%9E%E6%A1%A8%E6%A1%86%E6%9E%B6%E9%83%A8%E7%BD%B2ssd%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B%E6%A8%A1%E5%9E%8B/) 20 | 21 | English tutorial: [Real-time Object Detection on Android using Paddle-Lite](https://oldblog.lirui.tech/2020/real-time-object-detection-on-android-using-paddle-lite/) 22 | 23 | Demo截图: 24 | 25 | ![Screenshot](imgs/20200324184756.jpg) 26 | -------------------------------------------------------------------------------- /android/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | realtimeod 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/object_detector.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:camera/camera.dart'; 3 | import 'package:flutter/services.dart'; 4 | 5 | class ObjectDetector extends ValueNotifier { 6 | ObjectDetector._() : super(null); 7 | 8 | static CameraController _controller; 9 | 10 | static bool _isDetecting = false; 11 | static const platform = const MethodChannel('paddlelite'); 12 | 13 | static final ObjectDetector instance = ObjectDetector._(); 14 | void init(CameraController controller) async { 15 | _controller = controller; 16 | _controller.initialize().then((_) { 17 | _controller.startImageStream((CameraImage image) { 18 | if (!_isDetecting) { 19 | _isDetecting = true; 20 | _runDetection(image); 21 | } 22 | }); 23 | }); 24 | } 25 | 26 | void _runDetection(CameraImage image) async { 27 | try { 28 | var inputImage = new Map(); 29 | inputImage["planes"] = new List(image.planes.length); 30 | for (int i = 0; i < image.planes.length; i++) { 31 | var value = {}; 32 | value["bytes"] = image.planes[i].bytes; 33 | value["bytesPerRow"] = image.planes[i].bytesPerRow; 34 | value["bytesPerPixel"] = image.planes[i].bytesPerPixel; 35 | value["height"] = image.planes[i].height; 36 | value["width"] = image.planes[i].width; 37 | inputImage["planes"][i] = value; 38 | } 39 | inputImage["height"] = image.height; 40 | inputImage["width"] = image.width; 41 | inputImage["rotation"] = 90; 42 | 43 | print("Run model."); 44 | var results = await platform.invokeMethod( 45 | 'detectObject', 46 | inputImage, 47 | ); 48 | value = results; 49 | 50 | } finally { 51 | _isDetecting = false; 52 | } 53 | } 54 | 55 | @override 56 | void dispose() { 57 | super.dispose(); 58 | suspend(); 59 | } 60 | 61 | void suspend() { 62 | _controller?.dispose(); 63 | _controller = null; 64 | value = null; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | aaptOptions { 32 | noCompress "assets" 33 | } 34 | 35 | sourceSets { 36 | main.java.srcDirs += 'src/main/kotlin' 37 | } 38 | 39 | lintOptions { 40 | disable 'InvalidPackage' 41 | } 42 | 43 | defaultConfig { 44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 | applicationId "com.example.realtimeod" 46 | minSdkVersion 21 47 | targetSdkVersion 28 48 | versionCode flutterVersionCode.toInteger() 49 | versionName flutterVersionName 50 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation fileTree(include: ['*.jar'], dir: 'libs') 68 | implementation 'com.android.support:appcompat-v7:28.0.0' 69 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 70 | testImplementation 'junit:junit:4.12' 71 | androidTestImplementation 'androidx.test:runner:1.1.1' 72 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 73 | } 74 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: realtimeod 2 | description: A real-time object detector based on Paddle-lite. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | camera: ^0.5.8+17 27 | 28 | dev_dependencies: 29 | flutter_test: 30 | sdk: flutter 31 | 32 | 33 | # For information on the generic Dart part of this file, see the 34 | # following page: https://dart.dev/tools/pub/pubspec 35 | 36 | # The following section is specific to Flutter. 37 | flutter: 38 | 39 | # The following line ensures that the Material Icons font is 40 | # included with your application, so that you can use the icons in 41 | # the material Icons class. 42 | uses-material-design: true 43 | 44 | # To add assets to your application, add an assets section, like this: 45 | # assets: 46 | # - images/a_dot_burr.jpeg 47 | # - images/a_dot_ham.jpeg 48 | 49 | # An image asset can refer to one or more resolution-specific "variants", see 50 | # https://flutter.dev/assets-and-images/#resolution-aware. 51 | 52 | # For details regarding adding assets from package dependencies, see 53 | # https://flutter.dev/assets-and-images/#from-packages 54 | 55 | # To add custom fonts to your application, add a fonts section here, 56 | # in this "flutter" section. Each entry in this list should have a 57 | # "family" key with the font family name, and a "fonts" key with a 58 | # list giving the asset and other descriptors for the font. For 59 | # example: 60 | # fonts: 61 | # - family: Schyler 62 | # fonts: 63 | # - asset: fonts/Schyler-Regular.ttf 64 | # - asset: fonts/Schyler-Italic.ttf 65 | # style: italic 66 | # - family: Trajan Pro 67 | # fonts: 68 | # - asset: fonts/TrajanPro.ttf 69 | # - asset: fonts/TrajanPro_Bold.ttf 70 | # weight: 700 71 | # 72 | # For details regarding fonts from package dependencies, 73 | # see https://flutter.dev/custom-fonts/#from-packages 74 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/realtimeod/Utils.java: -------------------------------------------------------------------------------- 1 | package com.example.realtimeod; 2 | 3 | import android.content.Context; 4 | import android.os.Environment; 5 | 6 | import java.io.BufferedInputStream; 7 | import java.io.BufferedOutputStream; 8 | import java.io.File; 9 | import java.io.FileNotFoundException; 10 | import java.io.FileOutputStream; 11 | import java.io.IOException; 12 | import java.io.InputStream; 13 | import java.io.OutputStream; 14 | 15 | public class Utils { 16 | private static final String TAG = Utils.class.getSimpleName(); 17 | 18 | public static void copyFileFromAssets(Context appCtx, String srcPath, String dstPath) { 19 | if (srcPath.isEmpty() || dstPath.isEmpty()) { 20 | return; 21 | } 22 | InputStream is = null; 23 | OutputStream os = null; 24 | try { 25 | is = new BufferedInputStream(appCtx.getAssets().open(srcPath)); 26 | os = new BufferedOutputStream(new FileOutputStream(new File(dstPath))); 27 | byte[] buffer = new byte[1024]; 28 | int length = 0; 29 | while ((length = is.read(buffer)) != -1) { 30 | os.write(buffer, 0, length); 31 | } 32 | } catch (FileNotFoundException e) { 33 | e.printStackTrace(); 34 | } catch (IOException e) { 35 | e.printStackTrace(); 36 | } finally { 37 | try { 38 | os.close(); 39 | is.close(); 40 | } catch (IOException e) { 41 | e.printStackTrace(); 42 | } 43 | } 44 | } 45 | 46 | public static void copyDirectoryFromAssets(Context appCtx, String srcDir, String dstDir) { 47 | if (srcDir.isEmpty() || dstDir.isEmpty()) { 48 | return; 49 | } 50 | try { 51 | if (!new File(dstDir).exists()) { 52 | new File(dstDir).mkdirs(); 53 | } 54 | for (String fileName : appCtx.getAssets().list(srcDir)) { 55 | String srcSubPath = srcDir + File.separator + fileName; 56 | String dstSubPath = dstDir + File.separator + fileName; 57 | if (new File(srcSubPath).isDirectory()) { 58 | copyDirectoryFromAssets(appCtx, srcSubPath, dstSubPath); 59 | } else { 60 | copyFileFromAssets(appCtx, srcSubPath, dstSubPath); 61 | } 62 | } 63 | } catch (Exception e) { 64 | e.printStackTrace(); 65 | } 66 | } 67 | 68 | public static float[] parseFloatsFromString(String string, String delimiter) { 69 | String[] pieces = string.trim().toLowerCase().split(delimiter); 70 | float[] floats = new float[pieces.length]; 71 | for (int i = 0; i < pieces.length; i++) { 72 | floats[i] = Float.parseFloat(pieces[i].trim()); 73 | } 74 | return floats; 75 | } 76 | 77 | public static long[] parseLongsFromString(String string, String delimiter) { 78 | String[] pieces = string.trim().toLowerCase().split(delimiter); 79 | long[] longs = new long[pieces.length]; 80 | for (int i = 0; i < pieces.length; i++) { 81 | longs[i] = Long.parseLong(pieces[i].trim()); 82 | } 83 | return longs; 84 | } 85 | 86 | public static String getSDCardDirectory() { 87 | return Environment.getExternalStorageDirectory().getAbsolutePath(); 88 | } 89 | 90 | public static boolean isSupportedNPU() { 91 | String hardware = android.os.Build.HARDWARE; 92 | return hardware.equalsIgnoreCase("kirin810") || hardware.equalsIgnoreCase("kirin990"); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /android/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:camera/camera.dart'; 5 | import 'package:realtimeod/object_detector.dart'; 6 | 7 | List cameras; 8 | 9 | Future main() async { 10 | await WidgetsFlutterBinding.ensureInitialized(); 11 | try { 12 | cameras = await availableCameras(); 13 | } on CameraException catch (e) { 14 | print('Error: $e.code\nError Message: $e.message'); 15 | } 16 | await _loadModel(); 17 | runApp(ObjectDetectApp()); 18 | } 19 | 20 | Future _loadModel() async { 21 | try { 22 | const platform = const MethodChannel('paddlelite'); 23 | final String result = await platform.invokeMethod('loadModel'); 24 | print(result); 25 | } on PlatformException catch (e) { 26 | print('Error: $e.code\nError Message: $e.message'); 27 | } 28 | } 29 | 30 | class ObjectDetectApp extends StatefulWidget { 31 | @override 32 | _ObjectDetectAppState createState() => new _ObjectDetectAppState(); 33 | } 34 | 35 | class _ObjectDetectAppState extends State 36 | with WidgetsBindingObserver { 37 | final ObjectDetector detector = ObjectDetector.instance; 38 | CameraController controller; 39 | GlobalKey _keyCameraPreview = GlobalKey(); 40 | @override 41 | void initState() { 42 | super.initState(); 43 | controller = CameraController(cameras[0], ResolutionPreset.medium); 44 | controller.initialize().then((_) { 45 | if (!mounted) { 46 | return; 47 | } 48 | setState(() {}); 49 | detector.addListener(() { 50 | setState(() {}); 51 | }); 52 | detector.init(controller); 53 | }); 54 | } 55 | 56 | @override 57 | void didChangeAppLifecycleState(AppLifecycleState state) { 58 | controller?.dispose(); 59 | detector.dispose(); 60 | super.dispose(); 61 | } 62 | 63 | @override 64 | void dispose() { 65 | controller?.dispose(); 66 | detector.dispose(); 67 | super.dispose(); 68 | } 69 | 70 | @override 71 | Widget build(BuildContext context) { 72 | return new MaterialApp( 73 | theme: ThemeData(primarySwatch: Colors.blueGrey), 74 | home: Scaffold( 75 | appBar: AppBar( 76 | title: Center( 77 | child: Text('Object Detector'), 78 | )), 79 | body: new Center( 80 | child: Column(children: [ 81 | _cameraPreviewWidget(detector.value), 82 | ]), 83 | ))); 84 | } 85 | 86 | Widget _cameraPreviewWidget(List value) { 87 | if (controller == null || !controller.value.isInitialized) { 88 | return const Text( 89 | 'Loading Camera', 90 | style: TextStyle( 91 | color: Colors.white, 92 | fontSize: 24.0, 93 | fontWeight: FontWeight.w900, 94 | ), 95 | ); 96 | } else { 97 | 98 | return new Stack(alignment: FractionalOffset.center, children: [ 99 | new AspectRatio( 100 | key: _keyCameraPreview, 101 | aspectRatio: controller.value.aspectRatio, 102 | child: new CameraPreview(controller)), 103 | new Positioned.fill( 104 | child: new CustomPaint( 105 | painter: new DrawObjects(value, _keyCameraPreview), 106 | )), 107 | ]); 108 | } 109 | 110 | } 111 | } 112 | 113 | class DrawObjects extends CustomPainter { 114 | List values; 115 | GlobalKey> keyCameraPreview; 116 | DrawObjects(this.values, this.keyCameraPreview); 117 | 118 | @override 119 | void paint(Canvas canvas, Size size) { 120 | print(values); 121 | if (values==null && values.isNotEmpty && values[0] == null) return; 122 | final RenderBox renderPreview = 123 | keyCameraPreview.currentContext.findRenderObject(); 124 | final sizeRed = renderPreview.size; 125 | 126 | var ratioW = sizeRed.width / 608; 127 | var ratioH = sizeRed.height / 608; 128 | for (var value in values) { 129 | var index = value[0]; 130 | Paint paint = new Paint(); 131 | paint.color = Colors.red; 132 | paint.strokeWidth = 2; 133 | double x1 = value[2] * ratioW, 134 | x2 = value[4] * ratioW, 135 | y1 = value[3] * ratioH, 136 | y2 = value[5] * ratioH; 137 | TextSpan span = new TextSpan( 138 | style: new TextStyle( 139 | color: Colors.black, 140 | background: paint, 141 | fontWeight: FontWeight.bold, 142 | fontSize: 14), 143 | text: " " + value[1] + " " + (double.parse(value[6])*100).toStringAsFixed(2) +" % "); 144 | TextPainter tp = new TextPainter(text: span, textAlign: TextAlign.left, 145 | textDirection: TextDirection.ltr); 146 | tp.layout(); 147 | tp.paint(canvas, new Offset(x1 + 1, y1 + 1)); 148 | canvas.drawLine(new Offset(x1, y1), new Offset(x2, y1), paint); 149 | canvas.drawLine(new Offset(x1, y1), new Offset(x1, y2), paint); 150 | canvas.drawLine(new Offset(x1, y2), new Offset(x2, y2), paint); 151 | canvas.drawLine(new Offset(x2, y1), new Offset(x2, y2), paint); 152 | } 153 | 154 | } 155 | 156 | @override 157 | bool shouldRepaint(DrawObjects oldDelegate) { 158 | return true; 159 | } 160 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/java,dart,linux,android,flutter,visualstudiocode 3 | # Edit at https://www.gitignore.io/?templates=java,dart,linux,android,flutter,visualstudiocode 4 | 5 | ### Android ### 6 | # Built application files 7 | *.apk 8 | *.ap_ 9 | *.aab 10 | 11 | # Files for the ART/Dalvik VM 12 | *.dex 13 | 14 | # Java class files 15 | *.class 16 | 17 | # Generated files 18 | bin/ 19 | gen/ 20 | out/ 21 | release/ 22 | 23 | # Gradle files 24 | .gradle/ 25 | build/ 26 | 27 | # Local configuration file (sdk path, etc) 28 | local.properties 29 | 30 | # Proguard folder generated by Eclipse 31 | proguard/ 32 | 33 | # Log Files 34 | *.log 35 | 36 | # Android Studio Navigation editor temp files 37 | .navigation/ 38 | 39 | # Android Studio captures folder 40 | captures/ 41 | 42 | # IntelliJ 43 | *.iml 44 | .idea/workspace.xml 45 | .idea/tasks.xml 46 | .idea/gradle.xml 47 | .idea/assetWizardSettings.xml 48 | .idea/dictionaries 49 | .idea/libraries 50 | # Android Studio 3 in .gitignore file. 51 | .idea/caches 52 | .idea/modules.xml 53 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 54 | .idea/navEditor.xml 55 | 56 | # Keystore files 57 | # Uncomment the following lines if you do not want to check your keystore files in. 58 | #*.jks 59 | #*.keystore 60 | 61 | # External native build folder generated in Android Studio 2.2 and later 62 | .externalNativeBuild 63 | 64 | # Google Services (e.g. APIs or Firebase) 65 | # google-services.json 66 | 67 | # Freeline 68 | freeline.py 69 | freeline/ 70 | freeline_project_description.json 71 | 72 | # fastlane 73 | fastlane/report.xml 74 | fastlane/Preview.html 75 | fastlane/screenshots 76 | fastlane/test_output 77 | fastlane/readme.md 78 | 79 | # Version control 80 | vcs.xml 81 | 82 | # lint 83 | lint/intermediates/ 84 | lint/generated/ 85 | lint/outputs/ 86 | lint/tmp/ 87 | # lint/reports/ 88 | 89 | ### Android Patch ### 90 | gen-external-apklibs 91 | output.json 92 | 93 | # Replacement of .externalNativeBuild directories introduced 94 | # with Android Studio 3.5. 95 | .cxx/ 96 | 97 | ### Dart ### 98 | # See https://www.dartlang.org/guides/libraries/private-files 99 | 100 | # Files and directories created by pub 101 | .dart_tool/ 102 | .packages 103 | # If you're building an application, you may want to check-in your pubspec.lock 104 | pubspec.lock 105 | 106 | # Directory created by dartdoc 107 | # If you don't generate documentation locally you can remove this line. 108 | doc/api/ 109 | 110 | # Avoid committing generated Javascript files: 111 | *.dart.js 112 | *.info.json # Produced by the --dump-info flag. 113 | *.js # When generated by dart2js. Don't specify *.js if your 114 | # project includes source files written in JavaScript. 115 | *.js_ 116 | *.js.deps 117 | *.js.map 118 | 119 | ### Flutter ### 120 | # Flutter/Dart/Pub related 121 | **/doc/api/ 122 | .flutter-plugins 123 | .flutter-plugins-dependencies 124 | .pub-cache/ 125 | .pub/ 126 | 127 | # Android related 128 | **/android/**/gradle-wrapper.jar 129 | **/android/.gradle 130 | **/android/captures/ 131 | **/android/gradlew 132 | **/android/gradlew.bat 133 | **/android/local.properties 134 | **/android/**/GeneratedPluginRegistrant.java 135 | 136 | # iOS/XCode related 137 | **/ios/**/*.mode1v3 138 | **/ios/**/*.mode2v3 139 | **/ios/**/*.moved-aside 140 | **/ios/**/*.pbxuser 141 | **/ios/**/*.perspectivev3 142 | **/ios/**/*sync/ 143 | **/ios/**/.sconsign.dblite 144 | **/ios/**/.tags* 145 | **/ios/**/.vagrant/ 146 | **/ios/**/DerivedData/ 147 | **/ios/**/Icon? 148 | **/ios/**/Pods/ 149 | **/ios/**/.symlinks/ 150 | **/ios/**/profile 151 | **/ios/**/xcuserdata 152 | **/ios/.generated/ 153 | **/ios/Flutter/App.framework 154 | **/ios/Flutter/Flutter.framework 155 | **/ios/Flutter/Generated.xcconfig 156 | **/ios/Flutter/app.flx 157 | **/ios/Flutter/app.zip 158 | **/ios/Flutter/flutter_assets/ 159 | **/ios/ServiceDefinitions.json 160 | **/ios/Runner/GeneratedPluginRegistrant.* 161 | 162 | # Exceptions to above rules. 163 | !**/ios/**/default.mode1v3 164 | !**/ios/**/default.mode2v3 165 | !**/ios/**/default.pbxuser 166 | !**/ios/**/default.perspectivev3 167 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 168 | 169 | ### Java ### 170 | # Compiled class file 171 | 172 | # Log file 173 | 174 | # BlueJ files 175 | *.ctxt 176 | 177 | # Mobile Tools for Java (J2ME) 178 | .mtj.tmp/ 179 | 180 | # Package Files # 181 | *.jar 182 | *.war 183 | *.nar 184 | *.ear 185 | *.zip 186 | *.tar.gz 187 | *.rar 188 | 189 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 190 | hs_err_pid* 191 | 192 | ### Linux ### 193 | *~ 194 | 195 | # temporary files which can be created if a process still has a handle open of a deleted file 196 | .fuse_hidden* 197 | 198 | # KDE directory preferences 199 | .directory 200 | 201 | # Linux trash folder which might appear on any partition or disk 202 | .Trash-* 203 | 204 | # .nfs files are created when an open file is removed but is still being accessed 205 | .nfs* 206 | 207 | ### VisualStudioCode ### 208 | .vscode/* 209 | !.vscode/settings.json 210 | !.vscode/tasks.json 211 | !.vscode/launch.json 212 | !.vscode/extensions.json 213 | 214 | ### VisualStudioCode Patch ### 215 | # Ignore all local history of files 216 | .history 217 | 218 | # End of https://www.gitignore.io/api/java,dart,linux,android,flutter,visualstudiocode 219 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/realtimeod/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.realtimeod; 2 | 3 | 4 | import androidx.annotation.NonNull; 5 | import io.flutter.embedding.android.FlutterActivity; 6 | import io.flutter.embedding.engine.FlutterEngine; 7 | import io.flutter.plugin.common.MethodChannel; 8 | 9 | import android.content.res.AssetManager; 10 | import android.os.Handler; 11 | import android.os.Looper; 12 | import android.renderscript.RenderScript; 13 | import android.os.Bundle; 14 | import android.graphics.Bitmap; 15 | import android.graphics.BitmapFactory; 16 | import android.content.Context; 17 | import android.util.Log; 18 | 19 | import io.flutter.plugin.common.MethodCall; 20 | import io.flutter.plugin.common.MethodChannel; 21 | import io.flutter.plugins.GeneratedPluginRegistrant; 22 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 23 | import io.flutter.plugin.common.MethodChannel.Result; 24 | import io.flutter.plugin.common.PluginRegistry.Registrar; 25 | import java.util.List; 26 | import java.util.Map; 27 | import java.util.HashMap; 28 | 29 | public class MainActivity extends FlutterActivity { 30 | private static final String CHANNEL = "paddlelite"; 31 | private static boolean modalLoaded = false; 32 | protected static Predictor predictor = new Predictor(); 33 | private RenderScript rs; 34 | 35 | // Model settings of object detection 36 | protected String modelPath = "models/fruit"; 37 | protected String labelPath = "labels/fruit_label_list"; 38 | protected int cpuThreadNum = 8; 39 | protected String cpuPowerMode = "LITE_POWER_FULL"; 40 | protected String inputColorFormat = "RGB"; 41 | protected long[] inputShape = new long[]{1, 3, 608, 608}; 42 | protected float[] inputMean = new float[]{0.485f, 0.456f, 0.406f}; 43 | protected float[] inputStd = new float[]{0.229f, 0.224f, 0.225f}; 44 | protected float scoreThreshold = 0.5f; 45 | 46 | @Override 47 | public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { 48 | rs = RenderScript.create(this); 49 | super.configureFlutterEngine(flutterEngine); 50 | new MethodChannel(flutterEngine.getDartExecutor().getBinaryMessenger(), CHANNEL) 51 | .setMethodCallHandler( 52 | (call, result) -> { 53 | if (call.method.equals("loadModel")) { 54 | loadModel(result); 55 | } else if(call.method.equals("detectObject")){ 56 | HashMap image = call.arguments(); 57 | detectObject(image,result); 58 | } else { 59 | result.notImplemented(); 60 | } 61 | } 62 | ); 63 | } 64 | 65 | protected void loadModel(final Result result) { 66 | new Thread(new Runnable() { 67 | public void run() { 68 | try { 69 | predictor.init(MainActivity.this, modelPath, labelPath, cpuThreadNum, 70 | cpuPowerMode, 71 | inputColorFormat, 72 | inputShape, inputMean, 73 | inputStd, scoreThreshold,rs); 74 | modalLoaded=true; 75 | MethodResultWrapper resultWrapper = new MethodResultWrapper(result); 76 | resultWrapper.success("Modal Loaded Sucessfully"); 77 | } catch (Exception e) { 78 | e.printStackTrace(); 79 | MethodResultWrapper resultWrapper = new MethodResultWrapper(result); 80 | resultWrapper.error("Modal failed to loaded", e.getMessage(), null); 81 | } 82 | } 83 | }).start(); 84 | } 85 | 86 | public void detectObject(final HashMap image, final Result result) { 87 | new Thread(new Runnable() { 88 | public void run() { 89 | MethodResultWrapper resultWrapper = new MethodResultWrapper(result); 90 | if (!modalLoaded) 91 | resultWrapper.error("Model is not loaded", null, null); 92 | 93 | try { 94 | predictor.setInputImage(image); 95 | List prediction = predictor.runModel(); 96 | resultWrapper.success(prediction); 97 | } catch (Exception e) { 98 | e.printStackTrace(); 99 | resultWrapper.error("Running model failed", e.getMessage(), null); 100 | } 101 | } 102 | }).start(); 103 | } 104 | 105 | private static class MethodResultWrapper implements MethodChannel.Result { 106 | private MethodChannel.Result methodResult; 107 | private Handler handler; 108 | 109 | MethodResultWrapper(MethodChannel.Result result) { 110 | methodResult = result; 111 | handler = new Handler(Looper.getMainLooper()); 112 | } 113 | 114 | @Override 115 | public void success(final Object result) { 116 | handler.post(new Runnable() { 117 | @Override 118 | public void run() { 119 | methodResult.success(result); 120 | } 121 | }); 122 | } 123 | 124 | @Override 125 | public void error(final String errorCode, final String errorMessage, final Object errorDetails) { 126 | handler.post(new Runnable() { 127 | @Override 128 | public void run() { 129 | methodResult.error(errorCode, errorMessage, errorDetails); 130 | } 131 | }); 132 | } 133 | 134 | @Override 135 | public void notImplemented() { 136 | handler.post(new Runnable() { 137 | @Override 138 | public void run() { 139 | methodResult.notImplemented(); 140 | } 141 | }); 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /android/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 53 | 54 | 55 | 61 | 62 | 63 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 1584458926601 120 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | 375 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/realtimeod/Predictor.java: -------------------------------------------------------------------------------- 1 | package com.example.realtimeod; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.Paint; 6 | import android.os.Build; 7 | import android.util.Log; 8 | import android.graphics.Bitmap; 9 | import android.graphics.Matrix; 10 | import android.os.SystemClock; 11 | import android.renderscript.Allocation; 12 | import android.renderscript.Element; 13 | import android.renderscript.ScriptIntrinsicYuvToRGB; 14 | import android.renderscript.Type; 15 | import android.renderscript.RenderScript; 16 | 17 | import com.baidu.paddle.lite.MobileConfig; 18 | import com.baidu.paddle.lite.PaddlePredictor; 19 | import com.baidu.paddle.lite.PowerMode; 20 | import com.baidu.paddle.lite.Tensor; 21 | 22 | import java.io.File; 23 | import java.io.InputStream; 24 | import java.util.Date; 25 | import java.util.Vector; 26 | import java.util.List; 27 | import java.util.ArrayList; 28 | import java.io.ByteArrayOutputStream; 29 | import java.io.IOException; 30 | import java.util.HashMap; 31 | import java.util.Map; 32 | 33 | 34 | import static android.graphics.Color.blue; 35 | import static android.graphics.Color.green; 36 | import static android.graphics.Color.red; 37 | 38 | public class Predictor { 39 | private static final String TAG = Predictor.class.getSimpleName(); 40 | public boolean isLoaded = false; 41 | public int warmupIterNum = 1; 42 | public int inferIterNum = 1; 43 | public int cpuThreadNum = 1; 44 | public String cpuPowerMode = "LITE_POWER_HIGH"; 45 | public String modelPath = ""; 46 | public String modelName = ""; 47 | protected PaddlePredictor paddlePredictor = null; 48 | protected float inferenceTime = 0; 49 | 50 | // Only for object detection 51 | protected Vector wordLabels = new Vector(); 52 | protected String inputColorFormat = "RGB"; 53 | protected long[] inputShape = new long[]{1, 3, 320, 320}; 54 | protected float[] inputMean = new float[]{0.485f, 0.456f, 0.406f}; 55 | protected float[] inputStd = new float[]{0.229f, 0.224f, 0.225f}; 56 | protected float scoreThreshold = 0.5f; 57 | protected Bitmap inputImage = null; 58 | protected String outputResult = ""; 59 | protected float preprocessTime = 0; 60 | protected float postprocessTime = 0; 61 | RenderScript rs; 62 | 63 | public Predictor() { 64 | } 65 | 66 | public boolean init(Context appCtx, String modelPath, String labelPath, int cpuThreadNum, String cpuPowerMode, 67 | String inputColorFormat, 68 | long[] inputShape, float[] inputMean, 69 | float[] inputStd, float scoreThreshold, RenderScript rs) { 70 | this.rs=rs; 71 | if (inputShape.length != 4) { 72 | Log.i(TAG, "Size of input shape should be: 4"); 73 | return false; 74 | } 75 | if (inputMean.length != inputShape[1]) { 76 | Log.i(TAG, "Size of input mean should be: " + Long.toString(inputShape[1])); 77 | return false; 78 | } 79 | if (inputStd.length != inputShape[1]) { 80 | Log.i(TAG, "Size of input std should be: " + Long.toString(inputShape[1])); 81 | return false; 82 | } 83 | if (inputShape[0] != 1) { 84 | Log.i(TAG, "Only one batch is supported in the image classification demo, you can use any batch size in " + 85 | "your Apps!"); 86 | return false; 87 | } 88 | if (inputShape[1] != 1 && inputShape[1] != 3) { 89 | Log.i(TAG, "Only one/three channels are supported in the image classification demo, you can use any " + 90 | "channel size in your Apps!"); 91 | return false; 92 | } 93 | if (!inputColorFormat.equalsIgnoreCase("RGB") && !inputColorFormat.equalsIgnoreCase("BGR")) { 94 | Log.i(TAG, "Only RGB and BGR color format is supported."); 95 | return false; 96 | } 97 | isLoaded = loadModel(appCtx, modelPath, cpuThreadNum, cpuPowerMode); 98 | if (!isLoaded) { 99 | return false; 100 | } 101 | isLoaded = loadLabel(appCtx, labelPath); 102 | if (!isLoaded) { 103 | return false; 104 | } 105 | this.inputColorFormat = inputColorFormat; 106 | this.inputShape = inputShape; 107 | this.inputMean = inputMean; 108 | this.inputStd = inputStd; 109 | this.scoreThreshold = scoreThreshold; 110 | return true; 111 | } 112 | 113 | protected boolean loadModel(Context appCtx, String modelPath, int cpuThreadNum, String cpuPowerMode) { 114 | // Release model if exists 115 | releaseModel(); 116 | 117 | // Load model 118 | if (modelPath.isEmpty()) { 119 | return false; 120 | } 121 | String realPath = modelPath; 122 | if (!modelPath.substring(0, 1).equals("/")) { 123 | // Read model files from custom path if the first character of mode path is '/' 124 | // otherwise copy model to cache from assets 125 | realPath = appCtx.getCacheDir() + "/" + modelPath; 126 | Utils.copyDirectoryFromAssets(appCtx, modelPath, realPath); 127 | } 128 | if (realPath.isEmpty()) { 129 | return false; 130 | } 131 | MobileConfig config = new MobileConfig(); 132 | config.setModelFromFile(realPath + File.separator + "model.nb"); 133 | config.setThreads(cpuThreadNum); 134 | if (cpuPowerMode.equalsIgnoreCase("LITE_POWER_HIGH")) { 135 | config.setPowerMode(PowerMode.LITE_POWER_HIGH); 136 | } else if (cpuPowerMode.equalsIgnoreCase("LITE_POWER_LOW")) { 137 | config.setPowerMode(PowerMode.LITE_POWER_LOW); 138 | } else if (cpuPowerMode.equalsIgnoreCase("LITE_POWER_FULL")) { 139 | config.setPowerMode(PowerMode.LITE_POWER_FULL); 140 | } else if (cpuPowerMode.equalsIgnoreCase("LITE_POWER_NO_BIND")) { 141 | config.setPowerMode(PowerMode.LITE_POWER_NO_BIND); 142 | } else if (cpuPowerMode.equalsIgnoreCase("LITE_POWER_RAND_HIGH")) { 143 | config.setPowerMode(PowerMode.LITE_POWER_RAND_HIGH); 144 | } else if (cpuPowerMode.equalsIgnoreCase("LITE_POWER_RAND_LOW")) { 145 | config.setPowerMode(PowerMode.LITE_POWER_RAND_LOW); 146 | } else { 147 | Log.e(TAG, "unknown cpu power mode!"); 148 | return false; 149 | } 150 | paddlePredictor = PaddlePredictor.createPaddlePredictor(config); 151 | 152 | this.cpuThreadNum = cpuThreadNum; 153 | this.cpuPowerMode = cpuPowerMode; 154 | this.modelPath = realPath; 155 | this.modelName = realPath.substring(realPath.lastIndexOf("/") + 1); 156 | return true; 157 | } 158 | 159 | public void releaseModel() { 160 | Log.i(TAG, "Model released."); 161 | paddlePredictor = null; 162 | isLoaded = false; 163 | cpuThreadNum = 1; 164 | cpuPowerMode = "LITE_POWER_HIGH"; 165 | modelPath = ""; 166 | modelName = ""; 167 | } 168 | 169 | protected boolean loadLabel(Context appCtx, String labelPath) { 170 | wordLabels.clear(); 171 | // Load word labels from file 172 | try { 173 | InputStream assetsInputStream = appCtx.getAssets().open(labelPath); 174 | int available = assetsInputStream.available(); 175 | byte[] lines = new byte[available]; 176 | assetsInputStream.read(lines); 177 | assetsInputStream.close(); 178 | String words = new String(lines); 179 | String[] contents = words.split("\n"); 180 | for (String content : contents) { 181 | wordLabels.add(content); 182 | } 183 | Log.i(TAG, "Word label size: " + wordLabels.size()); 184 | } catch (Exception e) { 185 | Log.e(TAG, e.getMessage()); 186 | return false; 187 | } 188 | return true; 189 | } 190 | 191 | public Tensor getInput(int idx) { 192 | if (!isLoaded()) { 193 | return null; 194 | } 195 | return paddlePredictor.getInput(idx); 196 | } 197 | 198 | public Tensor getOutput(int idx) { 199 | if (!isLoaded()) { 200 | return null; 201 | } 202 | return paddlePredictor.getOutput(idx); 203 | } 204 | 205 | @SuppressWarnings("unchecked") 206 | public List runModel() { 207 | final List predictions = new ArrayList<>(); 208 | 209 | if (inputImage == null || !isLoaded()) { 210 | return predictions; 211 | } 212 | 213 | // Set input shape 214 | Tensor inputTensor0 = getInput(0); 215 | inputTensor0.resize(inputShape); 216 | Tensor inputTensor1 = getInput(1); 217 | inputTensor1.resize(new long[] {1,2}); 218 | // Pre-process image, and feed input tensor with pre-processed data 219 | Date start = new Date(); 220 | int channels = (int) inputShape[1]; 221 | int width = (int) inputShape[3]; 222 | int height = (int) inputShape[2]; 223 | float[] inputData = new float[channels * width * height]; 224 | if (channels == 3) { 225 | int[] channelIdx = null; 226 | if (inputColorFormat.equalsIgnoreCase("RGB")) { 227 | channelIdx = new int[]{0, 1, 2}; 228 | } else if (inputColorFormat.equalsIgnoreCase("BGR")) { 229 | channelIdx = new int[]{2, 1, 0}; 230 | } else { 231 | Log.i(TAG, "Unknown color format " + inputColorFormat + ", only RGB and BGR color format is " + 232 | "supported!"); 233 | return predictions; 234 | } 235 | int[] channelStride = new int[]{width * height, width * height * 2}; 236 | for (int y = 0; y < height; y++) { 237 | for (int x = 0; x < width; x++) { 238 | int color = inputImage.getPixel(x, y); 239 | float[] rgb = new float[]{(float) red(color) / 255.0f, (float) green(color) / 255.0f, 240 | (float) blue(color) / 255.0f}; 241 | inputData[y * width + x] = (rgb[channelIdx[0]] - inputMean[0]) / inputStd[0]; 242 | inputData[y * width + x + channelStride[0]] = (rgb[channelIdx[1]] - inputMean[1]) / inputStd[1]; 243 | inputData[y * width + x + channelStride[1]] = (rgb[channelIdx[2]] - inputMean[2]) / inputStd[2]; 244 | } 245 | } 246 | } else if (channels == 1) { 247 | for (int y = 0; y < height; y++) { 248 | for (int x = 0; x < width; x++) { 249 | int color = inputImage.getPixel(x, y); 250 | float gray = (float) (red(color) + green(color) + blue(color)) / 3.0f / 255.0f; 251 | inputData[y * width + x] = (gray - inputMean[0]) / inputStd[0]; 252 | } 253 | } 254 | } else { 255 | Log.i(TAG, "Unsupported channel size " + Integer.toString(channels) + ", only channel 1 and 3 is " + 256 | "supported!"); 257 | return predictions; 258 | } 259 | inputTensor0.setData(inputData); 260 | inputTensor1.setData(new int[] {320,320}); 261 | Date end = new Date(); 262 | preprocessTime = (float) (end.getTime() - start.getTime()); 263 | 264 | // Warm up 265 | for (int i = 0; i < warmupIterNum; i++) { 266 | paddlePredictor.run(); 267 | } 268 | // Run inference 269 | start = new Date(); 270 | for (int i = 0; i < inferIterNum; i++) { 271 | paddlePredictor.run(); 272 | } 273 | end = new Date(); 274 | inferenceTime = (end.getTime() - start.getTime()) / (float) inferIterNum; 275 | 276 | // Fetch output tensor 277 | Tensor outputTensor = getOutput(0); 278 | 279 | // Post-process 280 | start = new Date(); 281 | long outputShape[] = outputTensor.shape(); 282 | long outputSize = 1; 283 | for (long s : outputShape) { 284 | outputSize *= s; 285 | } 286 | int imgWidth = inputImage.getWidth(); 287 | int imgHeight = inputImage.getHeight(); 288 | int objectIdx = 0; 289 | for (int i = 0; i < outputSize; i += 6) { 290 | float score = 0; 291 | try{ 292 | score = outputTensor.getFloatData()[i + 1]; 293 | } catch (Exception e) { 294 | Log.e(TAG, e.getMessage()); 295 | return predictions; 296 | } 297 | if (score < scoreThreshold) { 298 | continue; 299 | } 300 | int categoryIdx = (int) outputTensor.getFloatData()[i]; 301 | String categoryName = "Unknown"; 302 | if (wordLabels.size() > 0 && categoryIdx >= 0 && categoryIdx < wordLabels.size()) { 303 | categoryName = wordLabels.get(categoryIdx); 304 | } 305 | float rawLeft = outputTensor.getFloatData()[i + 2]/320; 306 | float rawTop = outputTensor.getFloatData()[i + 3]/320; 307 | float rawRight = outputTensor.getFloatData()[i + 4]/320; 308 | float rawBottom = outputTensor.getFloatData()[i + 5]/320; 309 | float clampedLeft = Math.max(Math.min(rawLeft, 1.f), 0.f); 310 | float clampedTop = Math.max(Math.min(rawTop, 1.f), 0.f); 311 | float clampedRight = Math.max(Math.min(rawRight, 1.f), 0.f); 312 | float clampedBottom = Math.max(Math.min(rawBottom, 1.f), 0.f); 313 | float imgLeft = clampedLeft * imgWidth; 314 | float imgTop = clampedTop * imgWidth; 315 | float imgRight = clampedRight * imgHeight; 316 | float imgBottom = clampedBottom * imgHeight; 317 | List objDetail = new ArrayList<>(); 318 | objDetail.add(objectIdx); 319 | objDetail.add(categoryName); 320 | objDetail.add(imgLeft); 321 | objDetail.add(imgTop); 322 | objDetail.add(imgRight); 323 | objDetail.add(imgBottom); 324 | objDetail.add(String.format("%.3f", score)); 325 | objectIdx++; 326 | predictions.add(objDetail); 327 | } 328 | end = new Date(); 329 | postprocessTime = (float) (end.getTime() - start.getTime()); 330 | Log.i(TAG, "Time used " + Float.toString(inferenceTime) + " ms."); 331 | return predictions; 332 | } 333 | 334 | 335 | public boolean isLoaded() { 336 | return paddlePredictor != null && isLoaded; 337 | } 338 | 339 | public String modelPath() { 340 | return modelPath; 341 | } 342 | 343 | public String modelName() { 344 | return modelName; 345 | } 346 | 347 | public int cpuThreadNum() { 348 | return cpuThreadNum; 349 | } 350 | 351 | public String cpuPowerMode() { 352 | return cpuPowerMode; 353 | } 354 | 355 | public float inferenceTime() { 356 | return inferenceTime; 357 | } 358 | 359 | public Bitmap inputImage() { 360 | return inputImage; 361 | } 362 | 363 | public String outputResult() { 364 | return outputResult; 365 | } 366 | 367 | public float preprocessTime() { 368 | return preprocessTime; 369 | } 370 | 371 | public float postprocessTime() { 372 | return postprocessTime; 373 | } 374 | 375 | 376 | public void setInputImage(HashMap image) { 377 | if (image == null) { 378 | return; 379 | } 380 | this.inputImage = null; 381 | // Scale image to the size of input tensor 382 | Bitmap imageBit = getBitmap(image); 383 | Bitmap rgbaImage = imageBit.copy(Bitmap.Config.ARGB_8888, true); 384 | Bitmap scaleImage = Bitmap.createScaledBitmap(rgbaImage, (int) inputShape[3], (int) inputShape[2], true); 385 | this.inputImage = scaleImage; 386 | } 387 | 388 | public Bitmap getBitmap(HashMap image){ 389 | Bitmap bitmap = Bitmap.createScaledBitmap(yuv420toBitMap(image), 416, 416, true); 390 | int width = bitmap.getWidth(); 391 | int height = bitmap.getHeight(); 392 | Matrix matrix = new Matrix(); 393 | matrix.postRotate((Integer)image.get("rotation")); 394 | return Bitmap.createBitmap(bitmap , 0, 0, width, height, matrix, true); 395 | } 396 | 397 | @SuppressWarnings("unchecked") 398 | public Bitmap yuv420toBitMap(final HashMap image) { 399 | int w = (int) image.get("width"); 400 | int h = (int) image.get("height"); 401 | ArrayList planes = (ArrayList) image.get("planes"); 402 | 403 | byte[] data = yuv420toNV21(w, h, planes); 404 | 405 | Bitmap bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); 406 | ScriptIntrinsicYuvToRGB yuvToRgbIntrinsic = ScriptIntrinsicYuvToRGB.create(rs, Element.U8_4(rs)); 407 | 408 | Type.Builder yuvType = new Type.Builder(rs, Element.U8(rs)).setX(data.length); 409 | Allocation in = Allocation.createTyped(rs, yuvType.create(), Allocation.USAGE_SCRIPT); 410 | in.copyFrom(data); 411 | 412 | Type.Builder rgbaType = new Type.Builder(rs, Element.RGBA_8888(rs)).setX(w).setY(h); 413 | Allocation out = Allocation.createTyped(rs, rgbaType.create(), Allocation.USAGE_SCRIPT); 414 | 415 | yuvToRgbIntrinsic.setInput(in); 416 | yuvToRgbIntrinsic.forEach(out); 417 | 418 | out.copyTo(bitmap); 419 | return bitmap; 420 | } 421 | 422 | public byte[] yuv420toNV21(int width,int height, ArrayList planes){ 423 | byte[] yBytes = (byte[]) planes.get(0).get("bytes"), 424 | uBytes= (byte[]) planes.get(1).get("bytes"), 425 | vBytes= (byte[]) planes.get(2).get("bytes"); 426 | final int color_pixel_stride =(int) planes.get(1).get("bytesPerPixel"); 427 | 428 | ByteArrayOutputStream outputbytes = new ByteArrayOutputStream(); 429 | try { 430 | outputbytes.write(yBytes); 431 | outputbytes.write(vBytes); 432 | outputbytes.write(uBytes); 433 | } catch (IOException e) { 434 | e.printStackTrace(); 435 | } 436 | 437 | byte[] data = outputbytes.toByteArray(); 438 | final int y_size = yBytes.length; 439 | final int u_size = uBytes.length; 440 | final int data_offset = width * height; 441 | for (int i = 0; i < y_size; i++) { 442 | data[i] = (byte) (yBytes[i] & 255); 443 | } 444 | for (int i = 0; i < u_size / color_pixel_stride; i++) { 445 | data[data_offset + 2 * i] = vBytes[i * color_pixel_stride]; 446 | data[data_offset + 2 * i + 1] = uBytes[i * color_pixel_stride]; 447 | } 448 | return data; 449 | } 450 | } 451 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = ""; 27 | dstSubfolderSpec = 10; 28 | files = ( 29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 31 | ); 32 | name = "Embed Frameworks"; 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXCopyFilesBuildPhase section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 9740EEB11CF90186004384FC /* Flutter */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 3B80C3931E831B6300D905FE /* App.framework */, 72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 77 | ); 78 | name = Flutter; 79 | sourceTree = ""; 80 | }; 81 | 97C146E51CF9000F007C117D = { 82 | isa = PBXGroup; 83 | children = ( 84 | 9740EEB11CF90186004384FC /* Flutter */, 85 | 97C146F01CF9000F007C117D /* Runner */, 86 | 97C146EF1CF9000F007C117D /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | 97C146EF1CF9000F007C117D /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 97C146EE1CF9000F007C117D /* Runner.app */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | 97C146F01CF9000F007C117D /* Runner */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 104 | 97C147021CF9000F007C117D /* Info.plist */, 105 | 97C146F11CF9000F007C117D /* Supporting Files */, 106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 110 | ); 111 | path = Runner; 112 | sourceTree = ""; 113 | }; 114 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 97C146ED1CF9000F007C117D /* Runner */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 127 | buildPhases = ( 128 | 9740EEB61CF901F6004384FC /* Run Script */, 129 | 97C146EA1CF9000F007C117D /* Sources */, 130 | 97C146EB1CF9000F007C117D /* Frameworks */, 131 | 97C146EC1CF9000F007C117D /* Resources */, 132 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = Runner; 140 | productName = Runner; 141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | /* End PBXNativeTarget section */ 145 | 146 | /* Begin PBXProject section */ 147 | 97C146E61CF9000F007C117D /* Project object */ = { 148 | isa = PBXProject; 149 | attributes = { 150 | LastUpgradeCheck = 1020; 151 | ORGANIZATIONNAME = "The Chromium Authors"; 152 | TargetAttributes = { 153 | 97C146ED1CF9000F007C117D = { 154 | CreatedOnToolsVersion = 7.3.1; 155 | LastSwiftMigration = 1100; 156 | }; 157 | }; 158 | }; 159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 160 | compatibilityVersion = "Xcode 3.2"; 161 | developmentRegion = en; 162 | hasScannedForEncodings = 0; 163 | knownRegions = ( 164 | en, 165 | Base, 166 | ); 167 | mainGroup = 97C146E51CF9000F007C117D; 168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 97C146ED1CF9000F007C117D /* Runner */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 97C146EC1CF9000F007C117D /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Thin Binary"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 205 | }; 206 | 9740EEB61CF901F6004384FC /* Run Script */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | ); 213 | name = "Run Script"; 214 | outputPaths = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | shellPath = /bin/sh; 218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 219 | }; 220 | /* End PBXShellScriptBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 97C146EA1CF9000F007C117D /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXVariantGroup section */ 235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | 97C146FB1CF9000F007C117D /* Base */, 239 | ); 240 | name = Main.storyboard; 241 | sourceTree = ""; 242 | }; 243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 97C147001CF9000F007C117D /* Base */, 247 | ); 248 | name = LaunchScreen.storyboard; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXVariantGroup section */ 252 | 253 | /* Begin XCBuildConfiguration section */ 254 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 255 | isa = XCBuildConfiguration; 256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_EMPTY_BODY = YES; 271 | CLANG_WARN_ENUM_CONVERSION = YES; 272 | CLANG_WARN_INFINITE_RECURSION = YES; 273 | CLANG_WARN_INT_CONVERSION = YES; 274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | SUPPORTED_PLATFORMS = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | VALIDATE_PRODUCT = YES; 302 | }; 303 | name = Profile; 304 | }; 305 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 306 | isa = XCBuildConfiguration; 307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | CLANG_ENABLE_MODULES = YES; 311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 312 | ENABLE_BITCODE = NO; 313 | FRAMEWORK_SEARCH_PATHS = ( 314 | "$(inherited)", 315 | "$(PROJECT_DIR)/Flutter", 316 | ); 317 | INFOPLIST_FILE = Runner/Info.plist; 318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 319 | LIBRARY_SEARCH_PATHS = ( 320 | "$(inherited)", 321 | "$(PROJECT_DIR)/Flutter", 322 | ); 323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.realtimeod; 324 | PRODUCT_NAME = "$(TARGET_NAME)"; 325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 326 | SWIFT_VERSION = 5.0; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | }; 329 | name = Profile; 330 | }; 331 | 97C147031CF9000F007C117D /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = dwarf; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | ENABLE_TESTABILITY = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_OPTIMIZATION_LEVEL = 0; 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | SDKROOT = iphoneos; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Debug; 386 | }; 387 | 97C147041CF9000F007C117D /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 390 | buildSettings = { 391 | ALWAYS_SEARCH_USER_PATHS = NO; 392 | CLANG_ANALYZER_NONNULL = YES; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_COMMA = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 412 | CLANG_WARN_STRICT_PROTOTYPES = YES; 413 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 414 | CLANG_WARN_UNREACHABLE_CODE = YES; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 417 | COPY_PHASE_STRIP = NO; 418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 419 | ENABLE_NS_ASSERTIONS = NO; 420 | ENABLE_STRICT_OBJC_MSGSEND = YES; 421 | GCC_C_LANGUAGE_STANDARD = gnu99; 422 | GCC_NO_COMMON_BLOCKS = YES; 423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 427 | GCC_WARN_UNUSED_FUNCTION = YES; 428 | GCC_WARN_UNUSED_VARIABLE = YES; 429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 430 | MTL_ENABLE_DEBUG_INFO = NO; 431 | SDKROOT = iphoneos; 432 | SUPPORTED_PLATFORMS = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.realtimeod; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 5.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.realtimeod; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 5.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | }; 517 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 518 | } 519 | --------------------------------------------------------------------------------