Web-based AI system analyzing resorts' pool areas. It detects people and chairs, and calculates occupancy. It also provides insights (e.g., demographics) with a multi-modal LLM.
The project consists of:
- Frontend: A barebone interface supporting file uploads and gallery image selection.
- Backend: Provides statistics and insights using YOLO, Gemini, and some geometric processing.
- Docker: Install Docker and Docker Compose.
- YOLO: The code downloads YOLO11x (i.e., the latest at the time of writing).
- Gemini API Key: Add your API key to your environment.
-
Clone the repository:
git clone https://github.com/your-repo/chair-occupancy-ai.git cd chair-occupancy-ai
-
Add your Gemini API key to the
.env
file:echo "GEMINI_API_KEY=your_api_key_here" > .env
-
Start the application:
./run.sh
-
Access the frontend at localhost.
-
Upload an image or select one from the gallery.
-
Alternatively, you can access the backend API directly at
/docs
for testing.
-
Analyze Image:
POST /analyze-image
- Input: Image file.
- Output: Detection results and labeled image.
-
AI Analysis:
POST /llm-analyze
- Input: Image file.
- Output: GenAI insights.
- AI Models: YOLO, Google Gemini
- Backend: FastAPI, Python
- Frontend: HTML, CSS, JavaScript
- Docker: For containerization