How gokul-k-19/skindiseaseclassifier works
Purpose and Top-Level Shape
This repository is a cross-platform Flutter skin-disease analysis application with a Python inference/backend layer. The client appears to support image upload, analysis results, severity assessment, reports, history, and profile views. Model artifacts are included for PyTorch-based classification.
Entry Points and Runtimes
• Flutter client startup: lib/main.dart; feature UI is organized under lib/.
• Python service/inference entry points: api.py and Final_pred.py.
• Flutter targets include Android, iOS, web, Linux, macOS, and Windows; Android hosts the Flutter activity at android/app/src/main/kotlin/com/example/skindisease_app/MainActivity.kt.
• Python dependencies are expected through requirements.txt; Flutter dependencies through pubspec.yaml.
Client Application Shell and Navigation
lib/main.dart is the application composition boundary, expected to initialize the Flutter app and route or present primary screens. The UI is feature-screen based rather than separated into visible domain packages:
• Upload/input flow: lib/upload_screen.dart
• Analysis workflow: lib/analysis_screen.dart
• Result presentation: lib/result_screen.dart
• Derived outputs and user-facing records: lib/report_screen.dart, lib/history_screen.dart, lib/profile_screen.dart
Analysis Request Boundary
lib/api_service.dart is the client/server integration boundary. It likely packages uploaded image data from the upload flow, invokes the Python API, and maps the response for analysis and result screens. This isolates network transport from presentation code and is the key contract surface between Flutter and Python.
ML Inference Layer
The backend/inference side is represented by:
• api.py: service-facing API entry point.
• Final_pred.py: prediction/inference implementation.
• sgcm_best.pth: PyTorch model checkpoint.
• android/app/src/main/assests/sgcm_mobile.pt: mobile-formatted model asset, suggesting a possible on-device Android inference path in addition to—or instead of—the API workflow.
The coexistence of .pth and .pt model assets indicates separate server/Python and Android/mobile model-consumption boundaries.
Result Interpretation and Reporting
lib/severity.dart centralizes severity-related representation or calculation, feeding the analysis/result/report stages. The likely control flow is image selection → API/model inference → predicted condition and severity → result display → report/history persistence or display:
lib/upload_screen.dart → lib/api_service.dart → api.py / Final_pred.py → lib/analysis_screen.dart / lib/result_screen.dart → lib/report_screen.dart and lib/history_screen.dart.
Platform Infrastructure
Flutter’s generated platform hosts package the shared Dart application:
• Android Gradle application: android/app/build.gradle.kts
• iOS runner: ios/Runner/AppDelegate.swift
• Desktop runners: linux/runner/main.cc, windows/runner/main.cpp, macos/Runner/MainFlutterWindow.swift
• Web shell: web/index.html
No cloud, database, authentication provider, or deployment infrastructure is present in the tree; persistence and service hosting details are not defined by the provided repository metadata.
Main entry points: main.dart App composition · result_screen.dart Result display · api_service.dart Analysis API client · analysis_screen.dart Analysis workflow
Components 17
Flutter client
- App composition · Initializes the shared application and primary screens.
lib/main.dart - Image upload
lib/upload_screen.dart - Analysis API client · Packages image data and maps inference responses.
lib/api_service.dart - Analysis workflow
lib/analysis_screen.dart - Result display
lib/result_screen.dart - Severity interpretation
lib/severity.dart - Report view
lib/report_screen.dart - History view
lib/history_screen.dart - Profile view
lib/profile_screen.dart
Python inference
- Inference API
api.py - Prediction pipeline
Final_pred.py - Server model checkpoint
sgcm_best.pth
Platform hosts
- Android host
android/app/src/main/kotlin/com/example/skindisease_app/MainActivity.kt - Android mobile model · Supports a possible on-device inference path.
android/app/src/main/assests/sgcm_mobile.pt - iOS host
ios/Runner/AppDelegate.swift - Web host
web/index.html - Desktop hosts · Linux, macOS, and Windows package the shared Dart app.
Connections 20
- Android host → App composition: hosts
- iOS host → App composition: hosts
- Web host → App composition: hosts
- Desktop hosts → App composition: hosts
- App composition → Image upload: presents
- App composition → Analysis workflow: presents
- App composition → Result display: presents
- App composition → Report view: presents
- App composition → History view: presents
- App composition → Profile view: presents
- Image upload → Analysis API client: submits image
- Analysis API client → Inference API: requests inference
- Inference API → Prediction pipeline: invokes
- Prediction pipeline → Server model checkpoint: loads
- Analysis API client → Analysis workflow: returns analysis
- Analysis workflow → Result display: shows prediction
- Severity interpretation → Result display: provides severity
- Result display → Report view: generates report
- Result display → History view: records result
- Android host → Android mobile model: packages