A FastAPI-based web application for medical image analysis, specifically focused on pneumonia detection using deep learning models.
.
├── app/ # Main application directory
│ ├── main.py # FastAPI application entry point
│ ├── logger.py # Logging configuration
│ └── templates/ # HTML templates
├── tests/ # Test directory
│ └── test_main.py # Application tests
├── data/ # Data directory for storing images and models
├── logs/ # Application logs
├── .github/ # GitHub configuration
│ └── workflows/ # CI/CD workflows
├── dockerfile # Docker configuration
├── requirements.txt # Python dependencies
├── pytest.ini # PyTest configuration
├── .env # Environment variables
└── README.md # Project documentation
- FastAPI-based REST API
- Web interface for image upload and analysis
- Deep learning model integration for pneumonia detection
- Docker support for containerized deployment
- Automated testing with PyTest
- CI/CD pipeline with GitHub Actions
- Comprehensive logging system
- Python 3.10 or higher
- Docker (optional, for containerized deployment)
- Clone the repository:
git clone <repository-url>
cd <project-directory>- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Start the FastAPI server:
uvicorn app.main:app --reload- Open your browser and navigate to
http://localhost:8000
- Build the Docker image:
docker build -t pneunet .- Run the container:
docker run -p 8000:8000 pneunetThe project uses PyTest for testing. To run the tests:
pytest tests/ -vTest logs are automatically generated in the logs/ directory.
The project includes a GitHub Actions workflow that:
- Runs on push to main branch and pull requests
- Sets up Python 3.10
- Installs dependencies
- Runs tests
- Uploads test logs as artifacts
GET /: Web interfaceGET /api/v1/: API root endpoint
The project uses:
- FastAPI for the backend
- Jinja2 for templating
- PyTest for testing
- GitHub Actions for CI/CD
- Custom logging configuration
Write me edgarabasov1@gmail.com