GithubHelp home page GithubHelp logo

Comments (4)

mirceaciu avatar mirceaciu commented on June 12, 2024

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.

roiksail avatar roiksail commented on June 12, 2024

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.

trohit920 avatar trohit920 commented on June 12, 2024

@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.

oarriaga avatar oarriaga commented on June 12, 2024

Here is a link of a tutorial on how to save video using openCV.

from face_classification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.