This Django project uses facial emotion detection to recommend songs and books based on the detected emotion.
The project has the following structure:
- core: Core application of the Django project.
- demoImages: Folder containing image files for testing the emotion detection.
- emotion_detector: Django app for handling emotion detection and recommendations.
- static: Static files for the project.
- db.sqlite3: SQLite database file.
Follow these steps to set up and run the project:
-
Clone the repository:
git clone <repository_url> cd emotion_detection_django-main cd emotion_detection_django-main
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Visit
http://127.0.0.1:8000/face_detection/
in your web browser to access the face detection endpoint.
-
Post an image to the
face_detection/
endpoint using a tool like Postman or by making a POST request to the endpoint. -
The server will detect emotions, recommend songs and books based on the detected emotion, and return the results.
-
The project uses TensorFlow for emotion detection and Django for the web framework.
-
Ensure that your environment supports the required dependencies, including TensorFlow.
-
This project assumes proper configuration of the database and Cloudinary settings.
-
Additional configurations such as database settings may be needed for production deployment.