Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
face
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
face
Commits
d5d9ba7e
Commit
d5d9ba7e
authored
Oct 16, 2018
by
vincent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default minConfidence to 0.5 + fixed webcam example for firefox
parent
652d3442
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
22 deletions
+23
-22
faceDetectionControls.js
examples/public/js/faceDetectionControls.js
+1
-1
bbtFaceRecognition.html
examples/views/bbtFaceRecognition.html
+1
-1
faceDetection.html
examples/views/faceDetection.html
+1
-1
faceExtraction.html
examples/views/faceExtraction.html
+1
-1
faceLandmarkDetection.html
examples/views/faceLandmarkDetection.html
+1
-1
faceRecognition.html
examples/views/faceRecognition.html
+1
-1
videoFaceTracking.html
examples/views/videoFaceTracking.html
+1
-1
webcamFaceTracking.html
examples/views/webcamFaceTracking.html
+16
-15
No files found.
examples/public/js/faceDetectionControls.js
View file @
d5d9ba7e
...
...
@@ -6,7 +6,7 @@ const MTCNN = 'mtcnn'
let
selectedFaceDetector
=
SSD_MOBILENETV1
// ssd_mobilenetv1 options
let
minConfidence
=
0.
7
let
minConfidence
=
0.
5
// tiny_face_detector options
let
inputSize
=
512
...
...
examples/views/bbtFaceRecognition.html
View file @
d5d9ba7e
...
...
@@ -60,7 +60,7 @@
<div
class=
"row side-by-side"
>
<div
class=
"row"
>
<label
for=
"minConfidence"
>
Min Confidence:
</label>
<input
disabled
value=
"0.
7
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
<input
disabled
value=
"0.
5
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
</div>
<button
class=
"waves-effect waves-light btn"
...
...
examples/views/faceDetection.html
View file @
d5d9ba7e
...
...
@@ -57,7 +57,7 @@
<div
class=
"row side-by-side"
>
<div
class=
"row"
>
<label
for=
"minConfidence"
>
Min Confidence:
</label>
<input
disabled
value=
"0.
7
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
<input
disabled
value=
"0.
5
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
</div>
<button
class=
"waves-effect waves-light btn"
...
...
examples/views/faceExtraction.html
View file @
d5d9ba7e
...
...
@@ -54,7 +54,7 @@
<div
class=
"row side-by-side"
>
<div
class=
"row"
>
<label
for=
"minConfidence"
>
Min Confidence:
</label>
<input
disabled
value=
"0.
7
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
<input
disabled
value=
"0.
5
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
</div>
<button
class=
"waves-effect waves-light btn"
...
...
examples/views/faceLandmarkDetection.html
View file @
d5d9ba7e
...
...
@@ -57,7 +57,7 @@
<div
class=
"row side-by-side"
>
<div
class=
"row"
>
<label
for=
"minConfidence"
>
Min Confidence:
</label>
<input
disabled
value=
"0.
7
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
<input
disabled
value=
"0.
5
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
</div>
<button
class=
"waves-effect waves-light btn"
...
...
examples/views/faceRecognition.html
View file @
d5d9ba7e
...
...
@@ -95,7 +95,7 @@
<div
class=
"row side-by-side"
>
<div
class=
"row"
>
<label
for=
"minConfidence"
>
Min Confidence:
</label>
<input
disabled
value=
"0.
7
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
<input
disabled
value=
"0.
5
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
</div>
<button
class=
"waves-effect waves-light btn"
...
...
examples/views/videoFaceTracking.html
View file @
d5d9ba7e
...
...
@@ -62,7 +62,7 @@
<div
class=
"row side-by-side"
>
<div
class=
"row"
>
<label
for=
"minConfidence"
>
Min Confidence:
</label>
<input
disabled
value=
"0.
7
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
<input
disabled
value=
"0.
5
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
</div>
<button
class=
"waves-effect waves-light btn"
...
...
examples/views/webcamFaceTracking.html
View file @
d5d9ba7e
...
...
@@ -63,7 +63,7 @@
<div
class=
"row side-by-side"
>
<div
class=
"row"
>
<label
for=
"minConfidence"
>
Min Confidence:
</label>
<input
disabled
value=
"0.
7
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
<input
disabled
value=
"0.
5
"
id=
"minConfidence"
type=
"text"
class=
"bold"
>
</div>
<button
class=
"waves-effect waves-light btn"
...
...
@@ -162,29 +162,33 @@
$
(
'#fps'
).
val
(
`
${
faceapi
.
round
(
1000
/
avgTimeInMs
)}
`
)
}
async
function
onPlay
(
videoEl
)
{
async
function
onPlay
()
{
const
videoEl
=
$
(
'#inputVideo'
).
get
(
0
)
if
(
videoEl
.
paused
||
videoEl
.
ended
||
!
isFaceDetectionModelLoaded
())
return
setTimeout
(()
=>
onPlay
(
videoEl
))
return
setTimeout
(()
=>
onPlay
())
const
options
=
getFaceDetectorOptions
()
const
ts
=
Date
.
now
()
const
faceDetectionTask
=
faceapi
.
detect
AllFaces
(
videoEl
,
options
)
const
result
s
=
withFaceLandmarks
const
faceDetectionTask
=
faceapi
.
detect
SingleFace
(
videoEl
,
options
)
const
result
=
withFaceLandmarks
?
await
faceDetectionTask
.
withFaceLandmarks
()
:
await
faceDetectionTask
updateTimeStats
(
Date
.
now
()
-
ts
)
const
drawFunction
=
withFaceLandmarks
?
drawLandmarks
:
drawDetections
if
(
result
)
{
const
drawFunction
=
withFaceLandmarks
?
drawLandmarks
:
drawDetections
drawFunction
(
videoEl
,
$
(
'#overlay'
).
get
(
0
),
results
,
withBoxes
)
drawFunction
(
videoEl
,
$
(
'#overlay'
).
get
(
0
),
[
result
],
withBoxes
)
}
setTimeout
(()
=>
onPlay
(
videoEl
))
setTimeout
(()
=>
onPlay
())
}
async
function
run
()
{
...
...
@@ -195,12 +199,9 @@
// try to access users webcam and stream the images
// to the video element
const
stream
=
await
navigator
.
mediaDevices
.
getUserMedia
({
video
:
{}
})
const
videoEl
=
$
(
'#inputVideo'
).
get
(
0
)
navigator
.
getUserMedia
(
{
video
:
{}
},
stream
=>
videoEl
.
srcObject
=
stream
,
err
=>
console
.
error
(
err
)
)
videoEl
.
srcObject
=
stream
}
function
updateResults
()
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment