Comments (6)
Hi @Strateus - why is there a big probability the points will be outside the range? Do you have examples where this is failing for reasonable images? I haven't extensively profiled or tested this portion of code, but the alignment code works for 13081 out of 13233 images from the LFW dataset.
This code portion checks if the boundary points of the detected landmarks are outside of the image, which should only happen in extreme cases like if somebody's face is outside of the image. There may be heuristics that can improve this, like filling in the missing portions with black pixels or using image completion.
from openface.
Well, i used my web camera, and added 30% margins to face, and still after warping there were points out of warped image all the time i tried, maybe 5% it was ok, but rest failed.
Anyways i would consider this check to be more thorough since you transform only on eyes and nose. Just thoughts, i elminated this check locally and will be testing it.
from openface.
Code reference:
openface/openface/alignment/naive_dlib.py
Line 140 in 3dba58e
from openface.
Be careful when expanding the margins since the neural network nn4.v1.t7
is trained with no margin added. I wouldn't be surprised if this severely hurts the accuracy.
You need to train a new neural network if you want to add margins.
Note that in a few experiments I ran, adding a margin didn't improve the accuracy,
which is why there is no margin in nn4.v1.t7
.
Also, won't eliminating the check cause array out of bounds errors in:
cwImg = cv2.resize(warpedImg[t:b, l:r], (size, size))
from openface.
Yea i got the point about network. Accuracy is not my primary concern now.
As for eliminating, i did it like this:
l = 0 if l < 0 else l
r = w if r > w else r
t = 0 if t < 0 else t
b = h if b > h else b
from openface.
Fixed with the new alignment technique.
from openface.
Related Issues (20)
- File "<ipython-input-20-09d287cbe6a8>", line 3 HOT 1
- can't able to detect faces when video is passed HOT 1
- WebDemo HOT 1
- ok I have already solved it by copying the shape_predictor_68_face_landmarks.dat file in the same directory as my python file. Thanks. HOT 2
- grid_search.py error ? HOT 1
- openface.align_dlib understanding question HOT 1
- Dokerfile detection:You may setup Docker deployment run configuration following file//Dockerfile//disable this notification HOT 1
- Windows installation problems HOT 3
- I cannot find the nn4.small2.v1.t7 in the models file HOT 2
- Exception: could not convert string to float while running comparison demo
- how can i use head pose tracking or gaze tracking from python code?
- localhost:8000 says Error fetching video from webcam HOT 1
- I am getting error when trying to load the "openface.nn4.small2.v1.t7" with opencv 4.5.1
- how to resolve this issue: predictor = dlib.shape_predictor(p) RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat
- RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat .......i have tried to put this in the same directory also....and downloaded latest version and uncompressed it and still this issue is not getting solved. Please Help HOT 3
- in the compare.py what should i add in the path of Torch network model HOT 1
- OpenFace models in commercial use, not Dlib models
- Why getALLFaceBoundingBoxes(img) return nothing, no erorr, no result. HOT 1
- Python runtime error
- Hehe
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 openface.