Comments (10)
Thanks @ctippur. I switched from using Dlib facial landmark model to a TensorFlow model which I am pretty sure you can find in the repo. However, if you want to continue to use Dlib you can download the model from here: https://github.com/davisking/dlib-models/blob/master/shape_predictor_68_face_landmarks.dat.bz2.
Hope that solves the issue.
from proctoring-ai.
Thanks @vardanagarwal. I am looking for the most accurate method to determine the location points. If I understand right, TF model is a better way to go?
from proctoring-ai.
Yeah, based on my testing I felt is was better. You can have a look at the results here: https://towardsdatascience.com/robust-facial-landmarks-for-occluded-angled-faces-925e465cbf2e?sk=505eb1101576227f4c38474092dd4c22
from proctoring-ai.
Vardan,
Thank you. Thats quite impressive.
I modified contouring function to see if I can get just the center of pupil coordinates.
I seem to be getting a lot of (<class 'ValueError'>, ValueError('max() arg is an empty sequence'), <traceback object at 0x148fe4b90>)
I would also like to improve the precision. Any ideas on how I can improve the precision and not lose frames?
try:
cnt = max(cnts, key = cv2.contourArea)
M = cv2.moments(cnt)
cx = int(M['m10']/M['m00'])
cy = int(M['m01']/M['m00'])
if right:
cx += mid
return eye, cx, cy
except:
print (sys.exc_info())
return eye, None, None
from proctoring-ai.
That's to do with the threshold. If your threshold is very small then no contour will be detected leading to that error. You can add an if condition checking that length of cnts>0.
I am trying to figure out to automate the thresholding part then this won't be an issue.
Can you elaborate what you mean by precision here and why you feel it might lose frames if it is tried to be improved.
from proctoring-ai.
You are right. The threshold for the most part seem to be 0.
I will have to look at the precision question again. I have a still video and I was hoping to see the cx and cy to pretty much be the same. Since so many frames are being rejected.
To increase the threshold, I am looking at some variatiobs below. Let me know if we can collaborate.
thresh = cv2.erode(thresh, None, iterations=2)
thresh = cv2.dilate(thresh, None, iterations=4)
thresh = cv2.medianBlur(thresh, 3)
thresh = cv2.bitwise_not(thresh)
from proctoring-ai.
Yeah sure! As mentioned earlier it is currently controlled by a trackbar which means it requires manual work so I am definitely up for it.
from proctoring-ai.
Quick benchmarking
| Threshold | Left x | left y | right x | right y |
|----------|:-------------:|------:|------:|------:|
| 1 | 180 | 180| 199 | 199 |
|3|165|165|180|180|
from proctoring-ai.
It would be better to close this issue and open up another one having the apt name so that anyone else looking to contribute can find it.
from proctoring-ai.
Perfect. Closing this to reopen another issue.
from proctoring-ai.
Related Issues (20)
- IndexError: list index out of range HOT 1
- Ang1 and ang2 in head_pose_estimation.py file HOT 1
- How is the detection of more than one person done?
- Can you tell where is this file attached shape_68.dat HOT 3
- About .dat files HOT 1
- cv2.solvepnp undistort error
- problem in running the project HOT 5
- HIAYPR - PROCTORING APP HOT 1
- .
- Samples of video HOT 1
- in camera.py related to Proctoring-AI project HOT 1
- Unable to import dlib. Does dlib need a GPU compulsorily? HOT 3
- Error while running face_spoofing.py HOT 2
- Error when running head_pose_estimation.py HOT 1
- ModuleNotFoundError: joblib
- Where to get model_points from? HOT 1
- Model files for dlib for eye tracking
- [Status] Is this repo active? HOT 1
- 'Tensor' object cannot be interpreted as an integer
- Python and dependecies version HOT 1
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 proctoring-ai.