How vinitpatil519/samsung-research-internship works
This is a leaf-disease diagnosis research application: users upload a leaf image for segmentation, feature analysis, and disease classification, with stage-by-stage visual results. The backend exposes prediction, segmentation-only, health, and class-metadata endpoints; the frontend also has analysis and research views. Model training and dataset preparation form a separate research workflow. The available excerpts establish the API-to-pipeline call and several pipeline stage calls; UI wiring and some stage/model interactions are not shown, so those links are omitted.
Main entry points: pipeline.py Inference pipeline · main.py FastAPI service · registry.py Model registry · page.tsx Landing page
Components 29
Web experience
- Landing page
samsung-prism-worklet-25st16/frontend/src/app/page.tsx - Analysis view
samsung-prism-worklet-25st16/frontend/src/app/analyze/page.tsx - Research view
samsung-prism-worklet-25st16/frontend/src/app/research/page.tsx - Upload panel
samsung-prism-worklet-25st16/frontend/src/components/UploadPanel.tsx - Result card
samsung-prism-worklet-25st16/frontend/src/components/ResultCard.tsx - Stage rail
samsung-prism-worklet-25st16/frontend/src/components/StageRail.tsx - t-SNE chart
samsung-prism-worklet-25st16/frontend/src/components/TsneChart.tsx - API client
samsung-prism-worklet-25st16/frontend/src/lib/api.ts
API and orchestration
- FastAPI service
samsung-prism-worklet-25st16/backend/app/main.py - Inference pipeline
samsung-prism-worklet-25st16/backend/app/pipeline.py - Runtime configuration
samsung-prism-worklet-25st16/backend/app/config.py - Diagnosis metadata
samsung-prism-worklet-25st16/backend/app/labels.py
Inference stages and models
- Image decoding
samsung-prism-worklet-25st16/backend/app/imaging.py - Image preprocessing
samsung-prism-worklet-25st16/backend/app/stages/preprocess.py - Leaf segmentation
samsung-prism-worklet-25st16/backend/app/stages/segment.py - Feature extraction
samsung-prism-worklet-25st16/backend/app/stages/features.py - Disease classification
samsung-prism-worklet-25st16/backend/app/stages/classify.py - Sparse encoding
samsung-prism-worklet-25st16/backend/app/stages/encoder.py - Visual explanation
samsung-prism-worklet-25st16/backend/app/stages/explain.py - Model registry
samsung-prism-worklet-25st16/backend/app/models/registry.py - U-Net++ model
samsung-prism-worklet-25st16/backend/app/models/unetpp.py - Classifier model
samsung-prism-worklet-25st16/backend/app/models/classifier.py - Sparse encoder model
samsung-prism-worklet-25st16/backend/app/models/sparse_encoder.py
Model research
- Dataset preparation
samsung-prism-worklet-25st16/backend/training/dataset.py - Classifier training
samsung-prism-worklet-25st16/backend/training/train_classifier.py - Encoder training
samsung-prism-worklet-25st16/backend/training/train_encoder.py - Segmentation training
samsung-prism-worklet-25st16/backend/training/train_unet.py - t-SNE reference build
samsung-prism-worklet-25st16/backend/training/build_tsne.py
Other components
- Leaf analyst
Connections 13
- FastAPI service → Inference pipeline: runs analysis
samsung-prism-worklet-25st16/backend/app/main.py - FastAPI service → Runtime configuration: checks upload limits
samsung-prism-worklet-25st16/backend/app/main.py - FastAPI service → Diagnosis metadata: serves class cards
samsung-prism-worklet-25st16/backend/app/main.py - FastAPI service → Model registry: checks model status
samsung-prism-worklet-25st16/backend/app/main.py - Inference pipeline → Image preprocessing: preprocesses image
samsung-prism-worklet-25st16/backend/app/pipeline.py - Inference pipeline → Leaf segmentation: segments leaf
samsung-prism-worklet-25st16/backend/app/pipeline.py - Inference pipeline → Feature extraction: extracts features
samsung-prism-worklet-25st16/backend/app/pipeline.py - Inference pipeline → Disease classification: classifies image
samsung-prism-worklet-25st16/backend/app/pipeline.py - Inference pipeline → Sparse encoding: encodes features
samsung-prism-worklet-25st16/backend/app/pipeline.py - Model registry → U-Net++ model: loads checkpoint
samsung-prism-worklet-25st16/backend/app/models/registry.py - Model registry → Classifier model: loads checkpoint
samsung-prism-worklet-25st16/backend/app/models/registry.py - Model registry → Sparse encoder model: loads checkpoint
samsung-prism-worklet-25st16/backend/app/models/registry.py - Leaf analyst → Landing page