Giter VIP home page Giter VIP logo

pinto0309 / openvino-emotionrecognition Goto Github PK

View Code? Open in Web Editor NEW
57.0 5.0 23.0 17.21 MB

OpenVINO+NCS2/NCS+MutiModel(FaceDetection, EmotionRecognition)+MultiStick+MultiProcess+MultiThread+USB Camera/PiCamera. RaspberryPi 3 compatible. Async.

Home Page: https://qiita.com/PINTO

License: MIT License

Python 100.00%
openvino raspberrypi ncs facedetection emotion-recognition picamera python neural-compute-stick multimodel

openvino-emotionrecognition's Introduction

OpenVINO-EmotionRecognition

OpenVINO+NCS2/NCS+MutiModel(FaceDetection, EmotionRecognition)+MultiStick+MultiProcess+MultiThread+USB Camera/PiCamera. RaspberryPi 3 compatible.

[5, Mar 2019] It corresponds to MultiStick.

Motion image

RaspberryPi3 + NCS2 x1 + OenVINO, Async, 320x240
Youtube : https://youtu.be/wF3JD3jyGaA
01

Corei7 + NCS2 x2 + OenVINO, Async, 320x240

Usage

$ sudo apt-get install -y python3-picamera
$ sudo -H pip3 install imutils --upgrade
$ git clone https://github.com/PINTO0309/OpenVINO-EmotionRecognition.git
$ cd OpenVINO-EmotionRecognition
$ python3 main.py -wd 320 -ht 240 -numncs 1

Parameters

usage: main.py [-h] [-cm MODE_OF_CAMERA] [-cn NUMBER_OF_CAMERA]
               [-wd CAMERA_WIDTH] [-ht CAMERA_HEIGHT] [-numncs NUMBER_OF_NCS]
               [-vidfps FPS_OF_VIDEO] [-fdmp FD_MODEL_PATH]
               [-emmp EM_MODEL_PATH]

optional arguments:
  -h, --help            show this help message and exit
  -cm MODE_OF_CAMERA, --modeofcamera MODE_OF_CAMERA
                        Camera Mode. 0:=USB Camera, 1:=PiCamera (Default=0)
  -cn NUMBER_OF_CAMERA, --numberofcamera NUMBER_OF_CAMERA
                        USB camera number. (Default=0)
  -wd CAMERA_WIDTH, --width CAMERA_WIDTH
                        Width of the frames in the video stream. (Default=640)
  -ht CAMERA_HEIGHT, --height CAMERA_HEIGHT
                        Height of the frames in the video stream.
                        (Default=480)
  -numncs NUMBER_OF_NCS, --numberofncs NUMBER_OF_NCS
                        Number of NCS. (Default=1)
  -vidfps FPS_OF_VIDEO, --fpsofvideo FPS_OF_VIDEO
                        FPS of Video. (Default=30)
  -fdmp FD_MODEL_PATH, --facedetectionmodelpath FD_MODEL_PATH
                        Face Detection model path. (xml and bin. Except
                        extension.)
  -emmp EM_MODEL_PATH, --emotionrecognitionmodelpath EM_MODEL_PATH
                        Emotion Recognition model path. (xml and bin. Except
                        extension.)

openvino-emotionrecognition's People

Contributors

miksadikov avatar pinto0309 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

openvino-emotionrecognition's Issues

Running for a long time and get no result from NCS

Hi, I got a weird problem while I'm trying to implement two difference tasks on NCS2 like you did in this work.

I bind a detection net and a recognition net to one NCS2, using async mode. It did work, but I found that if I set num_request for each net to 4 and run for some time, such like 10 minutes, the device status return from Wait() function will always be -9, which means the result is not ready. if I set num_request to 2, it can run for a longer time, such like 3hours, and if set to 1, it can run normally. Have you ever tried to run your program for a long time? I don't know if the problem is about overload..

I noticed that you only call the IEPlugin() function once, and bind those nets to the same plugin no matter how many NCSs you use, the only difference caused by the NCS number is the num_requests, am I right? Does it mean OpenVINO will automatically allocate those work on those NCS2?

Multi Face Emotion Detection

[Required] Your device (RaspberryPi3, LaptopPC, or other device name):
Intel NUC

[Required] Your device's CPU architecture (armv7l, x86_64, or other architecture name):
x86_64

[Required] Your OS (Raspbian, Ubuntu1604, or other os name):
Ubuntu 16.04

[Required] Details of the work you did before the problem occurred:
Ran the program as is with 1(one) NCS(not the NCS2)
[Required] Error message:
Emotion output is (0,0)
[Required] Overview of problems and questions:
Just curious if it is supposed to detect emotion on more than one face. When two people are in frame only one person gets an emotion recognized. While looking through your code it looks like it should go through the list of faces and detect emotion on them all but maybe I'm misreading it.

Thanks for any insight!

more NCS2

i have 2 NCS2
i want to USE 1-NCS2 to run first model and use another NCS2 to run second model,it is possible?
how do i set?

HDDL instead of MYRIAD

Hi there,

I'm trying to get it work on my Ubuntu with a PCIe Movidius. However, I can only use it with the "HDDL"-Device Tag instead of your used "MYRIAD". When I change the input device in your python script, it unfortunately doesn't work anymore (no error message, but simply no detection or anything else)
Do you have any ideas how to use it like that?

Thanks in regard

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.