|
a |
|
b/ViTPose/mmpose/deprecated.py |
|
|
1 |
# Copyright (c) OpenMMLab. All rights reserved. |
|
|
2 |
import warnings |
|
|
3 |
|
|
|
4 |
from .datasets.builder import DATASETS |
|
|
5 |
from .datasets.datasets.base import Kpt2dSviewRgbImgTopDownDataset |
|
|
6 |
from .models.builder import HEADS, POSENETS |
|
|
7 |
from .models.detectors import AssociativeEmbedding |
|
|
8 |
from .models.heads import (AEHigherResolutionHead, AESimpleHead, |
|
|
9 |
DeepposeRegressionHead, HMRMeshHead, |
|
|
10 |
TopdownHeatmapMSMUHead, |
|
|
11 |
TopdownHeatmapMultiStageHead, |
|
|
12 |
TopdownHeatmapSimpleHead) |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
@DATASETS.register_module() |
|
|
16 |
class TopDownFreiHandDataset(Kpt2dSviewRgbImgTopDownDataset): |
|
|
17 |
"""Deprecated TopDownFreiHandDataset.""" |
|
|
18 |
|
|
|
19 |
def __init__(self, *args, **kwargs): |
|
|
20 |
raise (ImportError( |
|
|
21 |
'TopDownFreiHandDataset has been renamed into FreiHandDataset,' |
|
|
22 |
'check https://github.com/open-mmlab/mmpose/pull/202 for details.') |
|
|
23 |
) |
|
|
24 |
|
|
|
25 |
def _get_db(self): |
|
|
26 |
return [] |
|
|
27 |
|
|
|
28 |
def evaluate(self, cfg, preds, output_dir, *args, **kwargs): |
|
|
29 |
return None |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
@DATASETS.register_module() |
|
|
33 |
class TopDownOneHand10KDataset(Kpt2dSviewRgbImgTopDownDataset): |
|
|
34 |
"""Deprecated TopDownOneHand10KDataset.""" |
|
|
35 |
|
|
|
36 |
def __init__(self, *args, **kwargs): |
|
|
37 |
raise (ImportError( |
|
|
38 |
'TopDownOneHand10KDataset has been renamed into OneHand10KDataset,' |
|
|
39 |
'check https://github.com/open-mmlab/mmpose/pull/202 for details.') |
|
|
40 |
) |
|
|
41 |
|
|
|
42 |
def _get_db(self): |
|
|
43 |
return [] |
|
|
44 |
|
|
|
45 |
def evaluate(self, cfg, preds, output_dir, *args, **kwargs): |
|
|
46 |
return None |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
@DATASETS.register_module() |
|
|
50 |
class TopDownPanopticDataset(Kpt2dSviewRgbImgTopDownDataset): |
|
|
51 |
"""Deprecated TopDownPanopticDataset.""" |
|
|
52 |
|
|
|
53 |
def __init__(self, *args, **kwargs): |
|
|
54 |
raise (ImportError( |
|
|
55 |
'TopDownPanopticDataset has been renamed into PanopticDataset,' |
|
|
56 |
'check https://github.com/open-mmlab/mmpose/pull/202 for details.') |
|
|
57 |
) |
|
|
58 |
|
|
|
59 |
def _get_db(self): |
|
|
60 |
return [] |
|
|
61 |
|
|
|
62 |
def evaluate(self, cfg, preds, output_dir, *args, **kwargs): |
|
|
63 |
return None |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
@HEADS.register_module() |
|
|
67 |
class BottomUpHigherResolutionHead(AEHigherResolutionHead): |
|
|
68 |
"""Bottom-up head for Higher Resolution. |
|
|
69 |
|
|
|
70 |
BottomUpHigherResolutionHead has been renamed into AEHigherResolutionHead, |
|
|
71 |
check https://github.com/open- mmlab/mmpose/pull/656 for details. |
|
|
72 |
""" |
|
|
73 |
|
|
|
74 |
def __init__(self, *args, **kwargs): |
|
|
75 |
super().__init__(*args, **kwargs) |
|
|
76 |
warnings.warn( |
|
|
77 |
'BottomUpHigherResolutionHead has been renamed into ' |
|
|
78 |
'AEHigherResolutionHead, check ' |
|
|
79 |
'https://github.com/open-mmlab/mmpose/pull/656 for details.', |
|
|
80 |
DeprecationWarning) |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
@HEADS.register_module() |
|
|
84 |
class BottomUpSimpleHead(AESimpleHead): |
|
|
85 |
"""Bottom-up simple head. |
|
|
86 |
|
|
|
87 |
BottomUpSimpleHead has been renamed into AESimpleHead, check |
|
|
88 |
https://github.com/open-mmlab/mmpose/pull/656 for details. |
|
|
89 |
""" |
|
|
90 |
|
|
|
91 |
def __init__(self, *args, **kwargs): |
|
|
92 |
super().__init__(*args, **kwargs) |
|
|
93 |
warnings.warn( |
|
|
94 |
'BottomUpHigherResolutionHead has been renamed into ' |
|
|
95 |
'AEHigherResolutionHead, check ' |
|
|
96 |
'https://github.com/open-mmlab/mmpose/pull/656 for details', |
|
|
97 |
DeprecationWarning) |
|
|
98 |
|
|
|
99 |
|
|
|
100 |
@HEADS.register_module() |
|
|
101 |
class TopDownSimpleHead(TopdownHeatmapSimpleHead): |
|
|
102 |
"""Top-down heatmap simple head. |
|
|
103 |
|
|
|
104 |
TopDownSimpleHead has been renamed into TopdownHeatmapSimpleHead, check |
|
|
105 |
https://github.com/open-mmlab/mmpose/pull/656 for details. |
|
|
106 |
""" |
|
|
107 |
|
|
|
108 |
def __init__(self, *args, **kwargs): |
|
|
109 |
super().__init__(*args, **kwargs) |
|
|
110 |
warnings.warn( |
|
|
111 |
'TopDownSimpleHead has been renamed into ' |
|
|
112 |
'TopdownHeatmapSimpleHead, check ' |
|
|
113 |
'https://github.com/open-mmlab/mmpose/pull/656 for details.', |
|
|
114 |
DeprecationWarning) |
|
|
115 |
|
|
|
116 |
|
|
|
117 |
@HEADS.register_module() |
|
|
118 |
class TopDownMultiStageHead(TopdownHeatmapMultiStageHead): |
|
|
119 |
"""Top-down heatmap multi-stage head. |
|
|
120 |
|
|
|
121 |
TopDownMultiStageHead has been renamed into TopdownHeatmapMultiStageHead, |
|
|
122 |
check https://github.com/open-mmlab/mmpose/pull/656 for details. |
|
|
123 |
""" |
|
|
124 |
|
|
|
125 |
def __init__(self, *args, **kwargs): |
|
|
126 |
super().__init__(*args, **kwargs) |
|
|
127 |
warnings.warn( |
|
|
128 |
'TopDownMultiStageHead has been renamed into ' |
|
|
129 |
'TopdownHeatmapMultiStageHead, check ' |
|
|
130 |
'https://github.com/open-mmlab/mmpose/pull/656 for details.', |
|
|
131 |
DeprecationWarning) |
|
|
132 |
|
|
|
133 |
|
|
|
134 |
@HEADS.register_module() |
|
|
135 |
class TopDownMSMUHead(TopdownHeatmapMSMUHead): |
|
|
136 |
"""Heads for multi-stage multi-unit heads. |
|
|
137 |
|
|
|
138 |
TopDownMSMUHead has been renamed into TopdownHeatmapMSMUHead, check |
|
|
139 |
https://github.com/open-mmlab/mmpose/pull/656 for details. |
|
|
140 |
""" |
|
|
141 |
|
|
|
142 |
def __init__(self, *args, **kwargs): |
|
|
143 |
super().__init__(*args, **kwargs) |
|
|
144 |
warnings.warn( |
|
|
145 |
'TopDownMSMUHead has been renamed into ' |
|
|
146 |
'TopdownHeatmapMSMUHead, check ' |
|
|
147 |
'https://github.com/open-mmlab/mmpose/pull/656 for details.', |
|
|
148 |
DeprecationWarning) |
|
|
149 |
|
|
|
150 |
|
|
|
151 |
@HEADS.register_module() |
|
|
152 |
class MeshHMRHead(HMRMeshHead): |
|
|
153 |
"""SMPL parameters regressor head. |
|
|
154 |
|
|
|
155 |
MeshHMRHead has been renamed into HMRMeshHead, check |
|
|
156 |
https://github.com/open-mmlab/mmpose/pull/656 for details. |
|
|
157 |
""" |
|
|
158 |
|
|
|
159 |
def __init__(self, *args, **kwargs): |
|
|
160 |
super().__init__(*args, **kwargs) |
|
|
161 |
warnings.warn( |
|
|
162 |
'MeshHMRHead has been renamed into ' |
|
|
163 |
'HMRMeshHead, check ' |
|
|
164 |
'https://github.com/open-mmlab/mmpose/pull/656 for details.', |
|
|
165 |
DeprecationWarning) |
|
|
166 |
|
|
|
167 |
|
|
|
168 |
@HEADS.register_module() |
|
|
169 |
class FcHead(DeepposeRegressionHead): |
|
|
170 |
"""FcHead (deprecated). |
|
|
171 |
|
|
|
172 |
FcHead has been renamed into DeepposeRegressionHead, check |
|
|
173 |
https://github.com/open-mmlab/mmpose/pull/656 for details. |
|
|
174 |
""" |
|
|
175 |
|
|
|
176 |
def __init__(self, *args, **kwargs): |
|
|
177 |
super().__init__(*args, **kwargs) |
|
|
178 |
warnings.warn( |
|
|
179 |
'FcHead has been renamed into ' |
|
|
180 |
'DeepposeRegressionHead, check ' |
|
|
181 |
'https://github.com/open-mmlab/mmpose/pull/656 for details.', |
|
|
182 |
DeprecationWarning) |
|
|
183 |
|
|
|
184 |
|
|
|
185 |
@POSENETS.register_module() |
|
|
186 |
class BottomUp(AssociativeEmbedding): |
|
|
187 |
"""Associative Embedding. |
|
|
188 |
|
|
|
189 |
BottomUp has been renamed into AssociativeEmbedding, check |
|
|
190 |
https://github.com/open-mmlab/mmpose/pull/656 for details. |
|
|
191 |
""" |
|
|
192 |
|
|
|
193 |
def __init__(self, *args, **kwargs): |
|
|
194 |
super().__init__(*args, **kwargs) |
|
|
195 |
warnings.warn( |
|
|
196 |
'BottomUp has been renamed into ' |
|
|
197 |
'AssociativeEmbedding, check ' |
|
|
198 |
'https://github.com/open-mmlab/mmpose/pull/656 for details.', |
|
|
199 |
DeprecationWarning) |