Giter Site home page Giter Site logo

faceanalyzer's People

Contributors

parisneo 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

Watchers

 avatar  avatar  avatar  avatar

faceanalyzer's Issues

How are the face_3d_reference_positions calculated in Face.py?

Hi,
I have been using your FaceAnalyzer library and it has been super useful in estimating the head pose and blinking parameters, and now I am working on tracking the head position with respect to camera in cm and mapping the corresponding input to my screen object.

I have noticed that you have used
face_3d_reference_positions =np.array([ [0,0,0], # Nose tip #[-80,50,-90], # Left #[0,-70,-30], # Chin #[80,50,-90], # Right [-70,50,-70], # Left left eye [70,50,-70], # Right right eye [0,80,-30] # forehead center ])
I have couple of doubts

  1. I am curious on how are you were you able to get these values?
  2. I am trying to make sense of the position coordinates returned by the get_head_posture() , currently I am getting
    [[ 292.50133269] [-212.73998924] [ 580.38242832]]
    as x,y,z even when I am in centre of the camera.
    I was expecting something like [0,0,580] or am I missing any steps ?
    P.S. I did make few changes to make this library compatible with logitech c922 webcam at 1920x1080 resolution, since your current version doesn't completely support other webcam resolutions properly. I'll make sure to make the changes and raise a pull request soon. ๐Ÿ˜„

bug in face_box.py example

There appears to be a bug in line 100 of face_box.py. I think you want to convert back to BGR like this. When I did this it started showing the proper image:

    cv2.imshow('Face Mesh', cv2.cvtColor(image, cv2.COLOR_RGB2BGR))

How does the eye opening calculated?

In Face.py

ud = left_eye_upper-left_eye_lower
ex = left_eye_upper1-left_eye_upper0
ex /= np.linalg.norm(ex)
ey = np.cross(np.array([0,0,1]),ex)
left_eye_opening = np.dot(ud,ey)

May I know what is the meaning of the above code?

Unexpected exit with no traceback in eye_process.py and other OpenCV examples

In a clean environment with Python 3.9.13 installing only needed dependencies, eye_process.py and many other OpenCV examples either return empty arrays from Face.py or silently exit.

Root cause is the use of 'astype(np.[datatype])' throughout Face.py . Using native data types instead of the numpy prefixed data types where possible fixes this issue. I also found it works if the data type is changed to a data type explicitly listed out in the article below, such as 'np.intc' as opposed to 'np.int'. Not sure the reason why this is breaking it, but it may have to do with how NumPy handles array scalars (https://numpy.org/doc/stable/user/basics.types.html) . Let me know if you want me to make a pull request.

Cannot run examples

Hello @ParisNeo , thank you for sharing your valuable software.
I cloned the repo and ran:
python setup.py build
python setup.py install
then tried to run the face_mask example:
cd /examples/OpenCV/face_mask
python face_mask.py

but the program exited immediately:

$ python face_mask.py
/home/ianni/.virtualenvs/MP/lib/python3.8/site-packages/FaceAnalyzer-0.1.11-py3.8.egg/FaceAnalyzer/Face.py:1507: SyntaxWarning: assertion is always true, perhaps remove parentheses?
/home/ianni/.virtualenvs/MP/lib/python3.8/site-packages/FaceAnalyzer-0.1.11-py3.8.egg/FaceAnalyzer/Face.py:1507: SyntaxWarning: assertion is always true, perhaps remove parentheses?
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
$

Edit: I also tried creating a virtualenv and installing FaceAnalyzer from scratch with pip, according to the instructions:
pip install FaceAnalyzer

and then ran, again:

cd /examples/OpenCV/face_mask
python face_mask.py

and again, it did not work:

$ python face_mask.py 
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
$

What can I do?

face_recognize_facenet error (ValueError: bad marshal data (unknown type code))

Hi Im a newbie and I was trying the face_recognize examples. the face_recognize (without facenet) is very fast but it is unreliable even if I did have multiple photos of the person. how many photos do you recommend for this model to be accurate?

Since the non facenet model is not so reliable I tried to use the facenet example and I encountered this issue.

2023-02-16 18:00:22.606014: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll';
dlerror: cudart64_110.dll not found
2023-02-16 18:00:22.606447: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "c:\Users\John Garcia\PycharmProjects\Face Analyzer\FaceAnalyzer\examples\OpenCV\face_recognize_facenet\face_recognize.py", line 29, in

facenet = tf.keras.models.load_model(str(facenet_path))
File "C:\Users\John Garcia\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\John Garcia\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\utils\generic_utils.py", line 857, in func_load
code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)

I hope you can help me fix this issue and point me to the right direction. Thank you for this wonderful project that you've share

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.