Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
face-api.js
Project
Project
Details
Activity
Releases
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
allan
face-api.js
Commits
c6730978
Commit
c6730978
authored
May 08, 2019
by
vincent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added missing doc for utility classes
parent
2388f732
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
23 deletions
+26
-23
README.md
README.md
+26
-23
No files found.
README.md
View file @
c6730978
...
...
@@ -467,7 +467,7 @@ const detectionsWithLandmarks = await faceapi
// resize the detected boxes and landmarks in case your displayed image has a different size than the original
const
resizedResults
=
faceapi
.
resizeResults
(
detectionsWithLandmarks
,
displaySize
)
// draw detections into the canvas
faceapi
.
draw
.
drawDetections
(
canvas
,
resized
Detection
s
)
faceapi
.
draw
.
drawDetections
(
canvas
,
resized
Result
s
)
// draw the landmarks into the canvas
faceapi
.
draw
.
drawFaceLandmarks
(
canvas
,
resizedResults
)
...
...
@@ -480,7 +480,7 @@ const detectionsWithExpressions = await faceapi
// resize the detected boxes and landmarks in case your displayed image has a different size than the original
const
resizedResults
=
faceapi
.
resizeResults
(
detectionsWithExpressions
,
displaySize
)
// draw detections into the canvas
faceapi
.
draw
.
drawDetections
(
canvas
,
resized
Detection
s
)
faceapi
.
draw
.
drawDetections
(
canvas
,
resized
Result
s
)
// draw a textbox displaying the face expressions with minimum probability into the canvas
const
minProbability
=
0.05
faceapi
.
draw
.
drawFaceExpressions
(
canvas
,
resizedResults
,
minProbability
)
...
...
@@ -638,8 +638,6 @@ export interface IBox {
}
```
<a
name=
"interface-face-detection"
></a>
### IFaceDetection
```
javascript
...
...
@@ -649,8 +647,6 @@ export interface IFaceDetection {
}
```
<a
name=
"interface-face-landmarks"
></a>
### IFaceLandmarks
```
javascript
...
...
@@ -660,52 +656,59 @@ export interface IFaceLandmarks {
}
```
<a
name=
"with-face-detection"
></a>
### WithFaceDetection
```
javascript
export
type
WithFaceDetection
<
TSource
>
TSource
&
{
export
type
WithFaceDetection
<
TSource
>
=
TSource
&
{
detection
:
FaceDetection
}
```
<a
name=
"with-face-landmarks"
></a>
### WithFaceLandmarks
```
javascript
export
type
WithFaceLandmarks
<
TSource
>
TSource
&
{
export
type
WithFaceLandmarks
<
TSource
>
=
TSource
&
{
unshiftedLandmarks
:
FaceLandmarks
landmarks
:
FaceLandmarks
alignedRect
:
FaceDetection
}
```
<a
name=
"with-face-descriptor"
></a>
### WithFaceDescriptor
```
javascript
export
type
WithFaceDescriptor
<
TSource
>
TSource
&
{
export
type
WithFaceDescriptor
<
TSource
>
=
TSource
&
{
descriptor
:
Float32Array
}
```
<a
name=
"with-face-expressions"
></a>
### WithFaceExpressions
```
javascript
export
type
FaceExpression
=
'neutral'
|
'happy'
|
'sad'
|
'angry'
|
'fearful'
|
'disgusted'
|
'surprised'
export
type
WithFaceExpressions
<
TSource
>
=
TSource
&
{
expressions
:
FaceExpressions
}
```
### WithAge
```
javascript
export
type
WithAge
<
TSource
>
=
TSource
&
{
age
:
number
}
```
export
type
FaceExpressionPrediction
=
{
expression
:
FaceExpression
,
probability
:
number
### WithGender
```
javascript
export
type
WithGender
<
TSource
>
=
TSource
&
{
gender
:
Gender
genderProbability
:
number
}
export
type
WithFaceExpressions
<
TSource
>
TSource
&
{
expressions
:
FaceExpressionPrediction
[]
export
enum
Gender
{
FEMALE
=
'female'
,
MALE
=
'male'
}
```
...
...
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