Skip to content

h-ch22/DementiaChecker_iOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation



Dementia Checker

Deep learning-based dementia diagnosis application using intelligence test, sleep, and lifestyle data

β“’ 2024 Changjin Ha. All Rights Reserved.

πŸš€ Tech Stack

Client (iOS & iPadOS)

  • SwiftUI: Declarative UI with full iOS 18 Sidebar & iPadOS multi-column support
  • HealthKit: Extract Apple Watch life-log (activity & sleep) data securely
  • Dependency Management: Pure SPM (Swift Package Manager) - Zero CocoaPods architecture
  • Speech Framework: SFSpeechRecognizer & AVAudioEngine for elderly-friendly verbal MMSE assessments (On-device STT)

Backend (BaaS)

  • Firebase (Auth, Firestore, Storage): Fully integrated via SPM for user data, diary sync, and digital inheritance

AI (On-Device CoreML Multi-Modal)

  • CoreML: 4 On-device models (MMSE, LifeLog, Sleep, Universal)
  • Multi-Modal Inference: Combine cognitive questionnaire data with physical sensor data for composite assessment

External API

  • Naver Maps API: NMaps-based hospital locator for dementia care facilities

πŸ—οΈ Architecture

graph TD
    %% Data Sources
    subgraph DataSources [πŸ“Š Data Sources]
        Survey[MMSE Questionnaire]
        Watch[Apple Watch / HealthKit]
    end

    %% AI Pipeline (Multi-Modal)
    subgraph CoreMLPipeline [🧠 Multi-Modal AI Pipeline]
        ModelMMSE[CoreML: MMSE]
        ModelLife[CoreML: LifeLog]
        ModelSleep[CoreML: Sleep]
        ModelUni[CoreML: Universal Composite]

        Survey --> ModelMMSE
        Watch -->|Activity Data| ModelLife
        Watch -->|Sleep Data| ModelSleep

        ModelMMSE --> ModelUni
        ModelLife --> ModelUni
        ModelSleep --> ModelUni
    end

    %% Client App
    subgraph Client [πŸ“± iOS & iPadOS App]
        UI[SwiftUI / iOS 18 Sidebar]
        Features[Diary, Prevention Puzzles, Inheritance]
        State[State Management]

        ModelUni -->|Composite Assessment| State
        UI <--> State
        Features <--> State
    end

    %% Backend & External
    subgraph Backend [☁️ Firebase & APIs]
        DB[(Firestore)]
        Storage[(Firebase Storage)]
        Auth[Firebase Auth]
        Map[Naver Maps API]
    end

    %% Connections
    State <--> Auth
    State <--> DB
    State <--> Storage
    State --> Map
Loading

🧱 If I were to rebuild it in 2026

Layer Original 2026 Pick Reason
Concurrency Completion handlers + DispatchGroup Swift Concurrency(async/await + actors) Eliminates callback pyramids; HealthKit has async wrappers
CoreML New instance per call lazy var cached models Prevents disk re-load on every assessment
Speech SFSpeechRecognizer (network) SFSpeechRecognizer + requiresOnDeviceRecognition = true HIPAA/GDPR alignment
Crypto CryptoSwift@main CryptoKit First-party, hardware-accelerated
Firebase 10.27.0 12.x Current major, App Check aligned
JSON SwiftJSON Codable Remove dep, standard Swift
MMSE questions Giant switch statements JSON asset + Codable structs Localizble, editable without recompile
HealthKit data God-class with 25 @Published Split DailyHealthSummary + HistoricalHealthData Reduced re-render thrashing

✨ Core Features

Show Contents

Home

Check your latest inspection results, health data at a glance.


Hospital Map

Check the status of nearby dementia hospitals and staff.



And you also can navigate, call, or get so much more information on web.




Inspection

Use your iPhone or iPad to proceed with the MMSE test as it was in reality.








As a result of the MMSE test, the test is completed in a blink of an eye using sleep patterns, life log data, and deep learning.


Check the test results at a glance and share them.




History

Get your all inspection histories



Diary

Once a day, record your day and look back.



Improvements Process

Do you suspect dementia? Proceed with the dementia-improving process!




Guardians

Register a guardian and share your current status.


Heritage manager

Register a heritage manager to remove or inherit any data left on the server since your death.


and so much more.

There are more to come, including account management, tips for preventing dementia, and more.


Compatibility

Dementia Checker is compatible with these devices.

iPhone

iPhone 15 Pro Max
iPhone 15 Pro
iPhone 15 Plus
iPhone 15
iPhone 14 Pro Max
iPhone 14 Pro
iPhone 14 Plus
iPhone 14
iPhone 13 Pro Max
iPhone 13 Pro
iPhone 13
iPhone 13 mini
iPhone 12 Pro Max
iPhone 12 Pro
iPhone 12
iPhone 12 mini
iPhone 11 Pro Max
iPhone 11 Pro
iPhone 11
iPhone Xs Max
iPhone Xs
iPhone XR
iPhone SE (3rd-Generation)
iPhone SE (2nd-Generation)

iPad

iPad Pro 12.9 (6th-Generation)
iPad Pro 11 (4th-Generation)
iPad Pro 12.9 (5th-Generation)
iPad Pro 11 (3rd-Generation)
iPad Pro 12.9 (4th-Generation)
iPad Pro 11 (2nd-Generation)
iPad Pro 12.9 (3rd-Generation)
iPad Pro 11 (1st-Generation)
iPad Pro 12.9 (2nd-Generation)
iPad Pro 10.5
iPad Air (5th-Generation)
iPad Air (4th-Generation)
iPad Air (3rd-Generation)
iPad mini (6th-Generation)
iPad mini (5th-Generation)
iPad (10th-Generation)
iPad (9th-Generation)

  • Required iOS/iPadOS 17.0 or up.
  • 1GB or higher storage required for install application.

About

A Dementia Probability Diagnostic Application Using Deep Learning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages