How prathamd69/kidney-tumor-detection works
Kidney Tumor Detection provides two related workflows: a reproducible training/evaluation pipeline for binary and four-class CT-image classification, and a web API for image upload and inference. In the API, startup initializes both predictors; requests select screening or detailed diagnosis, with class descriptions added to the latter. Training components construct datasets and models, while optimization exports lightweight TFLite models. Some training and multiclass evaluation relationships are documented but their implementations were not excerpted, so those connections are marked unverified.
Main entry points: model_factory.py Model pipeline factory · app.py FastAPI service · prediction.py Binary predictor · file_utils.py File and config I/O
Components 20
Inference service
- FastAPI service
app.py - Web interface
templates/index.html - Image preprocessing
src/prediction/prediction.py - Binary predictor
src/prediction/prediction.py - Multiclass predictor
src/prediction/prediction.py - Class descriptions
class_descriptions.json
Training and evaluation
- Data processing
src/components/data_processing.py - Dataset streaming
src/components/build_datasets.py - Binary training
src/binaryclassification/binaryclass_training.py - Multiclass training
src/multiclassification/multiclass_training.py - Binary evaluation
src/binaryclassification/binarymodel_evaluation.py - Multiclass evaluation
src/multiclassification/multimodel_evaluation.py
Model construction
- Binary TFLite model
litemodels/binarymodel.tflite - Multiclass TFLite model
litemodels/multimodel.tflite - Model pipeline factory
src/components/model_factory.py - Base model builder
src/components/build_basemodel.py - TFLite optimizer
src/components/model_optimization.py
Shared utilities
- File and config I/O
src/utils/file_utils.py - Logging
src/utils/logger.py
Other components
- Image uploader
Connections 18
- Image uploader → FastAPI service: uploads image
app.py - FastAPI service → Web interface: serves page
app.py - FastAPI service → Binary predictor: dispatches screening
app.py - FastAPI service → Multiclass predictor: dispatches diagnosis
app.py - FastAPI service → Class descriptions: loads descriptions
app.py - Binary predictor → Image preprocessing: preprocesses image
src/prediction/prediction.py - Multiclass predictor → Image preprocessing: preprocesses image
src/prediction/prediction.py - Binary predictor → Binary TFLite model: loads model
src/prediction/prediction.py - Multiclass predictor → Multiclass TFLite model: loads model
src/prediction/prediction.py - Model pipeline factory → Dataset streaming: builds datasets
src/components/model_factory.py - Model pipeline factory → Base model builder: builds model
src/components/model_factory.py - Model pipeline factory → File and config I/O: loads data
src/components/model_factory.py - TFLite optimizer → Model pipeline factory: configures model
src/components/model_optimization.py - Binary evaluation → Model pipeline factory: requests test components
src/binaryclassification/binarymodel_evaluation.py - Binary training → Model pipeline factory: uses training pipeline
- Multiclass training → Model pipeline factory: uses training pipeline
- Multiclass evaluation → Model pipeline factory: uses evaluation pipeline
- Data processing → File and config I/O: uses file utilities