Comments (5)
Hi! You are correct in that there are issues with the eye open/closed features. I am currently doing some ugly threshold things in C# to actually work with those values for avatar animation. You can see the code here:
OpenSeeFace/Examples/OpenSeeVRMDriver.cs
Lines 1065 to 1126 in 1e41001
I'm not exactly sure where the issues are and how to fix them though.
from openseeface.
Hi.I figured why the ratios were so variant and it's because the landmarks x,y coordinates are based on the whole frame not the detected face frame so when someone is closer to the camera the ratio gets larger and vice versa so I mapped the landmarks to the detected face frame and it got so much better but still it's variant depending on the different individuals understandably.
it's my code:
def lms_on_face (f,frame):
height, width, channels = frame.shape
lms = f.lms
face_bbox = f.bbox
face_x = face_bbox[0]
face_y = face_bbox[1]
face_w = face_bbox[2] + face_x
face_h = face_bbox[3] + face_y
face = frame[int(face_y):int(face_h),int(face_x):int(face_w)]
face_h,face_w,_ = frame[int(face_y):int(face_h),int(face_x):int(face_w)].shape
face_x = 0
face_y = 0
frame_bbox = (0,0,width,height)
fx = 0
fy = 0
fw = width
fh = height
points = [36,37,38,39,40,41]
for i , (x,y,c) in enumerate(lms):
if i in points:
x = translate(x,0,fw,0,face_w)
y = translate(y,0,fh,0,face_h)
lms[i] = (x,y,c)
return lms
then I use the ratio formula and get an average based on both eyes.hope it helps someone.
from openseeface.
Interesting, that makes sense! Thank you for posting your solution to this issue!
Thinking about it some more, if this was the cause, you could also try using f.pts_3d
for your calculation as it should be somewhat pose invariant.
from openseeface.
from openseeface.
The order of landmarks is the same. There are additional points for the guesstimated eyeball centers in pts_3d.
from openseeface.
Related Issues (20)
- About generating landmark heatmap offset groud truth label HOT 3
- onnxruntime-gpu (CUDA/TensorRT) support HOT 1
- [FR] VMC support HOT 10
- Unable to fulfill dependencies HOT 13
- Packets on 369 of facetracker.py fail with VPN enabled HOT 2
- [SUGGESTION] officially support OpenSeeFace as a flatpak HOT 8
- Using the project for API HOT 2
- [Compatibility request] Unity Barracuda ML solution support for the .onnx models in project HOT 6
- Extracting face with quaternion points HOT 3
- error in converting onnx models to tensorflow HOT 5
- Worse performance of released pytorch models HOT 1
- NumPy 1.24 breaks pupil/gaze tracking HOT 2
- Detection model without onnxruntime HOT 2
- Documenting UDP protocol HOT 1
- [Question] Camera opened by dshowcapture has changed? HOT 1
- model loading error HOT 5
- randomly black out when ir tracking (lenovo 500) HOT 2
- Openseeface runs but vseeface cannot communicate with it. HOT 1
- The Lazy Eye HOT 1
- [Help Request] Opens exe, then it quickly closes? HOT 2
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 openseeface.