├── FlowerClassifier.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcuserdata │ └── vamshikrishna.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── FlowerClassifier ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── AppDelegate.swift └── ViewController.swift └── README.md /FlowerClassifier.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FlowerClassifier.xcodeproj/xcuserdata/vamshikrishna.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FlowerClassifier.xcscheme 8 | 9 | orderHint 10 | 5 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /FlowerClassifier/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 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | NSCameraUsageDescription 28 | Need Camera Access 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /FlowerClassifier/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 | -------------------------------------------------------------------------------- /FlowerClassifier/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /FlowerClassifier/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FlowerClassifier 4 | // 5 | // Created by Vamshi Krishna on 08/12/17. 6 | // Copyright © 2017 Vamshi Krishna. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CaffeToCoreML 2 | Hey'll! 3 | There are a lot of tutorials/ open source projects on how to use **Vision** and **CoreML** frameworks for **Object Detection** in real world using iOS apps using **.mlmodels** given by Apple. But seldom in reality, do we get a **.mlmodel** available suiting our use case. 4 | 5 | **CAFFE** is one of the 6 | most famous Deep Learning frameworks used to train ML models (more details here: http://caffe.berkeleyvision.org) 7 | 8 | Here, I took up a **Caffe model for the Oxford 102 flower dataset**, which was converted to **CoreML model** using **coremltools python package**. 9 | 10 | `oxford102.caffemodel` can be downloaded at https://drive.google.com/uc?export=download&confirm=PXEh&id=0B0HbJVlOlJ3SVVNyMDQwR3FRYWc . Please not that along with `oxford102.caffemodel`, we will also need `flower-labels.txt` and `deploy.prototxt` files in order to successfully **convert .caffemodel to .mlmodel** 11 | 12 | Also note that this conversion from `.caffemodel to .mlmodel` is only possible with `**Python2.7**` 13 | 14 | 15 | 16 | Once downloaded the above mentioned three files, here are the steps used for conversion: 17 | 18 | 1) Put all the three downloaded files in a folder, say FlowerClassifier. 19 | 2) Add a python file, say convert-script.py in the same folder. 20 | 3) Add the script below to your convert-script.py file. 21 | 22 | ``` 23 | import coremltools 24 | 25 | caffe_model = ('oxford102.caffemodel', 'deploy.prototxt') 26 | labels = 'flower-labels.txt' 27 | 28 | coreml_model = coremltools.converters.caffe.convert( 29 | caffe_model, 30 | class_labels = labels, 31 | image_input_names = 'data' 32 | ) 33 | 34 | coreml_model.save('FlowerClassifier.mlmodel') 35 | ``` 36 | 37 | 4) Now, launch Terminal in your Mac, activate Python2.7 using command ```source python27/bin/activate``` 38 | 39 | 5) Then cd into your folder (***FlowerClassifier***) 40 | 6) Then run the script using command ```python convert-script.py```. 41 | 42 | Voila! 2-3 minutes later you will have your FlowerClassifier.ml model present in your FlowerClassifier folder. 43 | 44 | For those who want to skip the conversion part and directly use FlowerClassifier.mlmodel , you can download it here (https://drive.google.com/file/d/0B1ghKa_MYL6meDBHT2NaZGxkNzQ/view) . Please note that I have not uploaded this model in my project owing to size constraints. 45 | 46 | Just download the .mlmodel, drag and drop it into your project directory and test the ap on different flowers in real world. 47 | 48 | ***Final project looks like this:*** 49 | 50 | screen shot 2017-12-13 at 5 40 17 pm 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /FlowerClassifier/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FlowerClassifier 4 | // 5 | // Created by Vamshi Krishna on 08/12/17. 6 | // Copyright © 2017 Vamshi Krishna. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreML 11 | import Vision 12 | import SwiftyJSON 13 | import Alamofire 14 | import SDWebImage 15 | import ColorThiefSwift 16 | 17 | class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { 18 | 19 | let wikipediaURl = "https://en.wikipedia.org/w/api.php" 20 | var pickedImage : UIImage? 21 | @IBOutlet weak var imageView: UIImageView! 22 | @IBOutlet weak var infoLabel: UILabel! 23 | 24 | let imagePicker = UIImagePickerController() 25 | 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | imagePicker.delegate = self 29 | imagePicker.sourceType = .photoLibrary 30 | imagePicker.allowsEditing = true 31 | } 32 | 33 | func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { 34 | 35 | 36 | 37 | if let userPickedImage = info[UIImagePickerControllerEditedImage] as? UIImage { 38 | 39 | guard let ciImage = CIImage(image: userPickedImage) else { 40 | fatalError("Could not convert image to CIImage.") 41 | } 42 | 43 | pickedImage = userPickedImage 44 | 45 | 46 | detect(flowerImage: ciImage) 47 | } 48 | 49 | imagePicker.dismiss(animated: true, completion: nil) 50 | 51 | 52 | 53 | } 54 | 55 | func detect(flowerImage: CIImage) { 56 | 57 | 58 | 59 | guard let model = try? VNCoreMLModel(for: FlowerClassifier().model) else { 60 | fatalError("Can't load model") 61 | } 62 | 63 | let request = VNCoreMLRequest(model: model) { (request, error) in 64 | guard let result = request.results?.first as? VNClassificationObservation else { 65 | fatalError("Could not complete classfication") 66 | } 67 | 68 | self.navigationItem.title = result.identifier.capitalized 69 | 70 | self.requestInfo(flowerName: result.identifier) 71 | 72 | } 73 | 74 | let handler = VNImageRequestHandler(ciImage: flowerImage) 75 | 76 | do { 77 | try handler.perform([request]) 78 | } 79 | catch { 80 | print(error) 81 | } 82 | 83 | 84 | } 85 | 86 | func requestInfo(flowerName: String) { 87 | let parameters : [String:String] = ["format" : "json", "action" : "query", "prop" : "extracts|pageimages", "exintro" : "", "explaintext" : "", "titles" : flowerName, "redirects" : "1", "pithumbsize" : "500", "indexpageids" : ""] 88 | 89 | Alamofire.request(wikipediaURl, method: .get, parameters: parameters).responseJSON { (response) in 90 | if response.result.isSuccess { 91 | let flowerJSON : JSON = JSON(response.result.value!) 92 | 93 | let pageid = flowerJSON["query"]["pageids"][0].stringValue 94 | 95 | let flowerDescription = flowerJSON["query"]["pages"][pageid]["extract"].stringValue 96 | let flowerImageURL = flowerJSON["query"]["pages"][pageid]["thumbnail"]["source"].stringValue 97 | self.infoLabel.text = flowerDescription 98 | 99 | self.imageView.sd_setImage(with: URL(string: flowerImageURL), completed: { (image, error, cache, url) in 100 | 101 | if let currentImage = self.imageView.image { 102 | 103 | guard let dominantColor = ColorThief.getColor(from: currentImage) else { 104 | fatalError("Can't get dominant color") 105 | } 106 | 107 | 108 | DispatchQueue.main.async { 109 | self.navigationController?.navigationBar.isTranslucent = true 110 | self.navigationController?.navigationBar.barTintColor = dominantColor.makeUIColor() 111 | 112 | 113 | } 114 | } else { 115 | self.imageView.image = self.pickedImage 116 | self.infoLabel.text = "Could not get information on flower from Wikipedia." 117 | } 118 | 119 | }) 120 | 121 | } 122 | else { 123 | print("Error \(String(describing: response.result.error))") 124 | self.infoLabel.text = "Connection Issues" 125 | 126 | 127 | 128 | } 129 | } 130 | } 131 | 132 | 133 | 134 | @IBAction func cameraTapped(_ sender: Any) { 135 | 136 | self.present(self.imagePicker, animated: true, completion: nil) 137 | 138 | } 139 | } 140 | 141 | -------------------------------------------------------------------------------- /FlowerClassifier/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | HelveticaNeue 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /FlowerClassifier.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 07D1E9FDBA58949F55964247 /* Pods_FlowerClassifier.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A94614EDF85AFB9EE72589C /* Pods_FlowerClassifier.framework */; }; 11 | 9617C25A1FDA5F3400D000E8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9617C2591FDA5F3400D000E8 /* AppDelegate.swift */; }; 12 | 9617C25C1FDA5F3400D000E8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9617C25B1FDA5F3400D000E8 /* ViewController.swift */; }; 13 | 9617C25F1FDA5F3400D000E8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9617C25D1FDA5F3400D000E8 /* Main.storyboard */; }; 14 | 9617C2611FDA5F3400D000E8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9617C2601FDA5F3400D000E8 /* Assets.xcassets */; }; 15 | 9617C2641FDA5F3400D000E8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9617C2621FDA5F3400D000E8 /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 144EAA1038C111C78C38599B /* Pods-FlowerClassifier.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FlowerClassifier.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FlowerClassifier/Pods-FlowerClassifier.debug.xcconfig"; sourceTree = ""; }; 20 | 3660C37331FD73CDC56620A0 /* Pods-FlowerClassifier.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FlowerClassifier.release.xcconfig"; path = "Pods/Target Support Files/Pods-FlowerClassifier/Pods-FlowerClassifier.release.xcconfig"; sourceTree = ""; }; 21 | 8A94614EDF85AFB9EE72589C /* Pods_FlowerClassifier.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FlowerClassifier.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 9617C2561FDA5F3400D000E8 /* FlowerClassifier.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlowerClassifier.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 9617C2591FDA5F3400D000E8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 24 | 9617C25B1FDA5F3400D000E8 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 25 | 9617C25E1FDA5F3400D000E8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 26 | 9617C2601FDA5F3400D000E8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27 | 9617C2631FDA5F3400D000E8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 28 | 9617C2651FDA5F3400D000E8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 9617C2531FDA5F3400D000E8 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 07D1E9FDBA58949F55964247 /* Pods_FlowerClassifier.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 84F09C1FE0A57E28BEE8F7FB /* Pods */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | 144EAA1038C111C78C38599B /* Pods-FlowerClassifier.debug.xcconfig */, 47 | 3660C37331FD73CDC56620A0 /* Pods-FlowerClassifier.release.xcconfig */, 48 | ); 49 | name = Pods; 50 | sourceTree = ""; 51 | }; 52 | 9617C24D1FDA5F3400D000E8 = { 53 | isa = PBXGroup; 54 | children = ( 55 | 9617C2581FDA5F3400D000E8 /* FlowerClassifier */, 56 | 9617C2571FDA5F3400D000E8 /* Products */, 57 | 84F09C1FE0A57E28BEE8F7FB /* Pods */, 58 | D0A9DE8DCA65BCD404A57C67 /* Frameworks */, 59 | ); 60 | sourceTree = ""; 61 | }; 62 | 9617C2571FDA5F3400D000E8 /* Products */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 9617C2561FDA5F3400D000E8 /* FlowerClassifier.app */, 66 | ); 67 | name = Products; 68 | sourceTree = ""; 69 | }; 70 | 9617C2581FDA5F3400D000E8 /* FlowerClassifier */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 9617C2591FDA5F3400D000E8 /* AppDelegate.swift */, 74 | 9617C25B1FDA5F3400D000E8 /* ViewController.swift */, 75 | 9617C25D1FDA5F3400D000E8 /* Main.storyboard */, 76 | 9617C2601FDA5F3400D000E8 /* Assets.xcassets */, 77 | 9617C2621FDA5F3400D000E8 /* LaunchScreen.storyboard */, 78 | 9617C2651FDA5F3400D000E8 /* Info.plist */, 79 | ); 80 | path = FlowerClassifier; 81 | sourceTree = ""; 82 | }; 83 | D0A9DE8DCA65BCD404A57C67 /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 8A94614EDF85AFB9EE72589C /* Pods_FlowerClassifier.framework */, 87 | ); 88 | name = Frameworks; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | 9617C2551FDA5F3400D000E8 /* FlowerClassifier */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = 9617C2681FDA5F3400D000E8 /* Build configuration list for PBXNativeTarget "FlowerClassifier" */; 97 | buildPhases = ( 98 | 114BED7DCD515200EB46DA42 /* [CP] Check Pods Manifest.lock */, 99 | 9617C2521FDA5F3400D000E8 /* Sources */, 100 | 9617C2531FDA5F3400D000E8 /* Frameworks */, 101 | 9617C2541FDA5F3400D000E8 /* Resources */, 102 | AC73D13DB29EE6EDEC584CA5 /* [CP] Embed Pods Frameworks */, 103 | 230613CA4D631DB4786A5EEB /* [CP] Copy Pods Resources */, 104 | ); 105 | buildRules = ( 106 | ); 107 | dependencies = ( 108 | ); 109 | name = FlowerClassifier; 110 | productName = FlowerClassifier; 111 | productReference = 9617C2561FDA5F3400D000E8 /* FlowerClassifier.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | 9617C24E1FDA5F3400D000E8 /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 0910; 121 | LastUpgradeCheck = 0910; 122 | ORGANIZATIONNAME = "Vamshi Krishna"; 123 | TargetAttributes = { 124 | 9617C2551FDA5F3400D000E8 = { 125 | CreatedOnToolsVersion = 9.1; 126 | ProvisioningStyle = Automatic; 127 | }; 128 | }; 129 | }; 130 | buildConfigurationList = 9617C2511FDA5F3400D000E8 /* Build configuration list for PBXProject "FlowerClassifier" */; 131 | compatibilityVersion = "Xcode 8.0"; 132 | developmentRegion = en; 133 | hasScannedForEncodings = 0; 134 | knownRegions = ( 135 | en, 136 | Base, 137 | ); 138 | mainGroup = 9617C24D1FDA5F3400D000E8; 139 | productRefGroup = 9617C2571FDA5F3400D000E8 /* Products */; 140 | projectDirPath = ""; 141 | projectRoot = ""; 142 | targets = ( 143 | 9617C2551FDA5F3400D000E8 /* FlowerClassifier */, 144 | ); 145 | }; 146 | /* End PBXProject section */ 147 | 148 | /* Begin PBXResourcesBuildPhase section */ 149 | 9617C2541FDA5F3400D000E8 /* Resources */ = { 150 | isa = PBXResourcesBuildPhase; 151 | buildActionMask = 2147483647; 152 | files = ( 153 | 9617C2641FDA5F3400D000E8 /* LaunchScreen.storyboard in Resources */, 154 | 9617C2611FDA5F3400D000E8 /* Assets.xcassets in Resources */, 155 | 9617C25F1FDA5F3400D000E8 /* Main.storyboard in Resources */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXResourcesBuildPhase section */ 160 | 161 | /* Begin PBXShellScriptBuildPhase section */ 162 | 114BED7DCD515200EB46DA42 /* [CP] Check Pods Manifest.lock */ = { 163 | isa = PBXShellScriptBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | ); 167 | inputPaths = ( 168 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 169 | "${PODS_ROOT}/Manifest.lock", 170 | ); 171 | name = "[CP] Check Pods Manifest.lock"; 172 | outputPaths = ( 173 | "$(DERIVED_FILE_DIR)/Pods-FlowerClassifier-checkManifestLockResult.txt", 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | shellPath = /bin/sh; 177 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 178 | showEnvVarsInLog = 0; 179 | }; 180 | 230613CA4D631DB4786A5EEB /* [CP] Copy Pods Resources */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputPaths = ( 186 | ); 187 | name = "[CP] Copy Pods Resources"; 188 | outputPaths = ( 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | shellPath = /bin/sh; 192 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FlowerClassifier/Pods-FlowerClassifier-resources.sh\"\n"; 193 | showEnvVarsInLog = 0; 194 | }; 195 | AC73D13DB29EE6EDEC584CA5 /* [CP] Embed Pods Frameworks */ = { 196 | isa = PBXShellScriptBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | ); 200 | inputPaths = ( 201 | "${SRCROOT}/Pods/Target Support Files/Pods-FlowerClassifier/Pods-FlowerClassifier-frameworks.sh", 202 | "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", 203 | "${BUILT_PRODUCTS_DIR}/ColorThiefSwift/ColorThiefSwift.framework", 204 | "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", 205 | "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", 206 | ); 207 | name = "[CP] Embed Pods Frameworks"; 208 | outputPaths = ( 209 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", 210 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ColorThiefSwift.framework", 211 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", 212 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | shellPath = /bin/sh; 216 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FlowerClassifier/Pods-FlowerClassifier-frameworks.sh\"\n"; 217 | showEnvVarsInLog = 0; 218 | }; 219 | /* End PBXShellScriptBuildPhase section */ 220 | 221 | /* Begin PBXSourcesBuildPhase section */ 222 | 9617C2521FDA5F3400D000E8 /* Sources */ = { 223 | isa = PBXSourcesBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | 9617C25C1FDA5F3400D000E8 /* ViewController.swift in Sources */, 227 | 9617C25A1FDA5F3400D000E8 /* AppDelegate.swift in Sources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXSourcesBuildPhase section */ 232 | 233 | /* Begin PBXVariantGroup section */ 234 | 9617C25D1FDA5F3400D000E8 /* Main.storyboard */ = { 235 | isa = PBXVariantGroup; 236 | children = ( 237 | 9617C25E1FDA5F3400D000E8 /* Base */, 238 | ); 239 | name = Main.storyboard; 240 | sourceTree = ""; 241 | }; 242 | 9617C2621FDA5F3400D000E8 /* LaunchScreen.storyboard */ = { 243 | isa = PBXVariantGroup; 244 | children = ( 245 | 9617C2631FDA5F3400D000E8 /* Base */, 246 | ); 247 | name = LaunchScreen.storyboard; 248 | sourceTree = ""; 249 | }; 250 | /* End PBXVariantGroup section */ 251 | 252 | /* Begin XCBuildConfiguration section */ 253 | 9617C2661FDA5F3400D000E8 /* Debug */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | ALWAYS_SEARCH_USER_PATHS = NO; 257 | CLANG_ANALYZER_NONNULL = YES; 258 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 259 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 260 | CLANG_CXX_LIBRARY = "libc++"; 261 | CLANG_ENABLE_MODULES = YES; 262 | CLANG_ENABLE_OBJC_ARC = YES; 263 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 264 | CLANG_WARN_BOOL_CONVERSION = YES; 265 | CLANG_WARN_COMMA = YES; 266 | CLANG_WARN_CONSTANT_CONVERSION = YES; 267 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 268 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 269 | CLANG_WARN_EMPTY_BODY = YES; 270 | CLANG_WARN_ENUM_CONVERSION = YES; 271 | CLANG_WARN_INFINITE_RECURSION = YES; 272 | CLANG_WARN_INT_CONVERSION = YES; 273 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 274 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 276 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 277 | CLANG_WARN_STRICT_PROTOTYPES = YES; 278 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 279 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 280 | CLANG_WARN_UNREACHABLE_CODE = YES; 281 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 282 | CODE_SIGN_IDENTITY = "iPhone Developer"; 283 | COPY_PHASE_STRIP = NO; 284 | DEBUG_INFORMATION_FORMAT = dwarf; 285 | ENABLE_STRICT_OBJC_MSGSEND = YES; 286 | ENABLE_TESTABILITY = YES; 287 | GCC_C_LANGUAGE_STANDARD = gnu11; 288 | GCC_DYNAMIC_NO_PIC = NO; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_OPTIMIZATION_LEVEL = 0; 291 | GCC_PREPROCESSOR_DEFINITIONS = ( 292 | "DEBUG=1", 293 | "$(inherited)", 294 | ); 295 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 296 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 297 | GCC_WARN_UNDECLARED_SELECTOR = YES; 298 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 299 | GCC_WARN_UNUSED_FUNCTION = YES; 300 | GCC_WARN_UNUSED_VARIABLE = YES; 301 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 302 | MTL_ENABLE_DEBUG_INFO = YES; 303 | ONLY_ACTIVE_ARCH = YES; 304 | SDKROOT = iphoneos; 305 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 306 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 307 | }; 308 | name = Debug; 309 | }; 310 | 9617C2671FDA5F3400D000E8 /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_ANALYZER_NONNULL = YES; 315 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 317 | CLANG_CXX_LIBRARY = "libc++"; 318 | CLANG_ENABLE_MODULES = YES; 319 | CLANG_ENABLE_OBJC_ARC = YES; 320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 321 | CLANG_WARN_BOOL_CONVERSION = YES; 322 | CLANG_WARN_COMMA = YES; 323 | CLANG_WARN_CONSTANT_CONVERSION = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 326 | CLANG_WARN_EMPTY_BODY = YES; 327 | CLANG_WARN_ENUM_CONVERSION = YES; 328 | CLANG_WARN_INFINITE_RECURSION = YES; 329 | CLANG_WARN_INT_CONVERSION = YES; 330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 334 | CLANG_WARN_STRICT_PROTOTYPES = YES; 335 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 336 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 337 | CLANG_WARN_UNREACHABLE_CODE = YES; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | CODE_SIGN_IDENTITY = "iPhone Developer"; 340 | COPY_PHASE_STRIP = NO; 341 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 342 | ENABLE_NS_ASSERTIONS = NO; 343 | ENABLE_STRICT_OBJC_MSGSEND = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu11; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 353 | MTL_ENABLE_DEBUG_INFO = NO; 354 | SDKROOT = iphoneos; 355 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 356 | VALIDATE_PRODUCT = YES; 357 | }; 358 | name = Release; 359 | }; 360 | 9617C2691FDA5F3400D000E8 /* Debug */ = { 361 | isa = XCBuildConfiguration; 362 | baseConfigurationReference = 144EAA1038C111C78C38599B /* Pods-FlowerClassifier.debug.xcconfig */; 363 | buildSettings = { 364 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 365 | CODE_SIGN_STYLE = Automatic; 366 | DEVELOPMENT_TEAM = 4MM743TR5P; 367 | INFOPLIST_FILE = FlowerClassifier/Info.plist; 368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 369 | PRODUCT_BUNDLE_IDENTIFIER = io.vamshi.FlowerClassifier; 370 | PRODUCT_NAME = "$(TARGET_NAME)"; 371 | SWIFT_VERSION = 4.0; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | }; 374 | name = Debug; 375 | }; 376 | 9617C26A1FDA5F3400D000E8 /* Release */ = { 377 | isa = XCBuildConfiguration; 378 | baseConfigurationReference = 3660C37331FD73CDC56620A0 /* Pods-FlowerClassifier.release.xcconfig */; 379 | buildSettings = { 380 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 381 | CODE_SIGN_STYLE = Automatic; 382 | DEVELOPMENT_TEAM = 4MM743TR5P; 383 | INFOPLIST_FILE = FlowerClassifier/Info.plist; 384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 385 | PRODUCT_BUNDLE_IDENTIFIER = io.vamshi.FlowerClassifier; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | SWIFT_VERSION = 4.0; 388 | TARGETED_DEVICE_FAMILY = "1,2"; 389 | }; 390 | name = Release; 391 | }; 392 | /* End XCBuildConfiguration section */ 393 | 394 | /* Begin XCConfigurationList section */ 395 | 9617C2511FDA5F3400D000E8 /* Build configuration list for PBXProject "FlowerClassifier" */ = { 396 | isa = XCConfigurationList; 397 | buildConfigurations = ( 398 | 9617C2661FDA5F3400D000E8 /* Debug */, 399 | 9617C2671FDA5F3400D000E8 /* Release */, 400 | ); 401 | defaultConfigurationIsVisible = 0; 402 | defaultConfigurationName = Release; 403 | }; 404 | 9617C2681FDA5F3400D000E8 /* Build configuration list for PBXNativeTarget "FlowerClassifier" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | 9617C2691FDA5F3400D000E8 /* Debug */, 408 | 9617C26A1FDA5F3400D000E8 /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | defaultConfigurationName = Release; 412 | }; 413 | /* End XCConfigurationList section */ 414 | }; 415 | rootObject = 9617C24E1FDA5F3400D000E8 /* Project object */; 416 | } 417 | --------------------------------------------------------------------------------