File size: 6,608 Bytes
2cd560a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

from .datasets.builder import DATASETS
from .datasets.datasets.base import Kpt2dSviewRgbImgTopDownDataset
from .models.builder import HEADS, POSENETS
from .models.detectors import AssociativeEmbedding
from .models.heads import (AEHigherResolutionHead, AESimpleHead,
                           DeepposeRegressionHead, HMRMeshHead,
                           TopdownHeatmapMSMUHead,
                           TopdownHeatmapMultiStageHead,
                           TopdownHeatmapSimpleHead)


@DATASETS.register_module()
class TopDownFreiHandDataset(Kpt2dSviewRgbImgTopDownDataset):
    """Deprecated TopDownFreiHandDataset."""

    def __init__(self, *args, **kwargs):
        raise (ImportError(
            'TopDownFreiHandDataset has been renamed into FreiHandDataset,'
            'check https://github.com/open-mmlab/mmpose/pull/202 for details.')
               )

    def _get_db(self):
        return []

    def evaluate(self, cfg, preds, output_dir, *args, **kwargs):
        return None


@DATASETS.register_module()
class TopDownOneHand10KDataset(Kpt2dSviewRgbImgTopDownDataset):
    """Deprecated TopDownOneHand10KDataset."""

    def __init__(self, *args, **kwargs):
        raise (ImportError(
            'TopDownOneHand10KDataset has been renamed into OneHand10KDataset,'
            'check https://github.com/open-mmlab/mmpose/pull/202 for details.')
               )

    def _get_db(self):
        return []

    def evaluate(self, cfg, preds, output_dir, *args, **kwargs):
        return None


@DATASETS.register_module()
class TopDownPanopticDataset(Kpt2dSviewRgbImgTopDownDataset):
    """Deprecated TopDownPanopticDataset."""

    def __init__(self, *args, **kwargs):
        raise (ImportError(
            'TopDownPanopticDataset has been renamed into PanopticDataset,'
            'check https://github.com/open-mmlab/mmpose/pull/202 for details.')
               )

    def _get_db(self):
        return []

    def evaluate(self, cfg, preds, output_dir, *args, **kwargs):
        return None


@HEADS.register_module()
class BottomUpHigherResolutionHead(AEHigherResolutionHead):
    """Bottom-up head for Higher Resolution.

    BottomUpHigherResolutionHead has been renamed into AEHigherResolutionHead,
    check https://github.com/open- mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'BottomUpHigherResolutionHead has been renamed into '
            'AEHigherResolutionHead, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details.',
            DeprecationWarning)


@HEADS.register_module()
class BottomUpSimpleHead(AESimpleHead):
    """Bottom-up simple head.

    BottomUpSimpleHead has been renamed into AESimpleHead, check
    https://github.com/open-mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'BottomUpHigherResolutionHead has been renamed into '
            'AEHigherResolutionHead, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details',
            DeprecationWarning)


@HEADS.register_module()
class TopDownSimpleHead(TopdownHeatmapSimpleHead):
    """Top-down heatmap simple head.

    TopDownSimpleHead has been renamed into TopdownHeatmapSimpleHead, check
    https://github.com/open-mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'TopDownSimpleHead has been renamed into '
            'TopdownHeatmapSimpleHead, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details.',
            DeprecationWarning)


@HEADS.register_module()
class TopDownMultiStageHead(TopdownHeatmapMultiStageHead):
    """Top-down heatmap multi-stage head.

    TopDownMultiStageHead has been renamed into TopdownHeatmapMultiStageHead,
    check https://github.com/open-mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'TopDownMultiStageHead has been renamed into '
            'TopdownHeatmapMultiStageHead, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details.',
            DeprecationWarning)


@HEADS.register_module()
class TopDownMSMUHead(TopdownHeatmapMSMUHead):
    """Heads for multi-stage multi-unit heads.

    TopDownMSMUHead has been renamed into TopdownHeatmapMSMUHead, check
    https://github.com/open-mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'TopDownMSMUHead has been renamed into '
            'TopdownHeatmapMSMUHead, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details.',
            DeprecationWarning)


@HEADS.register_module()
class MeshHMRHead(HMRMeshHead):
    """SMPL parameters regressor head.

    MeshHMRHead has been renamed into HMRMeshHead, check
    https://github.com/open-mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'MeshHMRHead has been renamed into '
            'HMRMeshHead, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details.',
            DeprecationWarning)


@HEADS.register_module()
class FcHead(DeepposeRegressionHead):
    """FcHead (deprecated).

    FcHead has been renamed into DeepposeRegressionHead, check
    https://github.com/open-mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'FcHead has been renamed into '
            'DeepposeRegressionHead, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details.',
            DeprecationWarning)


@POSENETS.register_module()
class BottomUp(AssociativeEmbedding):
    """Associative Embedding.

    BottomUp has been renamed into AssociativeEmbedding, check
    https://github.com/open-mmlab/mmpose/pull/656 for details.
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            'BottomUp has been renamed into '
            'AssociativeEmbedding, check '
            'https://github.com/open-mmlab/mmpose/pull/656 for details.',
            DeprecationWarning)