A FastAPI-based backend for varicose veins detection and patient management. This project provides RESTful endpoints for image prediction, patient data handling, and health checks. Designed for easy integration with modern web frontends (e.g., Next.js on Vercel).
- Predict varicose veins from medical images using ONNX models
- Patient registration and management endpoints
- Health and metrics endpoints for monitoring
- CORS support for modern frontend frameworks
- Clone the repository:
git clone https://github.com/yourusername/VeinWise-API.git cd VeinWise-API - Create and activate a virtual environment:
python -m venv venv # On Windows: venv\Scripts\activate # On Mac/Linux: source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
- Copy
.env.exampleto.envand set your values (CORS, model path, etc).
- Copy
- Development:
uvicorn main:app --reload
- Production:
uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4
- Docker:
docker build -t veinwise-api . docker run -p 8000:8000 --env-file .env veinwise-api
POST /api/v1/predict— Predict varicose veins from an uploaded imageGET /api/v1/health— Health checkGET /api/v1/metrics— Model metrics- (Add more as needed)
See .env.example for all supported variables (e.g., ALLOWED_ORIGINS).
MIT License