Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
e1267e0e
Commit
e1267e0e
authored
Jun 01, 2013
by
Davis King
Browse files
slightly improved example
parent
5e761ca7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
python_examples/sequence_segmenter.py
python_examples/sequence_segmenter.py
+6
-1
No files found.
python_examples/sequence_segmenter.py
View file @
e1267e0e
...
...
@@ -62,7 +62,8 @@ training_sequences[0].append(outside) # index 6
training_sequences
[
0
].
append
(
outside
)
# index 7
segments
[
0
].
append
(
dlib
.
range
(
2
,
5
))
# Add another training sequence
# Add another training sequence. This one is a little longer and has two "inside" segments
# which should be detected.
training_sequences
[
1
].
append
(
outside
)
# index 0
training_sequences
[
1
].
append
(
outside
)
# index 1
training_sequences
[
1
].
append
(
inside
)
# index 2
...
...
@@ -71,7 +72,11 @@ training_sequences[1].append(inside) # index 4
training_sequences
[
1
].
append
(
inside
)
# index 5
training_sequences
[
1
].
append
(
outside
)
# index 6
training_sequences
[
1
].
append
(
outside
)
# index 7
training_sequences
[
1
].
append
(
outside
)
# index 8
training_sequences
[
1
].
append
(
inside
)
# index 9
training_sequences
[
1
].
append
(
inside
)
# index 10
segments
[
1
].
append
(
dlib
.
range
(
2
,
6
))
segments
[
1
].
append
(
dlib
.
range
(
9
,
11
))
# Now that we have a simple training set we can train a sequence segmenter. However, the
...
...
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