Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
ca948697
Commit
ca948697
authored
Feb 02, 2021
by
lucas_miranda
Browse files
Fixed a bug that introduced an additional ghost data point when applying smoothing
parent
325d1b9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
deepof/data.py
View file @
ca948697
...
...
@@ -210,7 +210,7 @@ class project:
)
tab_dict
[
key
]
=
pd
.
concat
([
x
,
y
],
axis
=
1
).
sort_index
(
axis
=
1
)
lik_dict
[
key
]
=
lik
lik_dict
[
key
]
=
lik
.
droplevel
(
"scorer"
,
axis
=
1
)
if
self
.
smooth_alpha
:
...
...
@@ -225,7 +225,7 @@ class project:
)
)
smooth
.
columns
=
cols
tab_dict
[
key
]
=
smooth
.
iloc
[
1
:,
:]
tab_dict
[
key
]
=
smooth
.
iloc
[
1
:,
:]
.
reset_index
(
drop
=
True
)
for
key
,
tab
in
tab_dict
.
items
():
tab_dict
[
key
]
=
tab
[
tab
.
columns
.
levels
[
0
][
0
]]
...
...
deepof/pose_utils.py
View file @
ca948697
...
...
@@ -663,6 +663,8 @@ def tag_rulebased_frames(
),
thickness
=-
1
,
)
# Print frame number
write_on_frame
(
"Frame "
+
str
(
fnum
),
corners
[
"downleft"
])
if
tag_dict
[
"nose2nose"
][
fnum
]
and
not
tag_dict
[
"sidebyside"
][
fnum
]:
write_on_frame
(
"Nose-Nose"
,
conditional_pos
())
...
...
deepof/utils.py
View file @
ca948697
...
...
@@ -427,8 +427,8 @@ def interpolate_outliers(
exclude
:
str
,
lag
:
int
=
5
,
n_std
:
int
=
3
,
mode
:
str
=
"
and
"
,
limit
:
int
=
5
,
mode
:
str
=
"
or
"
,
limit
:
int
=
1
5
,
):
"""Marks all outliers in experiment and replaces them using a univariate linear interpolation approach.
Note that this approach only works for equally spaced data (constant camera acquisition rates).
...
...
@@ -437,9 +437,9 @@ def interpolate_outliers(
- experiment (pd.DataFrame): dataframe with time series representing the x, y positions of a every body part
- lag (int): size of the convolution window used to compute the moving average
- n_std (int): number of standard deviations over the moving average to be considered an outlier
- mode (str): if "and"
(default)
both x and y have to be marked in order to call an outlier.
If "or", one is enough
- limit (int): maximum of consecutive outliers to interpolate. Defaults to 5
- mode (str): if "and" both x and y have to be marked in order to call an outlier.
If "or"
(default)
, one is enough
- limit (int): maximum of consecutive outliers to interpolate. Defaults to
1
5
Returns:
interpolated_exp (pd.DataFrame): Interpolated version of experiment
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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