forked from DeepLabCut/DeepLabCut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
145 lines (132 loc) · 4.69 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
DeepLabCut2.0-3.0 Toolbox (deeplabcut.org)
© A. & M. Mathis Labs
https://github.com/DeepLabCut/DeepLabCut
Please see AUTHORS for contributors.
https://github.com/DeepLabCut/DeepLabCut/blob/main/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""
from __future__ import annotations
import setuptools
from pathlib import Path
with open("README.md", encoding="utf-8", errors="replace") as fh:
long_description = fh.read()
def super_animal_config_paths() -> list[str]:
config_dirs = [
Path("deeplabcut") / "modelzoo" / "model_configs",
Path("deeplabcut") / "modelzoo" / "project_configs",
]
configs = []
for subdir in config_dirs:
for p in subdir.iterdir():
if p.suffix == ".yaml":
configs.append(str(p))
return configs
def pytorch_config_paths() -> list[str]:
pytorch_configs = []
config_dir = Path("deeplabcut") / "pose_estimation_pytorch" / "config"
config_subdirs = [p for p in config_dir.iterdir() if p.is_dir()]
for subdir in config_subdirs:
for p in subdir.iterdir():
if p.suffix == ".yaml":
pytorch_configs.append(str(p))
return pytorch_configs
setuptools.setup(
name="deeplabcut",
version="3.0.0rc7",
author="A. & M.W. Mathis Labs",
author_email="alexander@deeplabcut.org",
description="Markerless pose-estimation of user-defined features with deep learning",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/DeepLabCut/DeepLabCut",
install_requires=[
"albumentations<=1.4.3",
"dlclibrary>=0.0.7",
"einops",
"dlclibrary>=0.0.6",
"filterpy>=1.4.4",
"ruamel.yaml>=0.15.0",
"imgaug>=0.4.0",
"imageio-ffmpeg",
"numba>=0.54",
"matplotlib>=3.3,<3.9,!=3.7.0,!=3.7.1",
"networkx>=2.6",
"numpy>=1.18.5,<2.0.0",
"pandas>=1.0.1,!=1.5.0",
"scikit-image>=0.17",
"scikit-learn>=1.0",
"scipy>=1.9",
"statsmodels>=0.11",
"tables==3.8.0",
"timm",
"torch>=2.0.0",
"torchvision",
"tqdm",
"pycocotools",
"pyyaml",
"Pillow>=7.1",
],
extras_require={
"gui": [
"pyside6==6.4.2",
"qdarkstyle==3.1",
"napari-deeplabcut>=0.2.1.6",
],
"openvino": ["openvino-dev==2022.1.0"],
"docs": ["numpydoc"],
"tf": [
"tensorflow>=2.0,<=2.10;platform_system=='Windows'",
"tensorflow>=2.0,<=2.12;platform_system!='Windows'",
"tensorpack>=0.11",
"tf_slim>=1.1.0",
], # Last supported TF version on Windows Native is 2.10
"apple_mchips": [
"tensorflow-macos<2.13.0",
"tensorflow-metal",
"tensorpack>=0.11",
"tf_slim>=1.1.0",
],
"modelzoo": ["huggingface_hub"],
"wandb": ["wandb"],
},
scripts=["deeplabcut/pose_estimation_tensorflow/models/pretrained/download.sh"],
packages=setuptools.find_packages(),
data_files=[
(
"deeplabcut",
[
"deeplabcut/pose_cfg.yaml",
"deeplabcut/inference_cfg.yaml",
"deeplabcut/reid_cfg.yaml",
"deeplabcut/modelzoo/models_to_framework.json",
"deeplabcut/pose_estimation_tensorflow/models/pretrained/pretrained_model_urls.yaml",
"deeplabcut/gui/style.qss",
"deeplabcut/gui/media/logo.png",
"deeplabcut/gui/media/dlc_1-01.png",
"deeplabcut/gui/media/dlc-pt.png",
"deeplabcut/gui/media/dlc-tf.png",
"deeplabcut/gui/assets/logo.png",
"deeplabcut/gui/assets/logo_transparent.png",
"deeplabcut/gui/assets/welcome.png",
"deeplabcut/gui/assets/icons/help.png",
"deeplabcut/gui/assets/icons/help2.png",
"deeplabcut/gui/assets/icons/new_project.png",
"deeplabcut/gui/assets/icons/new_project2.png",
"deeplabcut/gui/assets/icons/open.png",
"deeplabcut/gui/assets/icons/open2.png",
] + super_animal_config_paths() + pytorch_config_paths(),
)
],
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
],
entry_points="""[console_scripts]
dlc=deeplabcut.__main__:main""",
)
# https://www.python.org/dev/peps/pep-0440/#compatible-release