Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/test_dataset_augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
#
# Licensed under GNU Lesser General Public License v3.0
#
import imgaug.augmenters as iaa
import numpy as np
import pytest

from deeplabcut.pose_estimation_tensorflow.datasets import augmentation

tf = pytest.importorskip(
"tensorflow",
reason="TensorFlow not installed (use a project extra such as .[tf])",
)

import imgaug.augmenters as iaa # noqa: E402

from deeplabcut.pose_estimation_tensorflow.datasets import augmentation # noqa: E402


@pytest.mark.parametrize(
"width, height",
Expand Down
12 changes: 6 additions & 6 deletions tests/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
import pandas as pd
import pytest

import deeplabcut.pose_estimation_tensorflow as pet
from deeplabcut.pose_estimation_tensorflow.core.evaluate import (
get_available_requested_snapshots,
get_snapshots_by_index,
)

tf = pytest.importorskip(
"tensorflow",
reason="TensorFlow not installed (use a project extra such as .[tf])",
)

import deeplabcut.pose_estimation_tensorflow as pet # noqa: E402
from deeplabcut.pose_estimation_tensorflow.core.evaluate import ( # noqa: E402
get_available_requested_snapshots,
get_snapshots_by_index,
)


def make_single_animal_rmse_df(
bodyparts,
Expand Down
11 changes: 6 additions & 5 deletions tests/test_pose_multianimal_imgaug.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
import pytest

from deeplabcut.core.config import read_config_as_dict, write_config
from deeplabcut.pose_estimation_tensorflow.datasets import (
Batch,
PoseDatasetFactory,
pose_multianimal_imgaug,
)

tf = pytest.importorskip(
"tensorflow",
reason="TensorFlow not installed (use a project extra such as .[tf])",
)

from deeplabcut.pose_estimation_tensorflow.datasets import ( # noqa: E402
Batch,
PoseDatasetFactory,
pose_multianimal_imgaug,
)


def mock_imread(path, mode):
return (np.random.rand(400, 400, 3) * 255).astype(np.uint8)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_predict_multianimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
import numpy as np
import pytest

from deeplabcut.pose_estimation_tensorflow.core import predict_multianimal

tf = pytest.importorskip(
"tensorflow",
reason="TensorFlow not installed (use a project extra such as .[tf])",
)

from deeplabcut.pose_estimation_tensorflow.core import predict_multianimal # noqa: E402

RADIUS = 5
THRESHOLD = 0.01
STRIDE = 8
Expand Down
9 changes: 8 additions & 1 deletion tests/test_predict_supermodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
import numpy as np
import pytest

from deeplabcut.pose_estimation_tensorflow.modelzoo.api import superanimal_inference
tf = pytest.importorskip(
"tensorflow",
reason="TensorFlow not installed (use a project extra such as .[tf])",
)

from deeplabcut.pose_estimation_tensorflow.modelzoo.api import ( # noqa: E402
superanimal_inference,
)


def test_get_multi_scale_frames():
Expand Down
Loading