pip install google-generativeai pillow opencv-python time
Analyze the emotions of the person based on the image or video (image and video analyzer).
- Upload image or video to colab
Analyze the emotions of the person in live webcam session. (webcam analyzer)
- Emotion analyzer.ipynb is for image/video analysis
- webcam1.py is initial approach to analyze real-time emotions during the live webcam session
- webcam3.py is the most succesful version as of right now
- webcam4.py is the playground/testing arena
An example of basic fastapi react setup, no face analisys here! (fastapi react basic setup)
- BACKEND (FastAPI)
- Install FastAPI and Uvicorn
pip install fastapi uvicorn
- Add CORS middleware
- Run the FastAPI Server
uvicorn main:app --reload
- Test the endpoint by opening http://127.0.0.1:8000/message in your browser.
- FRONTEND (React)
- Create React App
npx create-react-app my-react-app
- Install Axios
npm install axios
- Create a Component to Fetch Data (MessageComponent.js)
- Update App.js
- Start the React App
npm start
- Open a browser and navigate to http://localhost:3000.
An example of fastapi react setup using Micorsoft Azure Face resource
pip install fastapi uvicorn aiohttp
Follow the backend and frontend steps in the previous example.