Skip to content

Commit d02e5ce

Browse files
committed
Hotdog Image Recognition app utilizing CoreML. Inspiration from Silicon Valley TV series. Hot Dog / Not Hot Dog app
1 parent f5de71c commit d02e5ce

File tree

13 files changed

+792
-0
lines changed

13 files changed

+792
-0
lines changed

Calculator/Calculator/Model/CalculatorLogic.swift

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct CalculatorLogic {
1313
private var number: Double?
1414

1515
private var intermediateCalculation: (n1: Double, calcMethod: String)?
16+
private var intermediateCalculations: (numbers: [Double], calcMethod: String)?
1617

1718
mutating func setNumber(_ number: Double) {
1819
self.number = number
@@ -54,6 +55,10 @@ struct CalculatorLogic {
5455
} else { return nil }
5556
}
5657

58+
// private func performMultipleNumberCalculations(numbers: [Double]) -> Double? {
59+
//
60+
// }
61+
5762
func isInt(_ value: Double) -> Bool {
5863
let isInt = floor(value) == value
5964

+347
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,347 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 50;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
9E7A0D3C23C699A7003DC0F2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E7A0D3B23C699A7003DC0F2 /* AppDelegate.swift */; };
11+
9E7A0D3E23C699A7003DC0F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E7A0D3D23C699A7003DC0F2 /* SceneDelegate.swift */; };
12+
9E7A0D4023C699A7003DC0F2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E7A0D3F23C699A7003DC0F2 /* ViewController.swift */; };
13+
9E7A0D4323C699A7003DC0F2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9E7A0D4123C699A7003DC0F2 /* Main.storyboard */; };
14+
9E7A0D4523C699A8003DC0F2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9E7A0D4423C699A8003DC0F2 /* Assets.xcassets */; };
15+
9E7A0D4823C699A8003DC0F2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9E7A0D4623C699A8003DC0F2 /* LaunchScreen.storyboard */; };
16+
9E7A0D5023C699E1003DC0F2 /* Inceptionv3.mlmodel in Sources */ = {isa = PBXBuildFile; fileRef = 9E7A0D4F23C699E1003DC0F2 /* Inceptionv3.mlmodel */; };
17+
/* End PBXBuildFile section */
18+
19+
/* Begin PBXFileReference section */
20+
9E7A0D3823C699A7003DC0F2 /* Seafood.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Seafood.app; sourceTree = BUILT_PRODUCTS_DIR; };
21+
9E7A0D3B23C699A7003DC0F2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
22+
9E7A0D3D23C699A7003DC0F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
23+
9E7A0D3F23C699A7003DC0F2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
24+
9E7A0D4223C699A7003DC0F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
25+
9E7A0D4423C699A8003DC0F2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
26+
9E7A0D4723C699A8003DC0F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
27+
9E7A0D4923C699A8003DC0F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
28+
9E7A0D4F23C699E1003DC0F2 /* Inceptionv3.mlmodel */ = {isa = PBXFileReference; lastKnownFileType = file.mlmodel; path = Inceptionv3.mlmodel; sourceTree = "<group>"; };
29+
/* End PBXFileReference section */
30+
31+
/* Begin PBXFrameworksBuildPhase section */
32+
9E7A0D3523C699A7003DC0F2 /* Frameworks */ = {
33+
isa = PBXFrameworksBuildPhase;
34+
buildActionMask = 2147483647;
35+
files = (
36+
);
37+
runOnlyForDeploymentPostprocessing = 0;
38+
};
39+
/* End PBXFrameworksBuildPhase section */
40+
41+
/* Begin PBXGroup section */
42+
9E7A0D2F23C699A7003DC0F2 = {
43+
isa = PBXGroup;
44+
children = (
45+
9E7A0D3A23C699A7003DC0F2 /* Seafood */,
46+
9E7A0D3923C699A7003DC0F2 /* Products */,
47+
);
48+
sourceTree = "<group>";
49+
};
50+
9E7A0D3923C699A7003DC0F2 /* Products */ = {
51+
isa = PBXGroup;
52+
children = (
53+
9E7A0D3823C699A7003DC0F2 /* Seafood.app */,
54+
);
55+
name = Products;
56+
sourceTree = "<group>";
57+
};
58+
9E7A0D3A23C699A7003DC0F2 /* Seafood */ = {
59+
isa = PBXGroup;
60+
children = (
61+
9E7A0D3B23C699A7003DC0F2 /* AppDelegate.swift */,
62+
9E7A0D3D23C699A7003DC0F2 /* SceneDelegate.swift */,
63+
9E7A0D3F23C699A7003DC0F2 /* ViewController.swift */,
64+
9E7A0D4123C699A7003DC0F2 /* Main.storyboard */,
65+
9E7A0D4423C699A8003DC0F2 /* Assets.xcassets */,
66+
9E7A0D4623C699A8003DC0F2 /* LaunchScreen.storyboard */,
67+
9E7A0D4923C699A8003DC0F2 /* Info.plist */,
68+
9E7A0D4F23C699E1003DC0F2 /* Inceptionv3.mlmodel */,
69+
);
70+
path = Seafood;
71+
sourceTree = "<group>";
72+
};
73+
/* End PBXGroup section */
74+
75+
/* Begin PBXNativeTarget section */
76+
9E7A0D3723C699A7003DC0F2 /* Seafood */ = {
77+
isa = PBXNativeTarget;
78+
buildConfigurationList = 9E7A0D4C23C699A8003DC0F2 /* Build configuration list for PBXNativeTarget "Seafood" */;
79+
buildPhases = (
80+
9E7A0D3423C699A7003DC0F2 /* Sources */,
81+
9E7A0D3523C699A7003DC0F2 /* Frameworks */,
82+
9E7A0D3623C699A7003DC0F2 /* Resources */,
83+
);
84+
buildRules = (
85+
);
86+
dependencies = (
87+
);
88+
name = Seafood;
89+
productName = Seafood;
90+
productReference = 9E7A0D3823C699A7003DC0F2 /* Seafood.app */;
91+
productType = "com.apple.product-type.application";
92+
};
93+
/* End PBXNativeTarget section */
94+
95+
/* Begin PBXProject section */
96+
9E7A0D3023C699A7003DC0F2 /* Project object */ = {
97+
isa = PBXProject;
98+
attributes = {
99+
LastSwiftUpdateCheck = 1130;
100+
LastUpgradeCheck = 1130;
101+
ORGANIZATIONNAME = "Stephen Brundage";
102+
TargetAttributes = {
103+
9E7A0D3723C699A7003DC0F2 = {
104+
CreatedOnToolsVersion = 11.3;
105+
};
106+
};
107+
};
108+
buildConfigurationList = 9E7A0D3323C699A7003DC0F2 /* Build configuration list for PBXProject "Seafood" */;
109+
compatibilityVersion = "Xcode 9.3";
110+
developmentRegion = en;
111+
hasScannedForEncodings = 0;
112+
knownRegions = (
113+
en,
114+
Base,
115+
);
116+
mainGroup = 9E7A0D2F23C699A7003DC0F2;
117+
productRefGroup = 9E7A0D3923C699A7003DC0F2 /* Products */;
118+
projectDirPath = "";
119+
projectRoot = "";
120+
targets = (
121+
9E7A0D3723C699A7003DC0F2 /* Seafood */,
122+
);
123+
};
124+
/* End PBXProject section */
125+
126+
/* Begin PBXResourcesBuildPhase section */
127+
9E7A0D3623C699A7003DC0F2 /* Resources */ = {
128+
isa = PBXResourcesBuildPhase;
129+
buildActionMask = 2147483647;
130+
files = (
131+
9E7A0D4823C699A8003DC0F2 /* LaunchScreen.storyboard in Resources */,
132+
9E7A0D4523C699A8003DC0F2 /* Assets.xcassets in Resources */,
133+
9E7A0D4323C699A7003DC0F2 /* Main.storyboard in Resources */,
134+
);
135+
runOnlyForDeploymentPostprocessing = 0;
136+
};
137+
/* End PBXResourcesBuildPhase section */
138+
139+
/* Begin PBXSourcesBuildPhase section */
140+
9E7A0D3423C699A7003DC0F2 /* Sources */ = {
141+
isa = PBXSourcesBuildPhase;
142+
buildActionMask = 2147483647;
143+
files = (
144+
9E7A0D4023C699A7003DC0F2 /* ViewController.swift in Sources */,
145+
9E7A0D5023C699E1003DC0F2 /* Inceptionv3.mlmodel in Sources */,
146+
9E7A0D3C23C699A7003DC0F2 /* AppDelegate.swift in Sources */,
147+
9E7A0D3E23C699A7003DC0F2 /* SceneDelegate.swift in Sources */,
148+
);
149+
runOnlyForDeploymentPostprocessing = 0;
150+
};
151+
/* End PBXSourcesBuildPhase section */
152+
153+
/* Begin PBXVariantGroup section */
154+
9E7A0D4123C699A7003DC0F2 /* Main.storyboard */ = {
155+
isa = PBXVariantGroup;
156+
children = (
157+
9E7A0D4223C699A7003DC0F2 /* Base */,
158+
);
159+
name = Main.storyboard;
160+
sourceTree = "<group>";
161+
};
162+
9E7A0D4623C699A8003DC0F2 /* LaunchScreen.storyboard */ = {
163+
isa = PBXVariantGroup;
164+
children = (
165+
9E7A0D4723C699A8003DC0F2 /* Base */,
166+
);
167+
name = LaunchScreen.storyboard;
168+
sourceTree = "<group>";
169+
};
170+
/* End PBXVariantGroup section */
171+
172+
/* Begin XCBuildConfiguration section */
173+
9E7A0D4A23C699A8003DC0F2 /* Debug */ = {
174+
isa = XCBuildConfiguration;
175+
buildSettings = {
176+
ALWAYS_SEARCH_USER_PATHS = NO;
177+
CLANG_ANALYZER_NONNULL = YES;
178+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
179+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
180+
CLANG_CXX_LIBRARY = "libc++";
181+
CLANG_ENABLE_MODULES = YES;
182+
CLANG_ENABLE_OBJC_ARC = YES;
183+
CLANG_ENABLE_OBJC_WEAK = YES;
184+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
185+
CLANG_WARN_BOOL_CONVERSION = YES;
186+
CLANG_WARN_COMMA = YES;
187+
CLANG_WARN_CONSTANT_CONVERSION = YES;
188+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
189+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
190+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
191+
CLANG_WARN_EMPTY_BODY = YES;
192+
CLANG_WARN_ENUM_CONVERSION = YES;
193+
CLANG_WARN_INFINITE_RECURSION = YES;
194+
CLANG_WARN_INT_CONVERSION = YES;
195+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
196+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
197+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
198+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
199+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
200+
CLANG_WARN_STRICT_PROTOTYPES = YES;
201+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
202+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
203+
CLANG_WARN_UNREACHABLE_CODE = YES;
204+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
205+
COPY_PHASE_STRIP = NO;
206+
DEBUG_INFORMATION_FORMAT = dwarf;
207+
ENABLE_STRICT_OBJC_MSGSEND = YES;
208+
ENABLE_TESTABILITY = YES;
209+
GCC_C_LANGUAGE_STANDARD = gnu11;
210+
GCC_DYNAMIC_NO_PIC = NO;
211+
GCC_NO_COMMON_BLOCKS = YES;
212+
GCC_OPTIMIZATION_LEVEL = 0;
213+
GCC_PREPROCESSOR_DEFINITIONS = (
214+
"DEBUG=1",
215+
"$(inherited)",
216+
);
217+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
218+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
219+
GCC_WARN_UNDECLARED_SELECTOR = YES;
220+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
221+
GCC_WARN_UNUSED_FUNCTION = YES;
222+
GCC_WARN_UNUSED_VARIABLE = YES;
223+
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
224+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
225+
MTL_FAST_MATH = YES;
226+
ONLY_ACTIVE_ARCH = YES;
227+
SDKROOT = iphoneos;
228+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
229+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
230+
};
231+
name = Debug;
232+
};
233+
9E7A0D4B23C699A8003DC0F2 /* Release */ = {
234+
isa = XCBuildConfiguration;
235+
buildSettings = {
236+
ALWAYS_SEARCH_USER_PATHS = NO;
237+
CLANG_ANALYZER_NONNULL = YES;
238+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
239+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
240+
CLANG_CXX_LIBRARY = "libc++";
241+
CLANG_ENABLE_MODULES = YES;
242+
CLANG_ENABLE_OBJC_ARC = YES;
243+
CLANG_ENABLE_OBJC_WEAK = YES;
244+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
245+
CLANG_WARN_BOOL_CONVERSION = YES;
246+
CLANG_WARN_COMMA = YES;
247+
CLANG_WARN_CONSTANT_CONVERSION = YES;
248+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
249+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
250+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
251+
CLANG_WARN_EMPTY_BODY = YES;
252+
CLANG_WARN_ENUM_CONVERSION = YES;
253+
CLANG_WARN_INFINITE_RECURSION = YES;
254+
CLANG_WARN_INT_CONVERSION = YES;
255+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
256+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
257+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
258+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
259+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
260+
CLANG_WARN_STRICT_PROTOTYPES = YES;
261+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
262+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
263+
CLANG_WARN_UNREACHABLE_CODE = YES;
264+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
265+
COPY_PHASE_STRIP = NO;
266+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
267+
ENABLE_NS_ASSERTIONS = NO;
268+
ENABLE_STRICT_OBJC_MSGSEND = YES;
269+
GCC_C_LANGUAGE_STANDARD = gnu11;
270+
GCC_NO_COMMON_BLOCKS = YES;
271+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
272+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
273+
GCC_WARN_UNDECLARED_SELECTOR = YES;
274+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
275+
GCC_WARN_UNUSED_FUNCTION = YES;
276+
GCC_WARN_UNUSED_VARIABLE = YES;
277+
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
278+
MTL_ENABLE_DEBUG_INFO = NO;
279+
MTL_FAST_MATH = YES;
280+
SDKROOT = iphoneos;
281+
SWIFT_COMPILATION_MODE = wholemodule;
282+
SWIFT_OPTIMIZATION_LEVEL = "-O";
283+
VALIDATE_PRODUCT = YES;
284+
};
285+
name = Release;
286+
};
287+
9E7A0D4D23C699A8003DC0F2 /* Debug */ = {
288+
isa = XCBuildConfiguration;
289+
buildSettings = {
290+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
291+
CODE_SIGN_STYLE = Automatic;
292+
DEVELOPMENT_TEAM = J7U54B96T9;
293+
INFOPLIST_FILE = Seafood/Info.plist;
294+
LD_RUNPATH_SEARCH_PATHS = (
295+
"$(inherited)",
296+
"@executable_path/Frameworks",
297+
);
298+
PRODUCT_BUNDLE_IDENTIFIER = com.sbrundage.Seafood;
299+
PRODUCT_NAME = "$(TARGET_NAME)";
300+
SWIFT_VERSION = 5.0;
301+
TARGETED_DEVICE_FAMILY = "1,2";
302+
};
303+
name = Debug;
304+
};
305+
9E7A0D4E23C699A8003DC0F2 /* Release */ = {
306+
isa = XCBuildConfiguration;
307+
buildSettings = {
308+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
309+
CODE_SIGN_STYLE = Automatic;
310+
DEVELOPMENT_TEAM = J7U54B96T9;
311+
INFOPLIST_FILE = Seafood/Info.plist;
312+
LD_RUNPATH_SEARCH_PATHS = (
313+
"$(inherited)",
314+
"@executable_path/Frameworks",
315+
);
316+
PRODUCT_BUNDLE_IDENTIFIER = com.sbrundage.Seafood;
317+
PRODUCT_NAME = "$(TARGET_NAME)";
318+
SWIFT_VERSION = 5.0;
319+
TARGETED_DEVICE_FAMILY = "1,2";
320+
};
321+
name = Release;
322+
};
323+
/* End XCBuildConfiguration section */
324+
325+
/* Begin XCConfigurationList section */
326+
9E7A0D3323C699A7003DC0F2 /* Build configuration list for PBXProject "Seafood" */ = {
327+
isa = XCConfigurationList;
328+
buildConfigurations = (
329+
9E7A0D4A23C699A8003DC0F2 /* Debug */,
330+
9E7A0D4B23C699A8003DC0F2 /* Release */,
331+
);
332+
defaultConfigurationIsVisible = 0;
333+
defaultConfigurationName = Release;
334+
};
335+
9E7A0D4C23C699A8003DC0F2 /* Build configuration list for PBXNativeTarget "Seafood" */ = {
336+
isa = XCConfigurationList;
337+
buildConfigurations = (
338+
9E7A0D4D23C699A8003DC0F2 /* Debug */,
339+
9E7A0D4E23C699A8003DC0F2 /* Release */,
340+
);
341+
defaultConfigurationIsVisible = 0;
342+
defaultConfigurationName = Release;
343+
};
344+
/* End XCConfigurationList section */
345+
};
346+
rootObject = 9E7A0D3023C699A7003DC0F2 /* Project object */;
347+
}

Seafood/Seafood.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)