chore(cleanup): YOLO/CameraX/OCR 세트 완전 제거 (Category B · 사용자 요청)
배경: 소변컵 사진 촬영 → YOLO 검출 → MLKit OCR 눈금 인식 기능 폐기.
현재 미사용. Piezo 방광 측정 flow 만 실사용.
완전 제거 (4 파일 + 1 asset):
· measure/YoloDetector.kt (130 L · ONNX YOLO)
· measure/SimpleMeasureService.kt (287 L · MLKit OCR + 3-zone)
· measure/CCPosition.kt (8 L)
· ui/views/monitoring/UrineCameraScreen.kt (285 L · CameraX 프리뷰)
· assets/urinecup_best.onnx (~10.6 MB · APK 크기 절감)
Gradle deps 삭제 (build.gradle.kts):
· com.microsoft.onnxruntime:onnxruntime-android:1.17.0
· com.google.mlkit:text-recognition:16.0.1
· androidx.camera:camera-{core,camera2,lifecycle,view}:1.3.4
AndroidManifest.xml 삭제:
· CAMERA permission
· android.hardware.camera uses-feature
부분 편집:
· AppState.kt — URINE_CAMERA enum value 삭제
· MainActivity.kt — import + back-handler branch + Crossfade branch 삭제
· PiezoMonitoringView.kt — showUrineCamera state · 카메라 카드 (16L) ·
LaunchedEffect(showUrineCamera) 삭제
· strings.xml × 2 — 카메라 전용 문자열 15개 삭제
(camera_input 은 CatheterizeSheet 사용 중이라 유지)
측정용 VoidingRecord.kt 는 유지 (CatheterizeSheet · VoidingDiaryView 등에서 사용).
okhttp 는 speech/HfVolumeExtractor 에서 사용 중이라 유지.
합계: 약 780 LOC + 10.6 MB APK 크기 절감.
빌드: BUILD SUCCESSFUL 30s (첫 시도 통과).
This commit is contained in:
@@ -29,7 +29,6 @@ import com.medithings.vesiscan.ui.views.history.MeasurementHistoryView
|
||||
import com.medithings.vesiscan.ui.views.home.HomeView
|
||||
import com.medithings.vesiscan.ui.views.monitoring.PlacementGuideView
|
||||
import com.medithings.vesiscan.ui.views.monitoring.PiezoMonitoringView
|
||||
import com.medithings.vesiscan.ui.views.monitoring.UrineCameraScreen
|
||||
import com.medithings.vesiscan.ui.views.monitoring.VoidingDiaryView
|
||||
import com.medithings.vesiscan.ui.views.onboarding.OnboardingView
|
||||
import com.medithings.vesiscan.ui.views.personalization.PiezoPersonalizationView
|
||||
@@ -149,7 +148,6 @@ fun MedilightApp(modifier: Modifier = Modifier) {
|
||||
AppScreen.MEASUREMENT_HISTORY -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
AppScreen.VOIDING_DIARY -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
AppScreen.REMINDER_SETTINGS -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
AppScreen.URINE_CAMERA -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
AppScreen.FIRMWARE_UPDATE -> appState.currentScreen = AppScreen.HOME
|
||||
// 기타
|
||||
AppScreen.SENSOR_SELECT -> appState.currentScreen = AppScreen.HOME
|
||||
@@ -178,13 +176,6 @@ fun MedilightApp(modifier: Modifier = Modifier) {
|
||||
AppScreen.PIEZO_MONITORING -> PiezoMonitoringView(appState)
|
||||
AppScreen.MEASUREMENT_HISTORY -> MeasurementHistoryView(appState)
|
||||
AppScreen.VOIDING_DIARY -> VoidingDiaryView(onBack = { appState.currentScreen = AppScreen.HOME })
|
||||
AppScreen.URINE_CAMERA -> UrineCameraScreen(
|
||||
onDone = { volume ->
|
||||
if (volume != null && volume > 0) appState.resetLevel()
|
||||
appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
},
|
||||
onCancel = { appState.currentScreen = AppScreen.PIEZO_MONITORING }
|
||||
)
|
||||
AppScreen.REMINDER_SETTINGS -> ReminderSettingsView(
|
||||
onBack = { appState.backToMonitoring() }
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user