Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Python package

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:
Expand All @@ -30,10 +30,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
34 changes: 27 additions & 7 deletions NOTICE.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This notice file contains license headers for all code files
# in the repository (currently all *.py files).
#
#
# When updating headers, lower entries take precedence over higher
# entries. For each header, include/exclude statements can be used
# to define files to apply them to.
#
# When adding code from an external repo, make sure to cover the
# When adding code from an external repo, make sure to cover the
# added code files with the correct license header.

# Main repository license
Expand All @@ -20,7 +20,7 @@
Licensed under GNU Lesser General Public License v3.0
include:
- 'deeplabcut/**/*.py'
- 'tests/**/*.py'
- 'tests/**/*.py'
- 'examples/**/*.py'
- 'docs/**/*.py'
- 'conda-environments/**/*.yaml'
Expand Down Expand Up @@ -61,13 +61,13 @@
# Tensorflow licenses
- header: |
Copyright 2019 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -85,7 +85,7 @@
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -116,3 +116,23 @@
https://github.com/rwightman/pytorch-image-models/blob/main/timm/scheduler/scheduler_factory.py
include:
- deeplabcut/pose_tracking_pytorch/solver/scheduler_factory.py
- deeplabcut/pose_tracking_pytorch/model/backones/vit_pytorch.py

# Reranking
- header: |
"""
CVPR2017 paper:Zhong Z, Zheng L, Cao D, et al. Re-ranking Person Re-identification with k-reciprocal Encoding[J]. 2017.
url:http://openaccess.thecvf.com/content_cvpr_2017/papers/Zhong_Re-Ranking_Person_Re-Identification_CVPR_2017_paper.pdf
Matlab version: https://github.com/zhunzhong07/person-re-ranking

API

probFea: all feature vectors of the query set (torch tensor)
probFea: all feature vectors of the gallery set (torch tensor)
k1,k2,lambda: parameters, the original paper is (k1=20,k2=6,lambda=0.3)
MemorySave: set to 'True' when using MemorySave mode
Minibatch: available when 'MemorySave' is 'True'
"""

include:
- deeplabcut/pose_tracking_pytorch/trackingutils/reranking.py
19 changes: 10 additions & 9 deletions deeplabcut/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"""
DeepLabCut2.0 Toolbox (deeplabcut.org)
© A. & M. Mathis Labs
https://github.com/DeepLabCut/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# Licensed under GNU Lesser General Public License v3.0
#

Please see AUTHORS for contributors.
https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""

import os

Expand Down Expand Up @@ -121,4 +123,3 @@
find_outliers_in_raw_data,
)
from deeplabcut.post_processing import filterpredictions, analyzeskeleton

18 changes: 10 additions & 8 deletions deeplabcut/__main__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"""
DeepLabCut2.0 Toolbox (deeplabcut.org)
© A. & M. Mathis Labs
https://github.com/DeepLabCut/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# Licensed under GNU Lesser General Public License v3.0
#

Please see AUTHORS for contributors.
https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""
try:
import PySide6

Expand Down
11 changes: 7 additions & 4 deletions deeplabcut/benchmark/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# DeepLabCut2.0 Toolbox (deeplabcut.org)
# © A. & M. Mathis Labs
# https://github.com/AlexEMG/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
# Licensed under GNU Lesser General Public License v3.0
#


import json
Expand Down
11 changes: 7 additions & 4 deletions deeplabcut/benchmark/__main__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# DeepLabCut2.0 Toolbox (deeplabcut.org)
# © A. & M. Mathis Labs
# https://github.com/AlexEMG/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
# Licensed under GNU Lesser General Public License v3.0
#

from deeplabcut.benchmark.cli import main

Expand Down
11 changes: 7 additions & 4 deletions deeplabcut/benchmark/base.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# DeepLabCut2.0 Toolbox (deeplabcut.org)
# © A. & M. Mathis Labs
# https://github.com/AlexEMG/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
# Licensed under GNU Lesser General Public License v3.0
#

"""Base classes for benchmark and result definition

Expand Down
11 changes: 7 additions & 4 deletions deeplabcut/benchmark/benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# DeepLabCut2.0 Toolbox (deeplabcut.org)
# © A. & M. Mathis Labs
# https://github.com/AlexEMG/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
# Licensed under GNU Lesser General Public License v3.0
#

"""Definition for official DeepLabCut benchmark tasks.

Expand Down
11 changes: 7 additions & 4 deletions deeplabcut/benchmark/cli.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# DeepLabCut2.0 Toolbox (deeplabcut.org)
# © A. & M. Mathis Labs
# https://github.com/AlexEMG/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
# Licensed under GNU Lesser General Public License v3.0
#

"""Command line interface for DeepLabCut deeplabcut.benchmark."""

Expand Down
11 changes: 7 additions & 4 deletions deeplabcut/benchmark/metrics.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# DeepLabCut2.0 Toolbox (deeplabcut.org)
# © A. & M. Mathis Labs
# https://github.com/AlexEMG/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
# Licensed under GNU Lesser General Public License v3.0
#

"""Evaluation metrics for the DeepLabCut benchmark."""

Expand Down
11 changes: 7 additions & 4 deletions deeplabcut/benchmark/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# DeepLabCut2.0 Toolbox (deeplabcut.org)
# © A. & M. Mathis Labs
# https://github.com/AlexEMG/DeepLabCut
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
# Licensed under GNU Lesser General Public License v3.0
#

"""Helper functions in this file are not affected by the main repositories
license. They are independent from the remainder of the benchmarking code.
Expand Down
20 changes: 11 additions & 9 deletions deeplabcut/cli.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"""
DeepLabCut2.0 Toolbox (deeplabcut.org)
© A. & M. Mathis Labs
https://github.com/DeepLabCut/DeepLabCut
Please see AUTHORS for contributors.

https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# Licensed under GNU Lesser General Public License v3.0
#

from pathlib import Path

import click
Expand Down
10 changes: 10 additions & 0 deletions deeplabcut/create_project/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# Licensed under GNU Lesser General Public License v3.0
#
from deeplabcut.create_project.add import add_new_videos
from deeplabcut.create_project.demo_data import load_demo_data
from deeplabcut.create_project.modelzoo import (
Expand Down
23 changes: 12 additions & 11 deletions deeplabcut/create_project/add.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""
DeepLabCut2.2 Toolbox (deeplabcut.org)
© A. & M. Mathis Labs
https://github.com/DeepLabCut/DeepLabCut
Please see AUTHORS for contributors.

https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# Licensed under GNU Lesser General Public License v3.0
#


def add_new_videos(config, videos, copy_videos=False, coords=None, extract_frames=False):
Expand Down Expand Up @@ -74,7 +75,7 @@ def add_new_videos(config, videos, copy_videos=False, coords=None, extract_frame
else:
print("Copying the videos")
shutil.copy(os.fspath(src), os.fspath(dst))

else:
# creates the symlinks of the video and puts it in the videos directory.
print("Attempting to create a symbolic link of the video ...")
Expand All @@ -100,7 +101,7 @@ def add_new_videos(config, videos, copy_videos=False, coords=None, extract_frame
print("{} moved to {}".format(src, dst))
videos = destinations



if copy_videos:
videos = destinations # in this case the *new* location should be added to the config file
Expand Down
29 changes: 15 additions & 14 deletions deeplabcut/create_project/demo_data.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""
DeepLabCut2.2 Toolbox (deeplabcut.org)
© A. & M. Mathis Labs
https://github.com/DeepLabCut/DeepLabCut
Please see AUTHORS for contributors.

https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# Licensed under GNU Lesser General Public License v3.0
#

import os
from pathlib import Path
Expand All @@ -17,17 +18,17 @@

def load_demo_data(config, createtrainingset=True):
"""
Loads the demo data -- subset from trail-tracking data in Mathis et al. 2018.
Loads the demo data -- subset from trail-tracking data in Mathis et al. 2018.
When loading, it sets paths correctly to run this project on your system

Parameter
----------
config : string
Full path of the config.yaml file of the provided demo dataset as a string.

createtrainingset : bool
Boolean variable indicating if a training set shall be created.
createtrainingset : bool
Boolean variable indicating if a training set shall be created.

Example
--------
>>> deeplabcut.load_demo_data('config.yaml')
Expand Down
Loading