Skip to content

Metaphysicist1/PneuNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pneunet - Cloud Computing Project

A FastAPI-based web application for medical image analysis, specifically focused on pneumonia detection using deep learning models.

Project Structure

.
├── 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

Features

  • 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

Prerequisites

  • Python 3.10 or higher
  • Docker (optional, for containerized deployment)

Installation

  1. Clone the repository:
git clone <repository-url>
cd <project-directory>
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Running the Application

Local Development

  1. Start the FastAPI server:
uvicorn app.main:app --reload
  1. Open your browser and navigate to http://localhost:8000

Docker Deployment

  1. Build the Docker image:
docker build -t pneunet .
  1. Run the container:
docker run -p 8000:8000 pneunet

Testing

The project uses PyTest for testing. To run the tests:

pytest tests/ -v

Test logs are automatically generated in the logs/ directory.

CI/CD Pipeline

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

API Endpoints

  • GET /: Web interface
  • GET /api/v1/: API root endpoint

Development

The project uses:

  • FastAPI for the backend
  • Jinja2 for templating
  • PyTest for testing
  • GitHub Actions for CI/CD
  • Custom logging configuration

Contributing

Write me edgarabasov1@gmail.com

Contributors