How mazenshalaby/ai-models works
This is a Flask image-classification service for colon, lung, leukemia, and skin cancer. A client uploads an image and cancer type; the API validates the request, selects a preloaded model, and calls the prediction utility. That utility applies the relevant image preprocessing, runs inference, and maps the highest-scoring class to a label and confidence. The excerpts show the request and inference flow; there is no README or evidence for additional product capabilities.
Main entry points: app.py Prediction endpoint · preprocess.py Image preprocessing · colon_model.h5 Colon model · lung_model.h5 Lung model
Components 8
HTTP API
- Prediction endpoint
app.py
Inference
- Image preprocessing
utils/preprocess.py - Class and confidence
utils/preprocess.py - Colon model
models/colon_model.h5 - Lung model
models/lung_model.h5 - Leukemia model
models/leukemia_model.h5 - Skin model
models/skin_model.h5
Other components
- Client
Connections 11
- Client → Prediction endpoint: uploads image
app.py - Prediction endpoint → Colon model: loads at startup
app.py - Prediction endpoint → Lung model: loads at startup
app.py - Prediction endpoint → Leukemia model: loads at startup
app.py - Prediction endpoint → Skin model: loads at startup
app.py - Prediction endpoint → Image preprocessing: calls prediction
app.py - Image preprocessing → Class and confidence: maps scores
utils/preprocess.py - Image preprocessing → Colon model: runs inference
- Image preprocessing → Lung model: runs inference
- Image preprocessing → Leukemia model: runs inference
- Image preprocessing → Skin model: runs inference