Upload chest X-Ray images to detect whether pneumonia is present or not.
- This repository contains frontend (Vite, React, Tailwindcss) and backend (FastAPI, PyTorch, Uvicorn).
- The image classification model was set up and trained in Google Colab: Link
- The training process was kept simple and did not include complex hyperparameter tuning to achieve a higher accuracy
Metric | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
Value (Test set) | 0.896 | 0.897 | 0.941 | 0.919 |
- The backend handles three types of issues:
- Invalid or missing post body -> Handled by FastAPI using the RequestValidationError
- Uploaded file is not a jpeg image
- Uploaded image is smaller than the what the preprocessing steps of the model can handle (This can be tested using the small_image.jpeg)
- The frontend handles three types of issues:
- Dropzone only accepts img/jpeg files and therefore explicit error handling in the backend can be omitted as long as the frontend is the only requesting source
- Status code is greater or equal to 400 -> response from the backend contains one of the errors mentioned above
- client side error like an unreachable server