An AI-powered analytics system for smart malls using computer vision and machine learning.
- Person detection using YOLOv8
- Face analysis (age, gender, emotion) using DeepFace
- Customer behavior prediction using RandomForest
- Real-time analytics dashboard
- MongoDB integration for data storage
- Automated slot allocation system
- Clone the repository:
git clone https://github.com/yourusername/SmartMallAI.git
cd SmartMallAI- 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- Set up environment variables:
- Copy
.env.exampleto.env - Update the MongoDB connection string and other settings
- Run the application:
python app.pyThe application will be available at http://localhost:5000
SmartMallAI/
├── app.py # Main Flask app
├── yolo_detector.py # YOLOv8 person detection
├── face_analysis.py # DeepFace analysis
├── ml_model.py # RandomForest model
├── db_manager.py # MongoDB operations
├── utils.py # Utilities
├── models/ # Trained models
├── data/ # Training data
├── static/ # Static files
│ ├── uploads/ # Image uploads
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript
├── templates/ # HTML templates
└── logs/ # Application logs
GET /- Main dashboardPOST /upload- Upload and analyze imageGET /results/<result_id>- View analysis resultsGET /dashboard/stats- Get real-time analytics
- Flask - Web framework
- YOLOv8 - Object detection
- DeepFace - Face analysis
- scikit-learn - Machine learning
- MongoDB - Database
- Chart.js - Analytics visualization
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.

