Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* version update

* update headers

* header update

* update notice file

* black .
  • Loading branch information
AlexEMG authored Mar 18, 2023
1 parent a8192cd commit 204310b
Show file tree
Hide file tree
Showing 19 changed files with 147 additions and 49 deletions.
31 changes: 1 addition & 30 deletions NOTICE.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# 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
# added code files with the correct license header.

# Main repository license
- header: |
DeepLabCut Toolbox (deeplabcut.org)
Expand All @@ -23,7 +13,7 @@
- 'tests/**/*.py'
- 'examples/**/*.py'
- 'docs/**/*.py'
- 'conda-environments/**/*.yaml'
#- 'conda-environments/**/*.yaml'

# License for files adapted from DeeperCut by Eldar Insafutdinov
# https://github.com/eldar/pose-tensorflow
Expand Down Expand Up @@ -117,22 +107,3 @@
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
2 changes: 1 addition & 1 deletion conda-environments/DEEPLABCUT.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DEEPLABCUT.yaml

#DeepLabCut2.0 Toolbox (deeplabcut.org)
#© A. & M. Mathis Labs
#© A. & M.W. Mathis Labs
#https://github.com/DeepLabCut/DeepLabCut
#Please see AUTHORS for contributors.

Expand Down
2 changes: 1 addition & 1 deletion conda-environments/DEEPLABCUT_M1.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DEEPLABCUT_M1.yaml

#DeepLabCut2.0 Toolbox (deeplabcut.org)
#© A. & M. Mathis Labs
#© A. & M.W. Mathis Labs
#https://github.com/DeepLabCut/DeepLabCut
#Please see AUTHORS for contributors.

Expand Down
10 changes: 10 additions & 0 deletions deeplabcut/gui/tabs/modelzoo.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
#
import deeplabcut
from PySide6 import QtWidgets
from PySide6.QtCore import Qt, Signal, QTimer
Expand Down
10 changes: 10 additions & 0 deletions deeplabcut/modelzoo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# 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
#
10 changes: 10 additions & 0 deletions deeplabcut/modelzoo/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
#
# 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 .spatiotemporal_adapt import SpatiotemporalAdaptation
10 changes: 10 additions & 0 deletions deeplabcut/modelzoo/api/spatiotemporal_adapt.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
#
import deeplabcut
import glob
import os
Expand Down
10 changes: 10 additions & 0 deletions deeplabcut/modelzoo/api/superanimal_inference.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
#
import os
import os.path
import pickle
Expand Down
10 changes: 10 additions & 0 deletions deeplabcut/modelzoo/utils.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
#
import json
import os

Expand Down
10 changes: 10 additions & 0 deletions deeplabcut/pose_estimation_tensorflow/predict_supermodel.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 pathlib import Path
from deeplabcut.modelzoo.api import SpatiotemporalAdaptation

Expand Down
10 changes: 10 additions & 0 deletions deeplabcut/pose_tracking_pytorch/model/backbones/vit_pytorch.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
#
""" Vision Transformer (ViT) in PyTorch
A PyTorch implement of Vision Transformers as described in
Expand Down
35 changes: 21 additions & 14 deletions deeplabcut/pose_tracking_pytorch/tracking_utils/reranking.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
"""
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'
"""

#
# 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 numpy as np
import torch


def re_ranking(
probFea, galFea, k1, k2, lambda_value, local_distmat=None, only_local=False
):
"""
probFea: all feature vectors of the query set (torch tensor)
galFea: all feature vectors of the gallery set (torch tensor)
k1,k2,lambda: parameters, the original paper uses (k1=20,k2=6,lambda=0.3)
Code adapted from https://github.com/zhunzhong07/person-re-ranking
Zhong Z, Zheng L, Cao D, et al. Re-ranking Person Re-identification with k-reciprocal Encoding CVPR 2017.
"""
# if feature vector is numpy, you should use 'torch.tensor' transform it to tensor
query_num = probFea.size(0)
all_num = query_num + galFea.size(0)
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# Licensed under GNU Lesser General Public License v3.0
#

__version__ = "2.3.1"
__version__ = "2.3.2"
VERSION = __version__
2 changes: 1 addition & 1 deletion examples/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rm -r OUT
cd ..
pip uninstall deeplabcut
python3 setup.py sdist bdist_wheel
pip install dist/deeplabcut-2.3.1-py3-none-any.whl
pip install dist/deeplabcut-2.3.2-py3-none-any.whl

cd examples

Expand Down
10 changes: 10 additions & 0 deletions examples/testscript_superanimal_adaptation.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
#
"""
Test script for super animal adaptation
"""
Expand Down
10 changes: 10 additions & 0 deletions examples/testscript_superanimal_inference.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
#
"""
Testscript for super animal inference
Expand Down
2 changes: 1 addition & 1 deletion reinstall.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pip uninstall deeplabcut
python3 setup.py sdist bdist_wheel
pip install dist/deeplabcut-2.3.1-py3-none-any.whl
pip install dist/deeplabcut-2.3.2-py3-none-any.whl
10 changes: 10 additions & 0 deletions tests/test_predict_supermodel.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
#
import numpy as np
import pytest
from deeplabcut.modelzoo.api import superanimal_inference
Expand Down
10 changes: 10 additions & 0 deletions tests/tests_modelzoo.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
#
import dlclibrary
import os
import pytest
Expand Down

0 comments on commit 204310b

Please sign in to comment.