diff --git a/.DS_Store b/.DS_Store index 651b951..47dfabc 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/HikingSurvey/HikingSurvey/ChartView.swift b/HikingSurvey/HikingSurvey/ChartView.swift index 1c7570f..d51a4a5 100644 --- a/HikingSurvey/HikingSurvey/ChartView.swift +++ b/HikingSurvey/HikingSurvey/ChartView.swift @@ -17,18 +17,18 @@ struct ChartView: View { var body: some View { Chart(responses) { response in - SectorMark(angle: .value("Type", 1), innerRadius: .ratio(0.75)) //中の円を元の75%のサイズで - .foregroundStyle(by: .value("sentiment", response.sentiment)) + SectorMark(angle: .value("Type", 1), innerRadius: .ratio(0.75)) //angle: .value("Type", 1)=全員同じサイズ.内側を75%くり抜く + .foregroundStyle(by: .value("sentiment", response.sentiment)) //sentiment型が持つラベル名をvalueとして } .chartForegroundStyleScale([ Sentiment.positive : Sentiment.positive.sentimentColor, Sentiment.negative : Sentiment.negative.sentimentColor, Sentiment.moderate : Sentiment.moderate.sentimentColor ]) - .chartBackground { chartProxy in + .chartBackground { chartProxy in //チャートの背景に何か描くよ GeometryReader { geometry in - if let anchor = chartProxy.plotFrame { - let frame = geometry[anchor] + if let anchor = chartProxy.plotFrame { //グラフ描画のエリア + let frame = geometry[anchor] // 情報を取得後、フレームサイズとして代入 Image(systemName: "figure.hiking") .resizable() .aspectRatio(contentMode: .fit) diff --git a/HikingSurvey/HikingSurvey/ContentView.swift b/HikingSurvey/HikingSurvey/ContentView.swift index d43d590..177eb97 100644 --- a/HikingSurvey/HikingSurvey/ContentView.swift +++ b/HikingSurvey/HikingSurvey/ContentView.swift @@ -30,7 +30,7 @@ struct ContentView: View { ScrollView { //この中に入っているものしか、スクロールに反映されない ChartView(responses: responses) ForEach(responses) { response in - ResponseView(response: response) + ResponseView(response: response) //(引数名: 渡す値) } } HStack { @@ -47,7 +47,7 @@ struct ContentView: View { } .padding(.bottom, 8) } - .onAppear { + .onAppear { //同期処理、画面が表示された時に1回だけ実行 for response in Response.sampleResponses { saveResponse(text: response) } diff --git a/HikingSurvey/HikingSurvey/Sentiment.swift b/HikingSurvey/HikingSurvey/Sentiment.swift index 052df2b..95a7351 100644 --- a/HikingSurvey/HikingSurvey/Sentiment.swift +++ b/HikingSurvey/HikingSurvey/Sentiment.swift @@ -10,7 +10,7 @@ import SwiftUI import Charts //グラフ描画 -enum Sentiment: String, Plottable { //感情スコアごとに表示ケースを変えるため +enum Sentiment: String, Plottable { //グラフに使えるというプロトコル case positive = "Positive" //各々の状態に名前をつける case negative = "Negative" case moderate = "Moderate" diff --git a/SignDecoder/SignDecoder.xcodeproj/project.pbxproj b/SignDecoder/SignDecoder.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ed0abde --- /dev/null +++ b/SignDecoder/SignDecoder.xcodeproj/project.pbxproj @@ -0,0 +1,333 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXFileReference section */ + 52BEBFEB2FABF40D00DA6EF5 /* SignDecoder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SignDecoder.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 52BEBFED2FABF40D00DA6EF5 /* SignDecoder */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = SignDecoder; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 52BEBFE82FABF40D00DA6EF5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 52BEBFE22FABF40D00DA6EF5 = { + isa = PBXGroup; + children = ( + 52BEBFED2FABF40D00DA6EF5 /* SignDecoder */, + 52BEBFEC2FABF40D00DA6EF5 /* Products */, + ); + sourceTree = ""; + }; + 52BEBFEC2FABF40D00DA6EF5 /* Products */ = { + isa = PBXGroup; + children = ( + 52BEBFEB2FABF40D00DA6EF5 /* SignDecoder.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 52BEBFEA2FABF40D00DA6EF5 /* SignDecoder */ = { + isa = PBXNativeTarget; + buildConfigurationList = 52BEBFF62FABF40D00DA6EF5 /* Build configuration list for PBXNativeTarget "SignDecoder" */; + buildPhases = ( + 52BEBFE72FABF40D00DA6EF5 /* Sources */, + 52BEBFE82FABF40D00DA6EF5 /* Frameworks */, + 52BEBFE92FABF40D00DA6EF5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 52BEBFED2FABF40D00DA6EF5 /* SignDecoder */, + ); + name = SignDecoder; + packageProductDependencies = ( + ); + productName = SignDecoder; + productReference = 52BEBFEB2FABF40D00DA6EF5 /* SignDecoder.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 52BEBFE32FABF40D00DA6EF5 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 2640; + LastUpgradeCheck = 2640; + TargetAttributes = { + 52BEBFEA2FABF40D00DA6EF5 = { + CreatedOnToolsVersion = 26.4.1; + }; + }; + }; + buildConfigurationList = 52BEBFE62FABF40D00DA6EF5 /* Build configuration list for PBXProject "SignDecoder" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 52BEBFE22FABF40D00DA6EF5; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 52BEBFEC2FABF40D00DA6EF5 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 52BEBFEA2FABF40D00DA6EF5 /* SignDecoder */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 52BEBFE92FABF40D00DA6EF5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 52BEBFE72FABF40D00DA6EF5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 52BEBFF42FABF40D00DA6EF5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 26.4; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 52BEBFF52FABF40D00DA6EF5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 26.4; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 52BEBFF72FABF40D00DA6EF5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.ayanentity.SignDecoder; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 52BEBFF82FABF40D00DA6EF5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.ayanentity.SignDecoder; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 52BEBFE62FABF40D00DA6EF5 /* Build configuration list for PBXProject "SignDecoder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 52BEBFF42FABF40D00DA6EF5 /* Debug */, + 52BEBFF52FABF40D00DA6EF5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 52BEBFF62FABF40D00DA6EF5 /* Build configuration list for PBXNativeTarget "SignDecoder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 52BEBFF72FABF40D00DA6EF5 /* Debug */, + 52BEBFF82FABF40D00DA6EF5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 52BEBFE32FABF40D00DA6EF5 /* Project object */; +} diff --git a/SignDecoder/SignDecoder.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SignDecoder/SignDecoder.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/SignDecoder/SignDecoder.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SignDecoder/SignDecoder.xcodeproj/xcuserdata/tity.xcuserdatad/xcschemes/xcschememanagement.plist b/SignDecoder/SignDecoder.xcodeproj/xcuserdata/tity.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..a68266d --- /dev/null +++ b/SignDecoder/SignDecoder.xcodeproj/xcuserdata/tity.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + SignDecoder.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/SignDecoder/SignDecoder/Assets.xcassets/AccentColor.colorset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/AppIcon.appiconset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/background.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/background.imageset/Contents.json new file mode 100644 index 0000000..9f447e1 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "background.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/background.imageset/background.png b/SignDecoder/SignDecoder/Assets.xcassets/background.imageset/background.png new file mode 100644 index 0000000..964aaa1 Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/background.imageset/background.png differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign1.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign1.imageset/Contents.json new file mode 100644 index 0000000..14c73f6 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign1.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign1.imageset/sign1.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign1.imageset/sign1.jpg new file mode 100644 index 0000000..e47e6d8 Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign1.imageset/sign1.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign2.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign2.imageset/Contents.json new file mode 100644 index 0000000..94d2575 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign2.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign2.imageset/sign2.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign2.imageset/sign2.jpg new file mode 100644 index 0000000..b9d47b1 Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign2.imageset/sign2.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign3.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign3.imageset/Contents.json new file mode 100644 index 0000000..a4013b7 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign3.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign3.imageset/sign3.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign3.imageset/sign3.jpg new file mode 100644 index 0000000..d3dce9d Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign3.imageset/sign3.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign4.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign4.imageset/Contents.json new file mode 100644 index 0000000..4252e5d --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign4.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign4.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign4.imageset/sign4.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign4.imageset/sign4.jpg new file mode 100644 index 0000000..035be19 Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign4.imageset/sign4.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign5.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign5.imageset/Contents.json new file mode 100644 index 0000000..53621d1 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign5.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign5.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign5.imageset/sign5.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign5.imageset/sign5.jpg new file mode 100644 index 0000000..47d74f6 Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign5.imageset/sign5.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign6.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign6.imageset/Contents.json new file mode 100644 index 0000000..02c1e50 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign6.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign6.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign6.imageset/sign6.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign6.imageset/sign6.jpg new file mode 100644 index 0000000..00efe2c Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign6.imageset/sign6.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign7.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign7.imageset/Contents.json new file mode 100644 index 0000000..1f019a7 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign7.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign7.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign7.imageset/sign7.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign7.imageset/sign7.jpg new file mode 100644 index 0000000..b5cbe95 Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign7.imageset/sign7.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign8.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign8.imageset/Contents.json new file mode 100644 index 0000000..532c6c5 --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign8.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign8.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign8.imageset/sign8.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign8.imageset/sign8.jpg new file mode 100644 index 0000000..3b719fb Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign8.imageset/sign8.jpg differ diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign9.imageset/Contents.json b/SignDecoder/SignDecoder/Assets.xcassets/sign9.imageset/Contents.json new file mode 100644 index 0000000..96110ed --- /dev/null +++ b/SignDecoder/SignDecoder/Assets.xcassets/sign9.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign9.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignDecoder/SignDecoder/Assets.xcassets/sign9.imageset/sign9.jpg b/SignDecoder/SignDecoder/Assets.xcassets/sign9.imageset/sign9.jpg new file mode 100644 index 0000000..6636336 Binary files /dev/null and b/SignDecoder/SignDecoder/Assets.xcassets/sign9.imageset/sign9.jpg differ diff --git a/SignDecoder/SignDecoder/BoundsRect.swift b/SignDecoder/SignDecoder/BoundsRect.swift new file mode 100644 index 0000000..0d34217 --- /dev/null +++ b/SignDecoder/SignDecoder/BoundsRect.swift @@ -0,0 +1,20 @@ +// +// BoundsRect.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// +import Foundation +import SwiftUI +import Vision + + +struct BoundsRect: Shape { + let normalizedRect: NormalizedRect + + + func path(in rect: CGRect) -> Path { //認識されたテキストの各観測値には、画像内のどこでテキストが認識されたかに関する情報が含まれている + let imageCoordinatesRect = normalizedRect.toImageCoordinates(rect.size, origin: .upperLeft) + return Path(imageCoordinatesRect) + } +} diff --git a/SignDecoder/SignDecoder/ContentView.swift b/SignDecoder/SignDecoder/ContentView.swift new file mode 100644 index 0000000..829a67c --- /dev/null +++ b/SignDecoder/SignDecoder/ContentView.swift @@ -0,0 +1,29 @@ +// +// ContentView.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + NavigationStack{ + VStack( alignment: .leading, spacing: 50){ + Text("Tap to select a sign to translate") + .font(.headline) + + ImageGalleryView() + Spacer() + } + .trailTheme() + .navigationTitle("Sign Decoder") + + } + } +} + +#Preview { + ContentView() +} diff --git a/SignDecoder/SignDecoder/ImageGalleryView.swift b/SignDecoder/SignDecoder/ImageGalleryView.swift new file mode 100644 index 0000000..7e7b9f9 --- /dev/null +++ b/SignDecoder/SignDecoder/ImageGalleryView.swift @@ -0,0 +1,48 @@ +// +// ImageGalleryView.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// + +import SwiftUI + + +struct ImageGalleryView: View { + let itemSize = 100.0 + + + let imageResources: [[ImageResource]] = [ + [.sign1, .sign2, .sign3], + [.sign4, .sign5, .sign6], + [.sign7, .sign8, .sign9] + ] + + var body: some View { + Grid { + ForEach(imageResources, id: \.self) { resourceRow in + GridRow { + ForEach(resourceRow, id: \.self) { resource in + NavigationLink { + TextRecognitionView(imageResource: resource) + } label: { + Image(resource) + .resizable() + .aspectRatio(contentMode: .fill) + .frame(width: itemSize, height: itemSize) + .clipShape(RoundedRectangle(cornerRadius: 8)) + .padding(10) + } + } + } + } + } + } +} + + +#Preview { + NavigationStack { + ImageGalleryView() + } +} diff --git a/SignDecoder/SignDecoder/SignDecoderApp.swift b/SignDecoder/SignDecoder/SignDecoderApp.swift new file mode 100644 index 0000000..1388409 --- /dev/null +++ b/SignDecoder/SignDecoder/SignDecoderApp.swift @@ -0,0 +1,18 @@ +// +// SignDecoderApp.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// + +import SwiftUI +import Vision + +@main +struct SignDecoderApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/SignDecoder/SignDecoder/TextRecognitionView.swift b/SignDecoder/SignDecoder/TextRecognitionView.swift new file mode 100644 index 0000000..b60ae86 --- /dev/null +++ b/SignDecoder/SignDecoder/TextRecognitionView.swift @@ -0,0 +1,53 @@ +// +// TextRecognitionView.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// +import SwiftUI +import Vision + +struct TextRecognitionView: View { + let imageResource: ImageResource //imageResourceで参照できる? + @State private var textRecognizer: TextRecognizer? //nilかどうか + let boundingColor = Color(red: 1.00, green: 0.00, blue: 0.85) //色の指定 + + + var body: some View { + VStack { + Image(imageResource) + .resizable() + .aspectRatio(contentMode: .fit) //figmaのfitと同じ + .clipShape(RoundedRectangle(cornerRadius: 32)) + .task { + textRecognizer = await TextRecognizer(imageResource: imageResource) + } + .overlay { + if let observations = textRecognizer?.observations { + ForEach(observations, id: \.uuid) { observation in + BoundsRect(normalizedRect: observation.boundingBox) + .stroke(boundingColor, lineWidth: 3) + } + + } + } + Spacer() + + TranslationView(text: textRecognizer?.recognizedText ?? "", isProcessing: isProcessing) + } + .padding() + .trailTheme() + .navigationTitle("Sign Info") + } + private var isProcessing: Bool { + textRecognizer == nil + } +} + + +#Preview { + NavigationStack{ + TextRecognitionView(imageResource: .sign1) + .navigationBarTitleDisplayMode(.inline) + } +} diff --git a/SignDecoder/SignDecoder/TextRecognizer.swift b/SignDecoder/SignDecoder/TextRecognizer.swift new file mode 100644 index 0000000..2e4e9eb --- /dev/null +++ b/SignDecoder/SignDecoder/TextRecognizer.swift @@ -0,0 +1,41 @@ +// +// TextRecognizer.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// +// テキスト検索エンジンコード + +import Foundation +import SwiftUI +import Vision + + +struct TextRecognizer { + var recognizedText = "" //画像に含まれるすべてのテキストを格納する変数 + var observations: [RecognizedTextObservation] = [] + + init(imageResource: ImageResource) async { //処理が重いから非同期処理にするよascync + var request = RecognizeTextRequest() //文字認識のリクエスト + // request.recognitionLevel = .fast //処理は速いが認識の精度は落ちる.動画や大量の画像用 + request.recognitionLevel = .accurate //精度いいやつ.処理は遅い + + + let image = UIImage(resource: imageResource) + + + if let imageData = image.pngData(), + let results = try? await request.perform(on: imageData) { //try? → 失敗してもクラッシュしない・nilを返す await → 認識が終わるまで待つ! + observations = results + + } + + for observation in observations { + let candidate = observation.topCandidates(1) //最も可能性のあるものを入れて .topCandidates(1) → 1番可能性が高いものだけ!()は1つだけって意味.この時点で[SLOW,DOEM] + + if let observedText = candidate.first?.string { // + recognizedText += "\(observedText) " //ここで「SLOW」+「DOWN」 + } + } + } +} diff --git a/SignDecoder/SignDecoder/TrailTheme.swift b/SignDecoder/SignDecoder/TrailTheme.swift new file mode 100644 index 0000000..bdac76a --- /dev/null +++ b/SignDecoder/SignDecoder/TrailTheme.swift @@ -0,0 +1,31 @@ +// +// TrailTheme.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// +import Foundation +import SwiftUI + + +struct TrailTheme: ViewModifier { + func body(content: Content) -> some View { + ZStack { + VStack { + Image(.background) + .resizable() + .edgesIgnoringSafeArea(.all) + .frame(maxHeight: 250, alignment: .top) + Spacer() + } + content + } + } +} + + +extension View { + func trailTheme() -> some View { + modifier(TrailTheme()) + } +} diff --git a/SignDecoder/SignDecoder/TranslationView.swift b/SignDecoder/SignDecoder/TranslationView.swift new file mode 100644 index 0000000..15654f0 --- /dev/null +++ b/SignDecoder/SignDecoder/TranslationView.swift @@ -0,0 +1,57 @@ +// +// TranslationView.swift +// SignDecoder +// +// Created by 仲里絢音 on 2026/05/07. +// + +import SwiftUI +import Translation //翻訳機械学習フレームワーク +import Vision + + +struct TranslationView: View { + var text: String + var isProcessing: Bool + @State private var showingTranslation = false + + + var body: some View { + VStack { + Text("Identified Text") + .font(.subheadline.bold()) + .textCase(.uppercase) + .foregroundStyle(.gray) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.leading) + + + Text(text) + .frame(maxWidth: .infinity, + maxHeight: 50, + alignment: .topLeading) + .padding() + .background(Color(white: 0.9)) + .translationPresentation(isPresented: $showingTranslation, text: text) + + + Button { + showingTranslation = true + } label: { + Text("Translate") + .frame(height: 50) + .frame(width: 200) + .font(.title2.bold()) + .foregroundColor(.white) + .background(RoundedRectangle(cornerRadius: 24)) + } + .disabled(text.isEmpty) //認識できない場合は選択不可 + .padding(.top) + } + } +} + + +#Preview { + TranslationView(text: "Caution, falling rocks", isProcessing: false) +} diff --git a/TrailAnalyzer.mlproj/Data Sources/Trail10k.csv.json b/TrailAnalyzer.mlproj/Data Sources/Trail10k.csv.json new file mode 100644 index 0000000..baad96f --- /dev/null +++ b/TrailAnalyzer.mlproj/Data Sources/Trail10k.csv.json @@ -0,0 +1,127 @@ +{ + "activityEntities" : [ + "dataSourceTrainingStarted", + [ + { + "createdDate" : "2026-05-07T22:21:05Z", + "event" : "dataSourceTrainingStarted", + "id" : "A0E456B9-2F55-41F6-8179-DBFA58B97891", + "subtitle" : "TrailAnalyzer 1", + "title" : "Used By" + }, + { + "createdDate" : "2026-05-07T22:25:03Z", + "event" : "dataSourceTrainingStarted", + "id" : "853488A3-F7BA-4351-9C84-87587C1F79A9", + "subtitle" : "TrailAnalyzer Automatic", + "title" : "Used By" + }, + { + "createdDate" : "2026-05-07T22:26:10Z", + "event" : "dataSourceTrainingStarted", + "id" : "3A1B6C5E-5C52-4C1A-9579-11908BD9A722", + "subtitle" : "Linear Regression", + "title" : "Used By" + } + ], + "dataSourceMetrics", + [ + { + "createdDate" : "2026-05-07T22:21:05Z", + "event" : "dataSourceMetrics", + "id" : "AF9A235C-9BC4-497C-8E42-3744BFD88B58", + "subtitle" : "10,000 Items", + "title" : "Data Summary" + }, + { + "createdDate" : "2026-05-07T22:25:03Z", + "event" : "dataSourceMetrics", + "id" : "835DF60B-AF4A-48DE-9DB6-544DBA2D88C1", + "subtitle" : "10,000 Items", + "title" : "Data Summary" + }, + { + "createdDate" : "2026-05-07T22:26:10Z", + "event" : "dataSourceMetrics", + "id" : "1F77A1B1-76B7-479C-AE3E-0459CF865375", + "subtitle" : "10,000 Items", + "title" : "Data Summary" + } + ] + ], + "createdDate" : "2026-05-07T22:20:21Z", + "dataPathRelativeToProjectURL" : "../../../Downloads/TrailData/Trail10k.csv/", + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:20:21Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "No target selected", + "severity" : "notReady" + }, + { + "description" : "Data has 10000 rows", + "severity" : "info" + }, + { + "description" : "No features selected", + "severity" : "notReady" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "sampleCount" : 10000 + } + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "error" : { + "code" : 1000, + "domain" : "composer.error.domain", + "errorType" : "notReady", + "reason" : "No target selected" + }, + "itemsCount" : 10000 + }, + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "experimentIDs" : [ + "710EF732-51F2-4509-AF39-AA476D162125", + "B70C28C1-DE87-410F-BFAD-60CC4C74235D", + "8480E385-98C6-4A9D-BC9D-B65084B166EE" + ], + "id" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "modifiedDate" : "2026-05-07T22:26:10Z", + "pathType" : 0, + "preferredFilename" : "Trail10k.csv", + "title" : "Trail10k.csv", + "version" : "1.0" +} \ No newline at end of file diff --git a/TrailAnalyzer.mlproj/Data Sources/Trail1k.csv.json b/TrailAnalyzer.mlproj/Data Sources/Trail1k.csv.json new file mode 100644 index 0000000..5653d2d --- /dev/null +++ b/TrailAnalyzer.mlproj/Data Sources/Trail1k.csv.json @@ -0,0 +1,80 @@ +{ + "activityEntities" : [ + + ], + "createdDate" : "2026-05-07T22:20:47Z", + "dataPathRelativeToProjectURL" : "../../../Downloads/TrailData/Trail1k.csv/", + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3", + "0, 0, 0, 0, 0, 0, 0, 300, 300, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300", + "paved, sandy, sandy, sandy, sandy, sandy, sandy, paved, paved, paved, sandy, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved, paved, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:20:47Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "No target selected", + "severity" : "notReady" + }, + { + "description" : "Data has 1000 rows", + "severity" : "info" + }, + { + "description" : "No features selected", + "severity" : "notReady" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "sampleCount" : 1000 + } + }, + "dataSourceID" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail1k.csv", + "error" : { + "code" : 1000, + "domain" : "composer.error.domain", + "errorType" : "notReady", + "reason" : "No target selected" + }, + "itemsCount" : 1000 + }, + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail1k.csv", + "experimentIDs" : [ + "710EF732-51F2-4509-AF39-AA476D162125", + "B70C28C1-DE87-410F-BFAD-60CC4C74235D", + "8480E385-98C6-4A9D-BC9D-B65084B166EE" + ], + "id" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "modifiedDate" : "2026-05-07T22:25:29Z", + "pathType" : 0, + "preferredFilename" : "Trail1k.csv", + "title" : "Trail1k.csv", + "version" : "1.0" +} \ No newline at end of file diff --git a/TrailAnalyzer.mlproj/Model Containers/Linear Regression.json b/TrailAnalyzer.mlproj/Model Containers/Linear Regression.json new file mode 100644 index 0000000..25d5393 --- /dev/null +++ b/TrailAnalyzer.mlproj/Model Containers/Linear Regression.json @@ -0,0 +1,378 @@ +{ + "activityEntities" : [ + "trainingFinished", + [ + { + "createdDate" : "2026-05-07T22:26:10Z", + "event" : "trainingFinished", + "id" : "E76964C7-F780-4B15-87DA-FFA418EF3FA0", + "subtitle" : "10 iterations", + "title" : "Training Completed" + } + ], + "evaluationStarted", + [ + { + "createdDate" : "2026-05-07T22:26:12Z", + "event" : "evaluationStarted", + "id" : "C1F5FF32-34F5-4A01-BD67-3A0B62F6EC79", + "subtitle" : "Linear Regression", + "title" : "Testing Started" + } + ], + "trainingStarted", + [ + { + "createdDate" : "2026-05-07T22:26:10Z", + "event" : "trainingStarted", + "id" : "E1102F75-8761-48C8-9018-B48E492287BD", + "subtitle" : "10 iterations", + "title" : "Training Started" + } + ], + "experimentCreated", + [ + { + "createdDate" : "2026-05-07T22:25:29Z", + "event" : "experimentCreated", + "id" : "AA745F19-F1FF-4449-A966-C556E53A4D6F", + "subtitle" : "Linear Regression", + "title" : "Model Source Created" + } + ], + "evaluationFinished", + [ + { + "createdDate" : "2026-05-07T22:26:12Z", + "event" : "evaluationFinished", + "id" : "A0F056C3-F737-4876-92B2-77C4F3F4C6C8", + "subtitle" : "Linear Regression", + "title" : "Testing Completed" + } + ], + "trainingDataAdded", + [ + { + "createdDate" : "2026-05-07T22:25:29Z", + "event" : "trainingDataAdded", + "id" : "3C7B8BE5-2F7F-49DE-B7DC-0AD7E44D5378", + "subtitle" : "Trail10k.csv", + "title" : "Training Data Added" + } + ], + "evaluationDataAdded", + [ + { + "createdDate" : "2026-05-07T22:25:29Z", + "event" : "evaluationDataAdded", + "id" : "C1DB8321-1935-4F74-8CA8-BDF6A72CA430", + "subtitle" : "Trail1k.csv", + "title" : "Testing Data Added" + } + ] + ], + "contentDataResult" : { + "createdDate" : "2026-05-07T22:20:21Z" + }, + "createdDate" : "2026-05-07T22:25:29Z", + "evaluationContainerEntity" : { + "createdDate" : "2026-05-07T22:26:12Z", + "evaluationEntities" : [ + + ], + "id" : "681a9918-defb-4e35-8f21-05c81e42894e", + "modifiedDate" : "2026-05-07T22:26:12Z", + "previewType" : "tabularRegressor", + "testingEvaluationEntity" : { + "accuracy" : 0.23701790164098321, + "analysedDataType" : "datasource", + "createdDate" : "2026-05-07T22:25:29Z", + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3", + "0, 0, 0, 0, 0, 0, 0, 300, 300, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300", + "paved, sandy, sandy, sandy, sandy, sandy, sandy, paved, paved, paved, sandy, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved, paved, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:25:29Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 1000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 583, + "minimum" : 1, + "sampleCount" : 1000 + } + }, + "dataSourceID" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail1k.csv", + "itemsCount" : 1000 + }, + "dataSourceID" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 0.3500226995823841, + "rootMeanSquaredError" : 0.23701790164098321 + } + }, + "finishTime" : "2026-05-07T22:26:12Z", + "id" : "5c097f97-ad03-4f44-863e-8fbf78f7b038", + "startTime" : "2026-05-07T22:26:12Z" + }, + "trainingEvaluationEntity" : { + "analysedDataType" : "none", + "createdDate" : "2026-05-07T22:25:29Z", + "dataResult" : { + "createdDate" : "2026-05-07T22:25:29Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 10000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 600, + "minimum" : 1, + "sampleCount" : 10000 + } + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "itemsCount" : 10000 + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 0.3500226995823841, + "rootMeanSquaredError" : 0.23671106527357838 + } + }, + "id" : "5c42707c-17c2-43cd-ae79-a1888eb47612" + }, + "validationEvaluationEntity" : { + "analysedDataType" : "auto", + "createdDate" : "2026-05-07T22:25:29Z", + "dataResult" : { + "createdDate" : "2026-05-07T22:25:29Z" + }, + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 0.34999077564713055, + "rootMeanSquaredError" : 0.23486468893378737 + } + }, + "id" : "6c93bb7c-c2f7-4c88-ad54-6a7d5ae8e110" + } + }, + "evaluationEntity" : { + "analysedDataType" : "none", + "dataResult" : { + + }, + "id" : "7f58b9e3-8282-48a1-8677-ba4bee7e3e64" + }, + "evaluationState" : "evaluated", + "id" : "8480E385-98C6-4A9D-BC9D-B65084B166EE", + "modelEntity" : { + "createdDate" : "2026-05-07T22:25:29Z", + "experimentID" : "9F40C907-95FE-4F00-A020-D608CCEC2D45", + "id" : "F52C5A81-A3F9-4FE6-AB6F-DD092E774C0B", + "modelURL" : "Models/Linear%20Regression.mlmodel", + "modifiedDate" : "2026-05-07T22:25:29Z", + "title" : "", + "version" : "1.0" + }, + "modifiedDate" : "2026-05-07T22:26:12Z", + "preferredFilename" : "Linear Regression", + "settingEntity" : { + "algorithmType" : "maxEnt", + "augmentations" : [ + + ], + "featureNames" : [ + "distance", + "elevation", + "terrain", + "dangerous" + ], + "generalRegressorType" : { + "linearRegression" : { + "convergenceThreshold" : 0.01, + "featureScaling" : true, + "l1Penalty" : 0, + "l2Penalty" : 0.01, + "stepSize" : 1 + } + }, + "handActionClassifierAugmentations" : [ + + ], + "handPoseClassifierAugmentations" : [ + + ], + "harVideoAugmentations" : 0, + "iterationCount" : 10, + "seedType" : "default", + "styleTransferAlgorithmType" : "image", + "suggestedColumnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "suggestedColumnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1" + ], + "suggestedColumns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "targetColumn" : "risk", + "taskType" : "generalRegresor", + "transferLearningEmbeddingType" : "dynamic" + }, + "snapshotRole" : { + "withoutSnapshots" : 0 + }, + "state" : "trained", + "title" : "TrailAnalyzer Automatic copy", + "trainingEntity" : { + "analysedDataType" : "datasource", + "checkpointMetrics" : { + + }, + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:25:29Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 10000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 600, + "minimum" : 1, + "sampleCount" : 10000 + } + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "itemsCount" : 10000 + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "featureExtractionCheckpointMayBeAvailable" : false, + "finishTime" : "2026-05-07T22:26:10Z", + "progress" : [ + + ], + "snapshottableCheckpoints" : { + + }, + "startTime" : "2026-05-07T22:26:10Z", + "trainingAccuracy" : 0.23671106527357838, + "trainingResults" : { + "generalRegressor" : { + "maximumError" : 0.3500226995823841, + "rootMeanSquaredError" : 0.23671106527357838 + } + }, + "validationAccuracy" : 0.23486468893378737, + "validationResults" : { + "generalRegressor" : { + "maximumError" : 0.34999077564713055, + "rootMeanSquaredError" : 0.23486468893378737 + } + } + }, + "validationEntity" : { + "analysedDataType" : "auto", + "dataResult" : { + "createdDate" : "2026-05-07T22:25:29Z" + }, + "splitOptions" : { + "strategy" : { + "automatic" : { + + } + } + } + }, + "version" : "1.0" +} \ No newline at end of file diff --git a/TrailAnalyzer.mlproj/Model Containers/TrailAnalyzer 1.json b/TrailAnalyzer.mlproj/Model Containers/TrailAnalyzer 1.json new file mode 100644 index 0000000..71bea37 --- /dev/null +++ b/TrailAnalyzer.mlproj/Model Containers/TrailAnalyzer 1.json @@ -0,0 +1,373 @@ +{ + "activityEntities" : [ + "trainingStarted", + [ + { + "createdDate" : "2026-05-07T22:21:05Z", + "event" : "trainingStarted", + "id" : "CBEF3060-BF6F-4A6F-B245-52CB21581B25", + "subtitle" : "TrailAnalyzer 1", + "title" : "Training Started" + } + ], + "evaluationDataAdded", + [ + { + "createdDate" : "2026-05-07T22:20:47Z", + "event" : "evaluationDataAdded", + "id" : "77285AFB-0C48-4783-9EE6-1572435C0E2F", + "subtitle" : "Trail1k.csv", + "title" : "Testing Data Added" + } + ], + "evaluationFinished", + [ + { + "createdDate" : "2026-05-07T22:21:07Z", + "event" : "evaluationFinished", + "id" : "72272820-819B-4BD2-93E8-49814E0DE80F", + "subtitle" : "TrailAnalyzer 1", + "title" : "Testing Completed" + } + ], + "experimentCreated", + [ + { + "createdDate" : "2026-05-07T22:20:15Z", + "event" : "experimentCreated", + "id" : "B3734A99-32BF-4317-87B6-E75C85942E40", + "subtitle" : "TrailAnalyzer 1", + "title" : "Model Source Created" + } + ], + "trainingDataAdded", + [ + { + "createdDate" : "2026-05-07T22:20:21Z", + "event" : "trainingDataAdded", + "id" : "B4DD2012-64F1-4CBB-895C-B28AA72552C5", + "subtitle" : "Trail10k.csv", + "title" : "Training Data Added" + } + ], + "evaluationStarted", + [ + { + "createdDate" : "2026-05-07T22:21:07Z", + "event" : "evaluationStarted", + "id" : "6A44E043-8D2E-4AF3-89CB-6A0D604F701B", + "subtitle" : "TrailAnalyzer 1", + "title" : "Testing Started" + } + ], + "trainingFinished", + [ + { + "createdDate" : "2026-05-07T22:21:05Z", + "event" : "trainingFinished", + "id" : "D8B65670-5201-464B-BAD4-34683D620154", + "subtitle" : "TrailAnalyzer 1", + "title" : "Training Completed" + } + ] + ], + "contentDataResult" : { + "createdDate" : "2026-05-07T22:20:21Z" + }, + "createdDate" : "2026-05-07T22:20:15Z", + "evaluationContainerEntity" : { + "createdDate" : "2026-05-07T22:21:07Z", + "evaluationEntities" : [ + + ], + "id" : "7f3d5482-170a-47f7-a968-db695b0ee66e", + "modifiedDate" : "2026-05-07T22:21:07Z", + "previewType" : "tabularRegressor", + "testingEvaluationEntity" : { + "accuracy" : 0.23699348720638086, + "analysedDataType" : "datasource", + "createdDate" : "2026-05-07T22:20:15Z", + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3", + "0, 0, 0, 0, 0, 0, 0, 300, 300, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300", + "paved, sandy, sandy, sandy, sandy, sandy, sandy, paved, paved, paved, sandy, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved, paved, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:20:21Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 1000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 583, + "minimum" : 1, + "sampleCount" : 1000 + } + }, + "dataSourceID" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail1k.csv", + "itemsCount" : 1000 + }, + "dataSourceID" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 0.35182829925262205, + "rootMeanSquaredError" : 0.23699348720638086 + } + }, + "finishTime" : "2026-05-07T22:21:07Z", + "id" : "9dae486c-710b-415b-b161-ab03d440cc4a", + "startTime" : "2026-05-07T22:21:07Z" + }, + "trainingEvaluationEntity" : { + "analysedDataType" : "none", + "createdDate" : "2026-05-07T22:20:15Z", + "dataResult" : { + "createdDate" : "2026-05-07T22:20:21Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 10000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 600, + "minimum" : 1, + "sampleCount" : 10000 + } + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "itemsCount" : 10000 + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 0.3518282992526238, + "rootMeanSquaredError" : 0.2362619243566177 + } + }, + "id" : "8f8224fd-8459-4bdd-a8a8-26e5501ec69a" + }, + "validationEvaluationEntity" : { + "analysedDataType" : "auto", + "createdDate" : "2026-05-07T22:20:15Z", + "dataResult" : { + "createdDate" : "2026-05-07T22:20:21Z" + }, + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 0.3518282992526238, + "rootMeanSquaredError" : 0.23990746906381377 + } + }, + "id" : "b6e35c37-c3ec-4e1d-b2da-97d99c568465" + } + }, + "evaluationEntity" : { + "analysedDataType" : "none", + "dataResult" : { + + }, + "id" : "11a47ea1-66a6-46ee-9baa-5b891f48b212" + }, + "evaluationState" : "evaluated", + "id" : "710EF732-51F2-4509-AF39-AA476D162125", + "modelEntity" : { + "createdDate" : "2026-05-07T22:20:15Z", + "experimentID" : "710EF732-51F2-4509-AF39-AA476D162125", + "id" : "1BCB8DA2-2C55-4219-A6DB-E37CF720A55F", + "modelURL" : "Models/TrailAnalyzer%201.mlmodel", + "modifiedDate" : "2026-05-07T22:20:15Z", + "title" : "", + "version" : "1.0" + }, + "modifiedDate" : "2026-05-07T22:21:07Z", + "preferredFilename" : "TrailAnalyzer 1", + "settingEntity" : { + "algorithmType" : "maxEnt", + "augmentations" : [ + + ], + "featureNames" : [ + "distance", + "elevation", + "terrain", + "dangerous" + ], + "generalRegressorType" : { + "auto" : { + + } + }, + "handActionClassifierAugmentations" : [ + + ], + "handPoseClassifierAugmentations" : [ + + ], + "harVideoAugmentations" : 0, + "seedType" : "default", + "styleTransferAlgorithmType" : "image", + "suggestedColumnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "suggestedColumnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1" + ], + "suggestedColumns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "targetColumn" : "risk", + "taskType" : "generalRegresor", + "transferLearningEmbeddingType" : "dynamic" + }, + "snapshotRole" : { + "withoutSnapshots" : 0 + }, + "state" : "trained", + "title" : "TrailAnalyzer 1", + "trainingEntity" : { + "analysedDataType" : "datasource", + "checkpointMetrics" : { + + }, + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:20:21Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 10000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 600, + "minimum" : 1, + "sampleCount" : 10000 + } + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "itemsCount" : 10000 + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "featureExtractionCheckpointMayBeAvailable" : false, + "finishTime" : "2026-05-07T22:21:05Z", + "progress" : [ + + ], + "snapshottableCheckpoints" : { + + }, + "startTime" : "2026-05-07T22:21:05Z", + "trainingAccuracy" : 0.2362619243566177, + "trainingResults" : { + "generalRegressor" : { + "maximumError" : 0.3518282992526238, + "rootMeanSquaredError" : 0.2362619243566177 + } + }, + "validationAccuracy" : 0.23990746906381377, + "validationResults" : { + "generalRegressor" : { + "maximumError" : 0.3518282992526238, + "rootMeanSquaredError" : 0.23990746906381377 + } + } + }, + "validationEntity" : { + "analysedDataType" : "auto", + "dataResult" : { + "createdDate" : "2026-05-07T22:20:21Z" + }, + "splitOptions" : { + "strategy" : { + "automatic" : { + + } + } + } + }, + "version" : "1.0" +} \ No newline at end of file diff --git a/TrailAnalyzer.mlproj/Model Containers/TrailAnalyzer Automatic.json b/TrailAnalyzer.mlproj/Model Containers/TrailAnalyzer Automatic.json new file mode 100644 index 0000000..cc7a99b --- /dev/null +++ b/TrailAnalyzer.mlproj/Model Containers/TrailAnalyzer Automatic.json @@ -0,0 +1,375 @@ +{ + "activityEntities" : [ + "trainingDataAdded", + [ + { + "createdDate" : "2026-05-07T22:21:31Z", + "event" : "trainingDataAdded", + "id" : "E32CD4FE-9800-4767-B66D-085680F88868", + "subtitle" : "Trail10k.csv", + "title" : "Training Data Added" + } + ], + "evaluationDataAdded", + [ + { + "createdDate" : "2026-05-07T22:21:31Z", + "event" : "evaluationDataAdded", + "id" : "0889CCCD-307F-47F1-9794-E2BB3861FD68", + "subtitle" : "Trail1k.csv", + "title" : "Testing Data Added" + } + ], + "experimentCreated", + [ + { + "createdDate" : "2026-05-07T22:21:31Z", + "event" : "experimentCreated", + "id" : "A5149D7F-D94C-43D3-ABCB-D5CE1F0DDCB7", + "subtitle" : "TrailAnalyzer Automatic", + "title" : "Model Source Created" + } + ], + "trainingFinished", + [ + { + "createdDate" : "2026-05-07T22:25:03Z", + "event" : "trainingFinished", + "id" : "A09A87A5-04F4-4C58-8A2D-BB046CE6EC43", + "subtitle" : "TrailAnalyzer Automatic", + "title" : "Training Completed" + } + ], + "evaluationStarted", + [ + { + "createdDate" : "2026-05-07T22:25:05Z", + "event" : "evaluationStarted", + "id" : "6FAB6488-FB4A-4021-800D-BAC6A927C3CB", + "subtitle" : "TrailAnalyzer Automatic", + "title" : "Testing Started" + } + ], + "trainingStarted", + [ + { + "createdDate" : "2026-05-07T22:25:03Z", + "event" : "trainingStarted", + "id" : "179A4D43-BD78-4B42-9A7C-06D6832B7999", + "subtitle" : "TrailAnalyzer Automatic", + "title" : "Training Started" + } + ], + "evaluationFinished", + [ + { + "createdDate" : "2026-05-07T22:25:05Z", + "event" : "evaluationFinished", + "id" : "9108A00D-B6D0-4CF3-BC09-96F6D1FDCEF7", + "subtitle" : "TrailAnalyzer Automatic", + "title" : "Testing Completed" + } + ] + ], + "contentDataResult" : { + "createdDate" : "2026-05-07T22:20:21Z" + }, + "createdDate" : "2026-05-07T22:21:31Z", + "evaluationContainerEntity" : { + "createdDate" : "2026-05-07T22:25:05Z", + "evaluationEntities" : [ + + ], + "id" : "9530597c-7eaf-4943-bed7-68ae73fbb308", + "modifiedDate" : "2026-05-07T22:25:05Z", + "previewType" : "tabularRegressor", + "testingEvaluationEntity" : { + "accuracy" : 13.87634361639416, + "analysedDataType" : "datasource", + "createdDate" : "2026-05-07T22:21:31Z", + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3", + "0, 0, 0, 0, 0, 0, 0, 300, 300, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 300", + "paved, sandy, sandy, sandy, sandy, sandy, sandy, paved, paved, paved, sandy, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved, paved, paved, paved, paved, paved, sandy, sandy, sandy, sandy, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:21:31Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 1000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 583, + "minimum" : 1, + "sampleCount" : 1000 + } + }, + "dataSourceID" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail1k.csv", + "itemsCount" : 1000 + }, + "dataSourceID" : "2C30392F-6D13-47ED-9908-36DFC2CC4289", + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 78.17413330078125, + "rootMeanSquaredError" : 13.87634361639416 + } + }, + "finishTime" : "2026-05-07T22:25:05Z", + "id" : "51c394ac-d8b7-4bfd-9426-81aea03ce981", + "startTime" : "2026-05-07T22:25:05Z" + }, + "trainingEvaluationEntity" : { + "analysedDataType" : "none", + "createdDate" : "2026-05-07T22:21:31Z", + "dataResult" : { + "createdDate" : "2026-05-07T22:21:31Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 10000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 600, + "minimum" : 1, + "sampleCount" : 10000 + } + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "itemsCount" : 10000 + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 80.17413330078125, + "rootMeanSquaredError" : 13.991879974993964 + } + }, + "id" : "fea3abbe-e67a-4762-b51d-3eef0d512bdb" + }, + "validationEvaluationEntity" : { + "analysedDataType" : "auto", + "createdDate" : "2026-05-07T22:21:31Z", + "dataResult" : { + "createdDate" : "2026-05-07T22:21:31Z" + }, + "evaluationResult" : { + "generalRegressor" : { + "maximumError" : 69.845703125, + "rootMeanSquaredError" : 13.799163060681613 + } + }, + "id" : "75701349-dd85-4986-8060-b4a8e02e9c86" + } + }, + "evaluationEntity" : { + "analysedDataType" : "none", + "dataResult" : { + + }, + "id" : "fdf93d89-828c-471a-a253-a5e386bc1e42" + }, + "evaluationState" : "evaluated", + "id" : "B70C28C1-DE87-410F-BFAD-60CC4C74235D", + "modelEntity" : { + "createdDate" : "2026-05-07T22:21:31Z", + "experimentID" : "7E8F3F76-DDF9-45AD-AA9F-230004EA3F95", + "id" : "4D69439D-2D14-425B-B43D-26536B0F2205", + "modelURL" : "Models/TrailAnalyzer%20Automatic.mlmodel", + "modifiedDate" : "2026-05-07T22:21:31Z", + "title" : "", + "version" : "1.0" + }, + "modifiedDate" : "2026-05-07T22:25:05Z", + "preferredFilename" : "TrailAnalyzer Automatic", + "settingEntity" : { + "algorithmType" : "maxEnt", + "augmentations" : [ + + ], + "featureNames" : [ + "distance", + "elevation", + "terrain", + "dangerous" + ], + "generalRegressorType" : { + "decisionTree" : { + "maxDepth" : 6, + "minChildWeight" : 0.1, + "minLossReduction" : 0 + } + }, + "handActionClassifierAugmentations" : [ + + ], + "handPoseClassifierAugmentations" : [ + + ], + "harVideoAugmentations" : 0, + "seedType" : "default", + "styleTransferAlgorithmType" : "image", + "suggestedColumnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "suggestedColumnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1" + ], + "suggestedColumns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "targetColumn" : "risk", + "taskType" : "generalRegresor", + "transferLearningEmbeddingType" : "dynamic" + }, + "snapshotRole" : { + "withoutSnapshots" : 0 + }, + "state" : "trained", + "title" : "TrailAnalyzer 1 copy", + "trainingEntity" : { + "analysedDataType" : "datasource", + "checkpointMetrics" : { + + }, + "dataResult" : { + "columnTypes" : [ + "Int", + "Int", + "String", + "Int", + "Int" + ], + "columnValues" : [ + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved, paved", + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", + "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1" + ], + "columns" : [ + "distance", + "elevation", + "terrain", + "dangerous", + "risk" + ], + "createdDate" : "2026-05-07T22:21:31Z", + "dataAnalysis" : { + "classifierAnalysis" : { + + }, + "issues" : [ + { + "description" : "Data has 10000 rows", + "severity" : "info" + } + ], + "objectDetectorAnalysis" : { + "details" : { + + } + }, + "summary" : { + "canUseValidation" : 1, + "maximum" : 600, + "minimum" : 1, + "sampleCount" : 10000 + } + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "dataURL" : "file:///Users/tity/Downloads/TrailData/Trail10k.csv", + "itemsCount" : 10000 + }, + "dataSourceID" : "33711C75-A97A-46BB-A0A3-12153CE5D6AE", + "featureExtractionCheckpointMayBeAvailable" : false, + "finishTime" : "2026-05-07T22:25:03Z", + "progress" : [ + + ], + "snapshottableCheckpoints" : { + + }, + "startTime" : "2026-05-07T22:25:03Z", + "trainingAccuracy" : 13.991879974993964, + "trainingResults" : { + "generalRegressor" : { + "maximumError" : 80.17413330078125, + "rootMeanSquaredError" : 13.991879974993964 + } + }, + "validationAccuracy" : 13.799163060681613, + "validationResults" : { + "generalRegressor" : { + "maximumError" : 69.845703125, + "rootMeanSquaredError" : 13.799163060681613 + } + } + }, + "validationEntity" : { + "analysedDataType" : "auto", + "dataResult" : { + "createdDate" : "2026-05-07T22:21:31Z" + }, + "splitOptions" : { + "strategy" : { + "automatic" : { + + } + } + } + }, + "version" : "1.0" +} \ No newline at end of file diff --git a/TrailAnalyzer.mlproj/Models/Linear Regression.mlmodel b/TrailAnalyzer.mlproj/Models/Linear Regression.mlmodel new file mode 100644 index 0000000..d5f5b6f Binary files /dev/null and b/TrailAnalyzer.mlproj/Models/Linear Regression.mlmodel differ diff --git a/TrailAnalyzer.mlproj/Models/TrailAnalyzer 1.mlmodel b/TrailAnalyzer.mlproj/Models/TrailAnalyzer 1.mlmodel new file mode 100644 index 0000000..ed5caec Binary files /dev/null and b/TrailAnalyzer.mlproj/Models/TrailAnalyzer 1.mlmodel differ diff --git a/TrailAnalyzer.mlproj/Models/TrailAnalyzer Automatic.mlmodel b/TrailAnalyzer.mlproj/Models/TrailAnalyzer Automatic.mlmodel new file mode 100644 index 0000000..8705c89 Binary files /dev/null and b/TrailAnalyzer.mlproj/Models/TrailAnalyzer Automatic.mlmodel differ diff --git a/TrailAnalyzer.mlproj/Project.json b/TrailAnalyzer.mlproj/Project.json new file mode 100644 index 0000000..5db8f90 --- /dev/null +++ b/TrailAnalyzer.mlproj/Project.json @@ -0,0 +1,29 @@ +{ + "activityEntities" : [ + "projectCreated", + [ + { + "createdDate" : "2026-05-07T22:20:15Z", + "event" : "projectCreated", + "id" : "62EB8969-9394-4105-B42E-E4B05790BF17", + "subtitle" : "TrailAnalyzer", + "title" : "Project Created" + } + ] + ], + "authorName" : "ayane", + "createdDate" : "2026-05-07T22:20:15Z", + "description" : "", + "id" : "1B98E135-DF44-44E6-9666-D2BA3ED680DF", + "license" : "", + "location" : "", + "modifiedDate" : "2026-05-07T22:20:15Z", + "projectName" : "TrailAnalyzer", + "settingsEntity" : { + "snapshotOnExtendTraining" : true, + "snapshotOnResumeTraining" : false + }, + "taskType" : "generalRegresor", + "title" : "Tabular Regression", + "version" : "1.1" +} \ No newline at end of file diff --git a/TrailAnalyzer/TrailAnalyzer.xcodeproj/project.pbxproj b/TrailAnalyzer/TrailAnalyzer.xcodeproj/project.pbxproj new file mode 100644 index 0000000..49fa8dc --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer.xcodeproj/project.pbxproj @@ -0,0 +1,333 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXFileReference section */ + 5296D5412FAD4A5800F7CF70 /* TrailAnalyzer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TrailAnalyzer.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 5296D5432FAD4A5800F7CF70 /* TrailAnalyzer */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = TrailAnalyzer; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5296D53E2FAD4A5800F7CF70 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5296D5382FAD4A5800F7CF70 = { + isa = PBXGroup; + children = ( + 5296D5432FAD4A5800F7CF70 /* TrailAnalyzer */, + 5296D5422FAD4A5800F7CF70 /* Products */, + ); + sourceTree = ""; + }; + 5296D5422FAD4A5800F7CF70 /* Products */ = { + isa = PBXGroup; + children = ( + 5296D5412FAD4A5800F7CF70 /* TrailAnalyzer.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5296D5402FAD4A5800F7CF70 /* TrailAnalyzer */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5296D54C2FAD4A5900F7CF70 /* Build configuration list for PBXNativeTarget "TrailAnalyzer" */; + buildPhases = ( + 5296D53D2FAD4A5800F7CF70 /* Sources */, + 5296D53E2FAD4A5800F7CF70 /* Frameworks */, + 5296D53F2FAD4A5800F7CF70 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 5296D5432FAD4A5800F7CF70 /* TrailAnalyzer */, + ); + name = TrailAnalyzer; + packageProductDependencies = ( + ); + productName = TrailAnalyzer; + productReference = 5296D5412FAD4A5800F7CF70 /* TrailAnalyzer.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5296D5392FAD4A5800F7CF70 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 2640; + LastUpgradeCheck = 2640; + TargetAttributes = { + 5296D5402FAD4A5800F7CF70 = { + CreatedOnToolsVersion = 26.4.1; + }; + }; + }; + buildConfigurationList = 5296D53C2FAD4A5800F7CF70 /* Build configuration list for PBXProject "TrailAnalyzer" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 5296D5382FAD4A5800F7CF70; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 5296D5422FAD4A5800F7CF70 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5296D5402FAD4A5800F7CF70 /* TrailAnalyzer */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5296D53F2FAD4A5800F7CF70 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5296D53D2FAD4A5800F7CF70 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 5296D54A2FAD4A5900F7CF70 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 26.4; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 5296D54B2FAD4A5900F7CF70 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 26.4; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5296D54D2FAD4A5900F7CF70 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.ayanentity.TrailAnalyzer; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 5296D54E2FAD4A5900F7CF70 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.ayanentity.TrailAnalyzer; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5296D53C2FAD4A5800F7CF70 /* Build configuration list for PBXProject "TrailAnalyzer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5296D54A2FAD4A5900F7CF70 /* Debug */, + 5296D54B2FAD4A5900F7CF70 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5296D54C2FAD4A5900F7CF70 /* Build configuration list for PBXNativeTarget "TrailAnalyzer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5296D54D2FAD4A5900F7CF70 /* Debug */, + 5296D54E2FAD4A5900F7CF70 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 5296D5392FAD4A5800F7CF70 /* Project object */; +} diff --git a/TrailAnalyzer/TrailAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TrailAnalyzer/TrailAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TrailAnalyzer/TrailAnalyzer.xcodeproj/xcuserdata/tity.xcuserdatad/xcschemes/xcschememanagement.plist b/TrailAnalyzer/TrailAnalyzer.xcodeproj/xcuserdata/tity.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..7fa85b3 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer.xcodeproj/xcuserdata/tity.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + TrailAnalyzer.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/AccentColor.colorset/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/AppIcon.appiconset/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Background.imageset/Background@2x.png b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Background.imageset/Background@2x.png new file mode 100644 index 0000000..97a09f3 Binary files /dev/null and b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Background.imageset/Background@2x.png differ diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Background.imageset/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Background.imageset/Contents.json new file mode 100644 index 0000000..4f3612e --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Background@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Difficult.imageset/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Difficult.imageset/Contents.json new file mode 100644 index 0000000..678a12e --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Difficult.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Difficult@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Difficult.imageset/Difficult@2x.png b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Difficult.imageset/Difficult@2x.png new file mode 100644 index 0000000..a44f708 Binary files /dev/null and b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Difficult.imageset/Difficult@2x.png differ diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Easy.imageset/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Easy.imageset/Contents.json new file mode 100644 index 0000000..6ccd283 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Easy.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Easy@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Easy.imageset/Easy@2x.png b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Easy.imageset/Easy@2x.png new file mode 100644 index 0000000..8de6d8e Binary files /dev/null and b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Easy.imageset/Easy@2x.png differ diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/High Risk.imageset/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/High Risk.imageset/Contents.json new file mode 100644 index 0000000..b7fef3b --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/High Risk.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "High Risk@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/High Risk.imageset/High Risk@2x.png b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/High Risk.imageset/High Risk@2x.png new file mode 100644 index 0000000..2361784 Binary files /dev/null and b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/High Risk.imageset/High Risk@2x.png differ diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Moderate.imageset/Contents.json b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Moderate.imageset/Contents.json new file mode 100644 index 0000000..afa2e0b --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Moderate.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Moderate@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Moderate.imageset/Moderate@2x.png b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Moderate.imageset/Moderate@2x.png new file mode 100644 index 0000000..571d42f Binary files /dev/null and b/TrailAnalyzer/TrailAnalyzer/Assets.xcassets/Moderate.imageset/Moderate@2x.png differ diff --git a/TrailAnalyzer/TrailAnalyzer/Models/Risk.swift b/TrailAnalyzer/TrailAnalyzer/Models/Risk.swift new file mode 100644 index 0000000..e1fa0c6 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Models/Risk.swift @@ -0,0 +1,38 @@ +// +// Risk.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/08. +// +import Foundation + +enum Risk: String, Identifiable, CaseIterable { + case highRisk = "High Risk" // rawValue = "High Risk" + case difficult = "Difficult" // rawValue = "Difficult" + case moderate = "Moderate" // rawValue = "Moderate" + case easy = "Easy" // rawValue = "Easy" + + + var id: String { + rawValue + } + + + var image: String { + rawValue + } + + + var description: String { + switch self { + case .easy: + return "Bring the essentials (water, bug spray, sunscreen) and get ready to enjoy a nice stroll. Be sure to log your hike in your fitness app to keep track of your progress. Have your camera ready to capture the great views and good times!" + case .moderate: + return "As with any hike, make sure you bring plenty of water, sunscreen, bug spray, and snacks. Plan for some breaks along the way to keep your energy up, and check your health and fitness apps to monitor your heart rate and energy levels. You got this!" + case .difficult: + return "This hike is challenging! Make sure you prepare with the right gear and supplies and turn on location sharing with a trusted friend. " + case .highRisk: + return "This hike may push you beyond your limits. Maybe try a more moderate hike and work your way up to this." + } + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Models/Terrain.swift b/TrailAnalyzer/TrailAnalyzer/Models/Terrain.swift new file mode 100644 index 0000000..4c6091f --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Models/Terrain.swift @@ -0,0 +1,20 @@ +// +// Terrain.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/09. +// +import Foundation + + +enum Terrain: String, Identifiable, CaseIterable { + case paved + case dirt + case rocky + case sandy + + + var id: String { + rawValue + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Models/TrailAnalyzer.swift b/TrailAnalyzer/TrailAnalyzer/Models/TrailAnalyzer.swift new file mode 100644 index 0000000..d4cec31 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Models/TrailAnalyzer.swift @@ -0,0 +1,40 @@ +// +// Untitled.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/08. +// +// enum状態管理と学習データTrailAnalyzerMedelを繋げる処理 + +import Foundation +import CoreML + +struct TrailAnalyzer{ + func predictRisk() -> Risk { + do { + let model = try TrailAnalyzerModel(configuration: MLModelConfiguration()) //自動でTrailAnalyzerModel クラスが生成される + + let input = TrailAnalyzerModelInput( //サンプルを入れる + distance: 1, + elevation: 0, + terrain: "paved", + dangerous: 0 + ) + let predictedRisk = try model.prediction(input: input).risk //入力値からリスクを予測 + + switch predictedRisk { //値別に + case 0..<20: + return .easy + case 20..<50: + return .moderate + case 50..<100: + return .difficult + default: + return .highRisk + } + + } catch { + return .highRisk //もしリスクを予測できない場合(その他のエラー時)は、ハイリスクを返すように + } + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/Models/TrailAnalyzerModel.mlmodel b/TrailAnalyzer/TrailAnalyzer/Models/TrailAnalyzerModel.mlmodel new file mode 100644 index 0000000..ed5caec Binary files /dev/null and b/TrailAnalyzer/TrailAnalyzer/Models/TrailAnalyzerModel.mlmodel differ diff --git a/TrailAnalyzer/TrailAnalyzer/Models/TrailInfo.swift b/TrailAnalyzer/TrailAnalyzer/Models/TrailInfo.swift new file mode 100644 index 0000000..9b1ce60 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/Models/TrailInfo.swift @@ -0,0 +1,23 @@ +// +// TrailInfo.swift.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/09. +// + +import Foundation + +struct TrailInfo { + var distance: Int? + var elevation: Int? + var terrain: Terrain? + var wildlifeDangerLevel: Int = lowDanger + + + static let lowDanger = 0 + static let highDanger = 1 + + + static var empty = TrailInfo() + static var sample = TrailInfo(distance: 20, elevation: 200, terrain: .dirt, wildlifeDangerLevel: highDanger) +} diff --git a/TrailAnalyzer/TrailAnalyzer/TrailAnalyzerApp.swift b/TrailAnalyzer/TrailAnalyzer/TrailAnalyzerApp.swift new file mode 100644 index 0000000..0ffb451 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/TrailAnalyzerApp.swift @@ -0,0 +1,17 @@ +// +// TrailAnalyzerApp.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/08. +// + +import SwiftUI + +@main +struct TrailAnalyzerApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/TrailAnalyzer/TrailAnalyzer/View/ContentView.swift b/TrailAnalyzer/TrailAnalyzer/View/ContentView.swift new file mode 100644 index 0000000..98e22e6 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/View/ContentView.swift @@ -0,0 +1,24 @@ +// +// ContentView.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/08. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundStyle(.tint) + Text("Hello, world!") + } + .padding() + } +} + +#Preview { + ContentView() +} diff --git a/TrailAnalyzer/TrailAnalyzer/View/RiskCardView.swift b/TrailAnalyzer/TrailAnalyzer/View/RiskCardView.swift new file mode 100644 index 0000000..bd8b7c3 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/View/RiskCardView.swift @@ -0,0 +1,32 @@ +// +// RiskCard.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/08. +// +import SwiftUI + +struct RiskCardView: View { + @State var risk: Risk + + var body: some View { + VStack(alignment: .leading){ + HStack{ + Image(risk.image) + .resizable() + .frame(width: 30, height: 30) + Text(risk.id) + .font(.title2) + } + Text(risk.description) + .frame(maxWidth: .infinity, alignment: .leading) + } + .padding(16) + .background(.white, in: RoundedRectangle(cornerRadius: 32)) + } +} + +#Preview { + let prediction = TrailAnalyzer().predictRisk() + RiskCardView(risk: prediction) +} diff --git a/TrailAnalyzer/TrailAnalyzer/View/TrailField.swift b/TrailAnalyzer/TrailAnalyzer/View/TrailField.swift new file mode 100644 index 0000000..3bdb2cd --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/View/TrailField.swift @@ -0,0 +1,39 @@ +// +// TrailField.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/09. +// +import SwiftUI + + +struct TrailField: View { + var iconName: String + var label: String + @ViewBuilder var content: Content + + + var body: some View { + HStack { + Image(systemName: iconName) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 40, height: 40) + .padding(.trailing, 8) + Text(label) + Spacer() + content + } + .padding(.vertical, 24) + .padding(.horizontal, 16) + .background(.white, in: RoundedRectangle(cornerRadius: 12)) + } +} + + +#Preview { + TrailField(iconName: "figure.hiking", label: "Label") { + Text("Content") + } + .trailTheme() +} diff --git a/TrailAnalyzer/TrailAnalyzer/View/TrailInfoView.swift b/TrailAnalyzer/TrailAnalyzer/View/TrailInfoView.swift new file mode 100644 index 0000000..d5cb644 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/View/TrailInfoView.swift @@ -0,0 +1,64 @@ +// +// TrailInfoView.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/09. +// +import SwiftUI + + +struct TrailInfoView: View { + @Binding var trailInfo: TrailInfo + + + var body: some View { + VStack { + TrailField(iconName: "figure.hiking", label: "Distance") { + TextField("kilometers", value: $trailInfo.distance, format: .number) + .keyboardType(.numberPad) + .multilineTextAlignment(.trailing) + } + + + TrailField(iconName: "mountain.2.fill", label: "Elevation Change") { + TextField("meters", value: $trailInfo.elevation, format: .number) + .keyboardType(.numberPad) + .multilineTextAlignment(.trailing) + } + + + TrailField(iconName: "shoe.fill", label: "Terrain") { + Picker("Terrain", selection: $trailInfo.terrain) { + ForEach(Terrain.allCases) { terrain in + Text(terrain.rawValue.capitalized) + .tag(terrain) + } + } + .tint(Color.black) + .background(RoundedRectangle(cornerRadius: 12) + .fill(Color.gray.opacity(0.15)) + .opacity(trailInfo.terrain == nil ? 0.0 : 1.0) + ) + } + + + TrailField(iconName: "exclamationmark.triangle.fill", label: "Danger from wildlife") { + Picker("Danger from wildlife", selection: $trailInfo.wildlifeDangerLevel) { + Text("Low") + .tag(TrailInfo.lowDanger) + Text("High") + .tag(TrailInfo.highDanger) + } + .frame(width: 110) + .pickerStyle(.segmented) + } + } + } +} + + +#Preview { + @Previewable @State var trailInfo = TrailInfo.empty + TrailInfoView(trailInfo: $trailInfo) + .trailTheme() +} diff --git a/TrailAnalyzer/TrailAnalyzer/View/TrailTheme.swift b/TrailAnalyzer/TrailAnalyzer/View/TrailTheme.swift new file mode 100644 index 0000000..20fb0a7 --- /dev/null +++ b/TrailAnalyzer/TrailAnalyzer/View/TrailTheme.swift @@ -0,0 +1,39 @@ +// +// TrailTheme.swift +// TrailAnalyzer +// +// Created by 仲里絢音 on 2026/05/09. +// + +import SwiftUI + + +struct TrailTheme: ViewModifier { + func body(content: Content) -> some View { + ZStack { + VStack { + Image("Background") + .resizable() + .aspectRatio(contentMode: .fit) + .ignoresSafeArea() + Spacer() + } + content + .padding(.horizontal) + } + .background(Color(white: 0.94)) + } +} + + +extension View { + func trailTheme() -> some View { + modifier(TrailTheme()) + } +} + + +#Preview { + Text("Hello, World!") + .trailTheme() +} diff --git a/TrailAnalyzerModel.mlmodel b/TrailAnalyzerModel.mlmodel new file mode 100644 index 0000000..ed5caec Binary files /dev/null and b/TrailAnalyzerModel.mlmodel differ