Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jatolentino/ai-facial-recognition
Django and React web application to recognize facial expressions with AI
https://github.com/jatolentino/ai-facial-recognition
api-rest artificial-intelligence bitbucket celery cloudinary cloudrun django docker face-recognition figma javascript jira kubernetes nvidia-gpu postgresql python pytorch react redis tensorflow
Last synced: about 2 months ago
JSON representation
Django and React web application to recognize facial expressions with AI
- Host: GitHub
- URL: https://github.com/jatolentino/ai-facial-recognition
- Owner: jatolentino
- License: mit
- Created: 2022-02-08T00:58:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T03:19:18.000Z (6 months ago)
- Last Synced: 2024-07-21T04:25:45.409Z (6 months ago)
- Topics: api-rest, artificial-intelligence, bitbucket, celery, cloudinary, cloudrun, django, docker, face-recognition, figma, javascript, jira, kubernetes, nvidia-gpu, postgresql, python, pytorch, react, redis, tensorflow
- Language: JavaScript
- Homepage: https://recognize.joseatolentino.com
- Size: 8.07 MB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Recognize
AI Facial Expression Recognition
Developed with the software and tools below.
![GitHub repo size](https://img.shields.io/github/repo-size/jatolentino/AI-Facial-recognition)
![GitHub language count](https://img.shields.io/github/languages/count/jatolentino/AI-Facial-recognition?color=success&logo=CodersRank&logoColor=%23FFFFFF)
[![Awesome](https://awesome.re/badge.svg)](https://awesome.re)
![rating](https://img.shields.io/badge/rating-★★★★★-yellow)
![uptime](https://img.shields.io/badge/uptime-99.999%25-green)
---
![recognize-commercial-gif](https://github.com/jatolentino/AI-Facial-recognition/assets/61167951/56b28d0b-e84e-4bb6-803b-e3ad10ec1b1e)
https://github.com/jatolentino/AI-Facial-recognition/assets/61167951/207a1f73-447d-4934-b58c-780f95491f83
---
## 📖 Table of Contents
> - [📍 1. Overview](#-overview)
> - [📦 2. Features](#-features)
> - [📂 3. Repository Structure](#-repository-structure)
> - [🧩 4. Modules](#-modules)
> - [🚀 5. Getting Started](#-getting-started)
> - [📝 5.1. Requirements](#-requirements)
> - [⚙️ 5.2. Previous Steps](#-previous-steps)
> - [🔧 6. Installation](#️-installation)
> - [📦 6.1 With Docker](#-with-docker)
> - [📚 6.2 Without Docker](#-without-docker)
> - [💻 6.2.1 Frontend Installation](#-frontend-installation)
> - [🥅 6.2.2 Backend Installation](#-backend-installation)
> - [🔌 6.2.2.A With Poetry—easy installation](#-backend-poetry)
> - [🎡 6.2.2.B With Pip—step-by-step installation](#-backend-pip)
> - [🧐 7. Verify](#-verify)
> - [🧪 8. Tests](#-tests)
> - [🛠 9. Project Roadmap](#-project-roadmap)
> - [🤝 10. Contributing](#-contributing)
> - [📄 11. License](#-license)
> - [👏 12. Acknowledgments](#-acknowledgments)
---## 📍 1. Overview
Discover facial expressions within profile pictures using Recognize. This advanced web application harnesses AI and the Django-React stacks to offer a powerful tool for photo analysis. Our software's front-end stack seamlessly integrates with the API implementation provided in the back-end, allowing you to choose the option that suits you best. Explore our demo at [https://recognize.joseatolentino.com/](https://recognize.joseatolentino.com/) to experience its capabilities firsthand.
---
## 📦 2. Features
| **Features** | **Users** | **Admin** | **Website** |
|--------------------------|:---------:|:-------------:|:------------:|
| Users' Registration | ✔️ | ✔️ | ✔️ |
| Users' Login/Logout | ✔️ | ✔️ | ✔️ |
| Reset Password | ✔️ | ✔️ | ✔️ |
| Add/Edit Users | ❌ | ✔️ | ➖ |
| Dashboard (Studio) | ✔️ | ✔️ | ✔️ |
| Upload Photos | ✔️ | ✔️ | ✔️ |
| Analyze Photos with AI | ✔️ | ✔️ | ✔️ |
| Store Photos | ❌ | ❌ | ❌ |
| Credit/Debit card payment| ✔️ | ✔️ | ✔️ |
| API key access | ✔️ | ✔️ | ✔️ |
| API Consumption tracking | ✔️ | ✔️ | ✔️ |
| Terms & Condition | ➖ | ✔️ | ✔️ |
| Privacy & Policy | ➖ | ✔️ | ✔️ |
| Newsletter Subscription | ➖ | ✔️ | ✔️ |
| FAQs | ➖ | ✔️ | ✔️ |---
## 📂 3. Repository Structure
```sh
└── AI-Facial-recognition/
├── README.md
├── backend
│ ├── .editorconfig
│ ├── .env.example
│ ├── .flake8
│ ├── .gitignore
│ ├── .pre-commit-config.yaml
│ ├── Dockerfile
│ ├── Makefile
│ ├── build
│ │ └── static
│ │ └── favicon.ico
│ ├── core
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── delete.py
│ │ ├── emotion_detection.py
│ │ ├── management
│ │ │ └── commands
│ │ │ └── superuser.py
│ │ ├── models.py
│ │ ├── permissions.py
│ │ ├── serializers.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── custom_rmn
│ │ └── __init__.py
│ ├── home
│ │ ├── __init__.py
│ │ ├── settings
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── dev.py
│ │ │ └── prod.py
│ │ ├── urls.py
│ │ └── wsgi
│ │ ├── dev.py
│ │ └── prod.py
│ ├── manage.py
│ ├── pyproject.toml
│ ├── requirements.txt
│ ├── static
│ │ └── favicon.ico
│ └── tests
│ └── core
│ ├── emotion_detection
│ │ ├── test_detect_faces.py
│ │ ├── test_generate_random_FileName.py
│ │ └── test_read_image.py
│ ├── image_detection
│ │ ├── test_detect_faces.py
│ │ └── test_read_image.py
│ ├── models
│ │ ├── test_File.py
│ │ ├── test_Membership.py
│ │ ├── test_Payment.py
│ │ ├── test_TrackedRequest.py
│ │ └── test_User.py
│ ├── permissions
│ │ └── test_IsMember.py
│ ├── serializers
│ │ ├── test_ChangeEmailSerializer.py
│ │ ├── test_ChangePasswordSerializer.py
│ │ ├── test_FileSerializer.py
│ │ ├── test_SubscribeSerializer.py
│ │ └── test_TokenSerializer.py
│ └── views
│ ├── test_APIKeyView.py
│ ├── test_CancelSubscription.py
│ ├── test_ChangeEmailView.py
│ ├── test_ChangePasswordView.py
│ ├── test_FileUploadView.py
│ ├── test_ImageRecognitionView.py
│ ├── test_SubscribeView.py
│ ├── test_UserDetailsView.py
│ └── test_UserEmailView.py
└── frontend
├── .env.example
├── .gitignore
├── Dockerfile
├── cypress
│ ├── features
│ │ └── test_features
│ ├── integration
│ │ └── test_integration
│ └── support
│ └── test_support
├── cypress.config.js
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
├── src
│ ├── App.js
│ ├── __tests__
│ │ ├── App.test.js
│ │ └── containers
│ │ ├── Account
│ │ ├── Layout
│ │ └── containers.test.js
│ ├── assets
│ │ ├── css
│ │ │ ├── checkoutform.module.css
│ │ │ └── landingpage.module.css
│ │ ├── images
│ │ │ ├── LogoInsta.js
│ │ │ ├── api-usage.svg
│ │ │ ├── apirecognize.svg
│ │ │ ├── cat.jpg
│ │ │ ├── face-logo.svg
│ │ │ ├── face.png
│ │ │ ├── google-logo.svg
│ │ │ ├── imagePlaceHolder.png
│ │ │ ├── insta-logo.svg
│ │ │ ├── kubernetes.svg
│ │ │ ├── login.svg
│ │ │ ├── logo.svg
│ │ │ ├── logoface-black.svg
│ │ │ ├── logoface.svg
│ │ │ ├── logorecognize-black.svg
│ │ │ ├── logorecognize.svg
│ │ │ ├── openai.svg
│ │ │ ├── openai1.svg
│ │ │ ├── pic1.png
│ │ │ ├── pic2.png
│ │ │ ├── pic3.png
│ │ │ ├── pytorch.svg
│ │ │ ├── result.svg
│ │ │ ├── short_paragraph.png
│ │ │ ├── tensorflow-text.svg
│ │ │ ├── tensorflow.svg
│ │ │ └── upload.svg
│ │ └── videos
│ │ └── video.mp4
│ ├── constants.js
│ ├── containers
│ │ ├── Account
│ │ │ ├── APIKey.js
│ │ │ ├── APIUsage.js
│ │ │ ├── Billing.js
│ │ │ ├── ChangeEmail.js
│ │ │ ├── ChangePassword.js
│ │ │ ├── Chart.js
│ │ │ ├── Checkout.js
│ │ │ ├── CheckoutForm.js
│ │ │ ├── Completion.js
│ │ │ ├── Payment.js
│ │ │ ├── Profile.js
│ │ │ ├── Profile.jsx.jsx
│ │ │ ├── Shell.js
│ │ │ ├── Studio.js
│ │ │ └── SubscribeForm.js
│ │ ├── Contact.js
│ │ ├── CustomLoginForm.js
│ │ ├── CustomSignupForm.js
│ │ ├── Demo.js
│ │ ├── Eye.js
│ │ ├── EyeSlash.js
│ │ ├── Footer.js
│ │ ├── InviteDemo.js
│ │ ├── LandingPage.js
│ │ ├── LandingPage.jsx.jsx
│ │ ├── Layout
│ │ │ ├── DesktopContainer.js
│ │ │ └── MobileContainer.js
│ │ ├── Layout.js
│ │ ├── Login.js
│ │ ├── Pricing.js
│ │ ├── Signup.js
│ │ └── Steps.js
│ ├── hoc
│ │ └── hoc.js
│ ├── index.js
│ ├── registerServiceWorker.js
│ ├── routes.js
│ ├── store
│ │ ├── actions
│ │ │ ├── actionTypes.js
│ │ │ └── auth.js
│ │ ├── reducers
│ │ │ └── auth.js
│ │ └── utility.js
│ └── utils.js
└── tailwind.config.js
```---
## 🧩 4. Modules
backend
| File | Summary |
| --- | --- |
| [Dockerfile](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/Dockerfile) | HTTP error 401 for prompt `backend/Dockerfile` |
| [.editorconfig](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/.editorconfig) | HTTP error 401 for prompt `backend/.editorconfig` |
| [Makefile](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/Makefile) | HTTP error 401 for prompt `backend/Makefile` |
| [.env.example](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/.env.example) | HTTP error 401 for prompt `backend/.env.example` |
| [pyproject.toml](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/pyproject.toml) | HTTP error 401 for prompt `backend/pyproject.toml` |
| [manage.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/manage.py) | HTTP error 401 for prompt `backend/manage.py` |
| [requirements.txt](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/requirements.txt) | HTTP error 401 for prompt `backend/requirements.txt` |backend.home
| File | Summary |
| --- | --- |
| [urls.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/home/urls.py) | HTTP error 401 for prompt `backend/home/urls.py` |backend.home.wsgi
| File | Summary |
| --- | --- |
| [dev.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/home/wsgi/dev.py) | HTTP error 401 for prompt `backend/home/wsgi/dev.py` |
| [prod.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/home/wsgi/prod.py) | HTTP error 401 for prompt `backend/home/wsgi/prod.py` |backend.home.settings
| File | Summary |
| --- | --- |
| [base.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/home/settings/base.py) | HTTP error 401 for prompt `backend/home/settings/base.py` |
| [dev.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/home/settings/dev.py) | HTTP error 401 for prompt `backend/home/settings/dev.py` |
| [prod.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/home/settings/prod.py) | HTTP error 401 for prompt `backend/home/settings/prod.py` |backend.core
| File | Summary |
| --- | --- |
| [serializers.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/serializers.py) | HTTP error 401 for prompt `backend/core/serializers.py` |
| [permissions.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/permissions.py) | HTTP error 401 for prompt `backend/core/permissions.py` |
| [admin.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/admin.py) | HTTP error 401 for prompt `backend/core/admin.py` |
| [apps.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/apps.py) | HTTP error 401 for prompt `backend/core/apps.py` |
| [tests.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/tests.py) | HTTP error 401 for prompt `backend/core/tests.py` |
| [views.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/views.py) | HTTP error 401 for prompt `backend/core/views.py` |
| [delete.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/delete.py) | HTTP error 401 for prompt `backend/core/delete.py` |
| [urls.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/urls.py) | HTTP error 401 for prompt `backend/core/urls.py` |
| [models.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/models.py) | HTTP error 401 for prompt `backend/core/models.py` |
| [emotion_detection.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/emotion_detection.py) | HTTP error 401 for prompt `backend/core/emotion_detection.py` |backend.core.management.commands
| File | Summary |
| --- | --- |
| [superuser.py](https://github.com/jatolentino/AI-Facial-recognition/blob/master/backend/core/management/commands/superuser.py) | HTTP error 401 for prompt `backend/core/management/commands/superuser.py` |frontend
| File | Summary |
| --- | --- |
| [Dockerfile](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/Dockerfile) | HTTP error 401 for prompt `frontend/Dockerfile` |
| [package.json](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/package.json) | HTTP error 401 for prompt `frontend/package.json` |
| [.env.example](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/.env.example) | HTTP error 401 for prompt `frontend/.env.example` |
| [tailwind.config.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/tailwind.config.js) | HTTP error 401 for prompt `frontend/tailwind.config.js` |
| [cypress.config.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/cypress.config.js) | HTTP error 401 for prompt `frontend/cypress.config.js` |frontend.cypress.integration
| File | Summary |
| --- | --- |
| [test_integration](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/cypress/integration/test_integration) | HTTP error 401 for prompt `frontend/cypress/integration/test_integration` |frontend.cypress.support
| File | Summary |
| --- | --- |
| [test_support](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/cypress/support/test_support) | HTTP error 401 for prompt `frontend/cypress/support/test_support` |frontend.cypress.features
| File | Summary |
| --- | --- |
| [test_features](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/cypress/features/test_features) | HTTP error 401 for prompt `frontend/cypress/features/test_features` |frontend.public
| File | Summary |
| --- | --- |
| [index.html](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/public/index.html) | HTTP error 401 for prompt `frontend/public/index.html` |
| [manifest.json](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/public/manifest.json) | HTTP error 401 for prompt `frontend/public/manifest.json` |frontend.src
| File | Summary |
| --- | --- |
| [constants.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/constants.js) | HTTP error 401 for prompt `frontend/src/constants.js` |
| [utils.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/utils.js) | HTTP error 401 for prompt `frontend/src/utils.js` |
| [registerServiceWorker.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/registerServiceWorker.js) | HTTP error 401 for prompt `frontend/src/registerServiceWorker.js` |
| [App.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/App.js) | HTTP error 401 for prompt `frontend/src/App.js` |
| [routes.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/routes.js) | HTTP error 401 for prompt `frontend/src/routes.js` |
| [index.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/index.js) | HTTP error 401 for prompt `frontend/src/index.js` |frontend.src.hoc
| File | Summary |
| --- | --- |
| [hoc.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/hoc/hoc.js) | HTTP error 401 for prompt `frontend/src/hoc/hoc.js` |frontend.src.store
| File | Summary |
| --- | --- |
| [utility.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/store/utility.js) | HTTP error 401 for prompt `frontend/src/store/utility.js` |frontend.src.store.reducers
| File | Summary |
| --- | --- |
| [auth.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/store/reducers/auth.js) | HTTP error 401 for prompt `frontend/src/store/reducers/auth.js` |frontend.src.store.actions
| File | Summary |
| --- | --- |
| [auth.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/store/actions/auth.js) | HTTP error 401 for prompt `frontend/src/store/actions/auth.js` |
| [actionTypes.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/store/actions/actionTypes.js) | HTTP error 401 for prompt `frontend/src/store/actions/actionTypes.js` |frontend.src.__tests__
| File | Summary |
| --- | --- |
| [App.test.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/__tests__/App.test.js) | HTTP error 401 for prompt `frontend/src/__tests__/App.test.js` |frontend.src.__tests__.containers
| File | Summary |
| --- | --- |
| [containers.test.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/__tests__/containers/containers.test.js) | HTTP error 401 for prompt `frontend/src/__tests__/containers/containers.test.js` |frontend.src.__tests__.containers.Account
| File | Summary |
| --- | --- |
| [Account.test.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/__tests__/containers/Account/Account.test.js) | HTTP error 401 for prompt `frontend/src/__tests__/containers/Account/Account.test.js` |frontend.src.__tests__.containers.Layout
| File | Summary |
| --- | --- |
| [Layout.test.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/__tests__/containers/Layout/Layout.test.js) | HTTP error 401 for prompt `frontend/src/__tests__/containers/Layout/Layout.test.js` |frontend.src.containers
| File | Summary |
| --- | --- |
| [Signup.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Signup.js) | HTTP error 401 for prompt `frontend/src/containers/Signup.js` |
| [Login.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Login.js) | HTTP error 401 for prompt `frontend/src/containers/Login.js` |
| [Contact.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Contact.js) | HTTP error 401 for prompt `frontend/src/containers/Contact.js` |
| [CustomLoginForm.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/CustomLoginForm.js) | HTTP error 401 for prompt `frontend/src/containers/CustomLoginForm.js` |
| [Steps.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Steps.js) | HTTP error 401 for prompt `frontend/src/containers/Steps.js` |
| [InviteDemo.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/InviteDemo.js) | HTTP error 401 for prompt `frontend/src/containers/InviteDemo.js` |
| [EyeSlash.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/EyeSlash.js) | HTTP error 401 for prompt `frontend/src/containers/EyeSlash.js` |
| [Footer.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Footer.js) | HTTP error 401 for prompt `frontend/src/containers/Footer.js` |
| [Demo.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Demo.js) | HTTP error 401 for prompt `frontend/src/containers/Demo.js` |
| [CustomSignupForm.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/CustomSignupForm.js) | HTTP error 401 for prompt `frontend/src/containers/CustomSignupForm.js` |
| [Eye.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Eye.js) | HTTP error 401 for prompt `frontend/src/containers/Eye.js` |
| [Layout.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Layout.js) | HTTP error 401 for prompt `frontend/src/containers/Layout.js` |
| [LandingPage.jsx.jsx](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/LandingPage.jsx.jsx) | HTTP error 401 for prompt `frontend/src/containers/LandingPage.jsx.jsx` |
| [LandingPage.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/LandingPage.js) | HTTP error 401 for prompt `frontend/src/containers/LandingPage.js` |
| [Pricing.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Pricing.js) | HTTP error 401 for prompt `frontend/src/containers/Pricing.js` |frontend.src.containers.Account
| File | Summary |
| --- | --- |
| [Profile.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Profile.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Profile.js` |
| [APIUsage.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/APIUsage.js) | HTTP error 401 for prompt `frontend/src/containers/Account/APIUsage.js` |
| [ChangePassword.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/ChangePassword.js) | HTTP error 401 for prompt `frontend/src/containers/Account/ChangePassword.js` |
| [Chart.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Chart.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Chart.js` |
| [Shell.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Shell.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Shell.js` |
| [Profile.jsx.jsx](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Profile.jsx.jsx) | HTTP error 401 for prompt `frontend/src/containers/Account/Profile.jsx.jsx` |
| [Completion.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Completion.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Completion.js` |
| [ChangeEmail.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/ChangeEmail.js) | HTTP error 401 for prompt `frontend/src/containers/Account/ChangeEmail.js` |
| [Payment.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Payment.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Payment.js` |
| [SubscribeForm.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/SubscribeForm.js) | HTTP error 401 for prompt `frontend/src/containers/Account/SubscribeForm.js` |
| [APIKey.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/APIKey.js) | HTTP error 401 for prompt `frontend/src/containers/Account/APIKey.js` |
| [CheckoutForm.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/CheckoutForm.js) | HTTP error 401 for prompt `frontend/src/containers/Account/CheckoutForm.js` |
| [Billing.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Billing.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Billing.js` |
| [Studio.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Studio.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Studio.js` |
| [Checkout.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Account/Checkout.js) | HTTP error 401 for prompt `frontend/src/containers/Account/Checkout.js` |frontend.src.containers.Layout
| File | Summary |
| --- | --- |
| [DesktopContainer.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Layout/DesktopContainer.js) | HTTP error 401 for prompt `frontend/src/containers/Layout/DesktopContainer.js` |
| [MobileContainer.js](https://github.com/jatolentino/AI-Facial-recognition/blob/master/frontend/src/containers/Layout/MobileContainer.js) | HTTP error 401 for prompt `frontend/src/containers/Layout/MobileContainer.js` |---
## 🚀 5. Getting Started
### 📝 5.1. Requirements
Please make sure you have the following dependencies installed on your system:
> **Compulsory**`- ℹ️ NodeJS >= 10.18.0`
`- ℹ️ NPM >= 6.13.4`
`- ℹ️ Python = 3.8.0`
`- ℹ️ Pip >= 19.2.3`
> **Optional**
`- ℹ️ Poetry >= 1.8.2`
### ⚙️ 5.2 Previous Steps
Setting you up!
- Before installing the application—either online or locally—it is necessary that you configure your Stripe & Cloudinary accounts, as well as your PostgreSQL database; the later, only if you are planning to deploy the software on the internet.
> Get your Stripe API keys [here](https://docs.stripe.com/keys)
> Configure your Cludinary account, learn [here](https://youtu.be/YYmzj5DK_5s?si=nFdttB3tUsdZem3o&t=40)
> Set your PostgreSQL DB [locally](https://youtu.be/YYmzj5DK_5s?si=nFdttB3tUsdZem3o&t=40) or [online1](https://youtu.be/YYmzj5DK_5s?si=nFdttB3tUsdZem3o&t=40)/[online2](https://youtu.be/YYmzj5DK_5s?si=nFdttB3tUsdZem3o&t=40)/[online3](https://youtu.be/YYmzj5DK_5s?si=nFdttB3tUsdZem3o&t=40)
After you have made those configurations, prepare these environment variables that will be required. See an example below.
- In `./frontend/.env`
```bash
# REACT CONFIG: DEVELOPMENT or PRODUCTION
REACT_APP_ENVIRONMENT=DEVELOPMENT
REACT_APP_DEBUG=true# BASE URL OF THE HOST FOR DEV. & PROD. (the backend host)
REACT_APP_DEV_URL=http://127.0.0.1:8000
REACT_APP_PROD_URL=https://www.example.com# CLOUDINARY CONFIG
REACT_APP_CLOUDINARY_API_KEY=00000034034
REACT_APP_CLOUDINARY_API_SECRET=yoursecreteapikey
REACT_APP_CLOUDINARY_CLOUD_NAME=yourcloudname# STRIPE CONFIG
REACT_APP_STRIPE_PUBLISH_KEY_DEV=pk_test_TYooMQauvdEDq54NiTphI7jx
REACT_APP_STRIPE_PUBLISH_KEY_PROD=pk_test_TYooMQauvdEDq54NiTphI7jx
```- And in `./backend/.env`
```bash
# DJANGO SETUP, ENVIROMENT 2 options: DEVELOPMENT OR PRODUCTION
# set preferably debug to false in production
ENVIRONMENT=DEVELOPMENT
DEBUG=True
SECRET_KEY=yourscetedjangobackendkey# CLOUDINARY SETUP
API_KEY=00000034034
API_SECRET=yoursecreteapikey
CLOUD_NAME=yourcloudname# POSTGRESQL DATABASE SETUP
DB_ENGINE=django.db.backends.postgresql_psycopg2
DB_NAME=dbname
DB_USER=dbusername
DB_PASSWORD=dbpassword
DB_HOST=dbhost
DB_PORT=5432# FOR STRIPE PAYMENT IN TEST (DEVELOPMENT) MODE
# these are the default keys provided by Stripe
STRIPE_TEST_PUBLISH_KEY=pk_test_TYooMQauvdEDq54NiTphI7jx
STRIPE_TEST_SECRET_KEY=sk_test_4eC39HqLyjWDarjtT1zdp7dc# FOR STRIPE PAYMENT IN LIVE (PRODUCTION) MODE
# Change this to your keys
STRIPE_LIVE_PUBLISH_KEY=pk_test_TYooMQauvdEDq54NiTphI7jx
STRIPE_LIVE_SECRET_KEY=sk_test_4eC39HqLyjWDarjtT1zdp7dc
```> **Note that in production, your will require a non-local PostgreSQL setup, and on development you can go for the default Django database Sqlite3, which doesn't require any DB previous configuration.**
---
## 🔧 6. Installation
If you want to test the software asap, go for `6.1` and if you want to install everything manually, begin at `6.2` onwards.### 📦 6.1 With Docker
- Pull the Frontend Image
```bash
docker pull joseaidocker/recognize:recognizefront
```- Pull the Backend Image
```bash
docker pull joseaidocker/recognize:recognizeback
```- Create two environment files `back.env` and `front.env`, containing the following variables (change them at your convenience):
- For the `back.env` file:```sh
ENVIRONMENT=DEVELOPMENT
DEBUG=True
SECRET_KEY=yourscetedjangobackendkey
API_KEY=00000034034
API_SECRET=yoursecreteapikey
CLOUD_NAME=yourcloudname
DB_ENGINE=django.db.backends.postgresql_psycopg2
DB_NAME=dbname
DB_USER=dbusername
DB_PASSWORD=dbpassword
DB_HOST=dbhost
DB_PORT=5432
STRIPE_TEST_PUBLISH_KEY=pk_test_TYooMQauvdEDq54NiTphI7jx
STRIPE_TEST_SECRET_KEY=sk_test_4eC39HqLyjWDarjtT1zdp7dc
STRIPE_LIVE_PUBLISH_KEY=pk_test_TYooMQauvdEDq54NiTphI7jx
STRIPE_LIVE_SECRET_KEY=sk_test_4eC39HqLyjWDarjtT1zdp7dc
```- For the `front.env` file:
```bash
REACT_APP_ENVIRONMENT=DEVELOPMENT
REACT_APP_DEBUG=true
REACT_APP_DEV_URL=http://127.0.0.1:8000
REACT_APP_PROD_URL=https://www.example.com
REACT_APP_CLOUDINARY_API_KEY=00000034034
REACT_APP_CLOUDINARY_API_SECRET=yoursecreteapikey
REACT_APP_CLOUDINARY_CLOUD_NAME=yourcloudname
REACT_APP_STRIPE_PUBLISH_KEY_DEV=pk_test_TYooMQauvdEDq54NiTphI7jx
REACT_APP_STRIPE_PUBLISH_KEY_PROD=pk_test_TYooMQauvdEDq54NiTphI7jx
```- Finally, run the docker images with:
```bash
docker run -p 3000:3000 --name recognizeFRONT --env-file front.env recognizefront
docker run -p 8000:8080 --name recognizeBACK --env-file back.env recognizeback
```>**Note that on development, the parameter port of `REACT_APP_DEV_URL` (8000, according to the example) should match the output port of the command in `docker run -p 8000:8080 --name recognizeBACK --env-file back.env recognizeback`, so that frontend can communicate with the backend locally :)**
### 📚 6.2 Without Docker
#### 💻 6.2.1 Frontend Installation- Clone the repository and move to the root folder:
```bash
git clone https://github.com/jatolentino/AI-Facial-recognition
cd AI-Facial-recognition
```- Navigate to the `./frontend` folder and run:
```bash
npm install
```- Run the frontend with:
```bash
npm start
```> **To start the frontend site, you should have previously configured `./frontend/.env`, at least with the development environment parameters.**
#### 🥅 6.2.2 Backend Installation
Change to the project directory, and choose either the Poetry (`2.2.2.A`) or Pip (`2.2.2.B`) installation:
```bash
cd ./backend
```##### 🔌 6.2.2.A With Poetry—easy installation
```bash
make full
```
> The above command will create a virtual environment, install all the django & python packages needed, create a superuser called `admin` and a user called `user`, both with password: `password`, and run the application in `localhost:8000`. For more information read the `./backend/Makefile` file.##### 🎡 6.2.2.B With Pip—step-by-step installation
- Create a virtual environment
```bash
python -m venv env
```- Switch to the virtual env in Windows
```bash
source env/Scripts/activate
```
Or in Linux/Mac
```bash
source env/bin/activate
```- Install the requirements
```bash
pip install -r requirements.txt
```- Make the migrations
```bash
python manage.py makemigrations
python migrate --run-syncdb
```- Modify the rmn package for face recognition
```bash
cp custom_rmn/__init__.py env/Lib/site-packages/rmn/
```- Collect the static files
```bash
python manage.py collectstatic
```- Create a superuser & user
```bash
python manage.py superuser --username admin --password password --noinput --email '[email protected]'
```
> This will create and admin & user, both with the same name respectively and with a password: password. For more information, check this file: `./backend/core/management/commands/superuser.py`.- Run the application
```bash
python manage.py runserver
```---
## 🧐 7. Verify
- For the Frontend
Visit the following urls:
- `http://localhost:3000/`: Note that the /admin path is a honeypot- For the Backend
Visit the following urls:
- `http://localhost:8000/secretadmin/`: Note that the /admin path is a honeypot
- `http://localhost:8000/rest-auth/registration/`: To login
- `http://localhost:8000/api-auth/login/?next=/api/demo/`: To register an account
- `http://localhost:8000/api/demo/`: To test the API---
## 🧪 8. Tests
To execute tests, run:
```bash
npm test
```---
## 🛠 9. Project Roadmap
- [X] `► User registration`
- [X] `► User login`
- [X] `► User Dashboard`
- [X] `► API key assignement`
- [X] `► API consumption tracking`
- [X] `► Payment System: Cost per API request`
- [ ] `► Admin Dashboard`
- [ ] `► New API key generation`
- [ ] `► Admin creates new Membership Plans`---
## 🤝 10. Contributing
Contributions are welcome! Here are several ways you can contribute:
- **[Submit Pull Requests](https://github.com/jatolentino/AI-Facial-recognition/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.
- **[Join the Discussions](https://github.com/jatolentino/AI-Facial-recognition/discussions)**: Share your insights, provide feedback, or ask questions.
- **[Report Issues](https://github.com/jatolentino/AI-Facial-recognition/issues)**: Submit bugs found or log feature requests for Ai-facial-recognition.Contributing Guidelines
1. **Fork the Repository**: Start by forking the project repository to your GitHub account.
2. **Clone Locally**: Clone the forked repository to your local machine using a Git client.
```bash
git clone https://github.com/jatolentino/AI-Facial-recognition
```
3. **Create a New Branch**: Always work on a new branch, giving it a descriptive name.
```bash
git checkout -b new-feature-x
```
4. **Make Your Changes**: Develop and test your changes locally.
5. **Commit Your Changes**: Commit with a clear message describing your updates.
```bash
git commit -m 'Implemented new feature x.'
```
6. **Push to GitHub**: Push the changes to your forked repository.
```bash
git push origin new-feature-x
```
7. **Submit a Pull Request**: Create a PR against the original project repository. Clearly describe the changes and their motivations.Once your PR is reviewed and approved, it will be merged into the main branch.
---
## 📄 11. License
This project is protected under the [SELECT-A-LICENSE](https://choosealicense.com/licenses) License. For more details, refer to the [LICENSE](https://choosealicense.com/licenses/) file.
---
## 👏 12. Acknowledgments
[1] L. Pham, T. H. Vu and T. A. Tran, *"Facial Expression Recognition Using Residual Masking Network,"* 2020 25th International Conference on Pattern Recognition (ICPR), Milan, Italy, 2021, pp. 4513-4519, doi: 10.1109/ICPR48806.2021.9411919. [Repo here](https://github.com/phamquiluan/ResidualMaskingNetwork)
[**Return**](#-quick-links)
---