Comments (4)
You can alter the script to do what you want. This are basic python jobs
To save result:
if emotion_text == 'angry':
color = emotion_probability * np.asarray((255, 0, 0))
file_to_write = open('myfile.csv', 'a')
file_to_write.write('angry,')
file_to_write.close()
To read from video file just replace 0
(that represents video camera) with the path to the video file:
video_capture = cv2.VideoCapture("path/video/file.mp4")
This isn't a issue per se.
from face_classification.
hello mirceaciu...i got this error:
Traceback (most recent call last):
File "video_emotion_gender_demo.py", line 104, in
color = emotion_probability * np.asarray((255, 0, 0))
NameError: name 'emotion_probability' is not defined
terminate called without an active exception
Aborted (core dumped)
i cant save results...i want to save gender and emotion results in csv file with times that occure it and other informations
from face_classification.
@mirceaciu @oarriaga What i mean here is to save the result as video file like .mp4 or .avi as i know cv2.VideoWriter_fourcc with different codec can be used but it is producing me an error like:
cv2.error: /home/rohit/opencv-3.3.0/modules/imgcodecs/src/loadsave.cpp:604: error: (-2) could not find a writer for the specified extension in function imwrite_
Can you advice me what can be done to save the result as video file ?
from face_classification.
Here is a link of a tutorial on how to save video using openCV.
from face_classification.
Related Issues (20)
- Trying to convert emotion detection into TensorRT HOT 1
- use BP4D for train and get a bad result HOT 1
- Can't run application with docker HOT 2
- TypeError: zip argument #2 must support iteration
- OpenCV (4.1.1) - Error HOT 1
- Embedd face recognition
- IndexError: index 144 is out of bounds for axis 1 with size 100
- Getting Warning and doesn't run.
- [question] Is there such functionality as face tracking?
- Reduce number of emotions. HOT 1
- Does not return any inference or gender sometimes. HOT 2
- How do I create training data with fer2013 format
- If no face how to add a new function?
- face detection with openCV and DNN
- How can i train my own data?
- simplecnn public model only get 95 acc in imdb dataset, not 96% in model name
- which result from the prediction represents which emotion
- raise IOError(f'No file or directory found at {filepath_str}') HOT 1
- Outdated dependencies [FIXED]
- fail
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from face_classification.