-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass_diagram.puml
More file actions
173 lines (120 loc) · 4.96 KB
/
class_diagram.puml
File metadata and controls
173 lines (120 loc) · 4.96 KB
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
@startuml class_diagram
together {
abstract class InputSource{
- input_path: Union[str, int]
- _consumed : bool
+ get_frame() -> Optional[np.ndarray]:
+ get_frame_info() -> Optional[Dict[str, Any]]:
+ is_exhausted(self) -> bool:
+ cleanup(self) -> None:
}
class ImageInputSource {
- input_path: Union[str, int]
- _consumed : bool
+ get_frame() -> Optional[np.ndarray]:
+ get_frame_info() -> Optional[Dict[str, Any]]:
+ is_exhausted(self) -> bool:
+ cleanup(self) -> None:
}
class VideoInputSource{
- input_path: Union[str, int]
- _consumed : bool
+ get_frame() -> Optional[np.ndarray]:
+ get_frame_info() -> Optional[Dict[str, Any]]:
+ is_exhausted(self) -> bool:
+ cleanup(self) -> None:
}
class WebcamInputSource{
- input_path: Union[str, int]
- _consumed : bool
+ get_frame() -> Optional[np.ndarray]:
+ get_frame_info() -> Optional[Dict[str, Any]]:
+ is_exhausted(self) -> bool:
+ cleanup(self) -> None:
}
}
ImageInputSource .up.|> InputSource : Implements
VideoInputSource .up.|> InputSource : Implements
WebcamInputSource .up.|> InputSource : Implements
together {
abstract class PoseFramework{
- pose_config_path: Optional[str]
- pose_checkpoint_path: Optional[str]
+ get_pose_estimate(frame: np.ndarray, bounding_box: Optional[BoundingBox]) -> PoseResult
- _load_framework() -> None
- _load_model(pose_config_path: Optional[str], pose_checkpoint_path: Optional[str]) -> Optional[PoseEstimatorModel]
}
class MMPosePoseFramework {
- pose_config_path: Optional[str]
- pose_checkpoint_path: Optional[str]
+ get_pose_estimate(frame: np.ndarray, bounding_box: Optional[BoundingBox]) -> PoseResult
- _load_framework() -> None
- _load_model(pose_config_path: Optional[str], pose_checkpoint_path: Optional[str]) -> Optional[PoseEstimatorModel]
}
class MediaPipePoseFramework {
- pose_config_path: Optional[str]
- pose_checkpoint_path: Optional[str]
+ get_pose_estimate(frame: np.ndarray, bounding_box: Optional[BoundingBox]) -> PoseResult
- _load_framework() -> None
- _load_model(pose_config_path: Optional[str], pose_checkpoint_path: Optional[str]) -> Optional[PoseEstimatorModel]
}
}
MMPosePoseFramework .up.|> PoseFramework : Implements
MediaPipePoseFramework .up.|> PoseFramework : Implements
together {
abstract class DetectionFramework{
- detection_config_path: Optional[str]
- detection_checkpoint_path: Optional[str]
+ get_detection_estimate(frame: np.ndarray) -> BoundingBox
- _load_framework() -> None
- _load_model() -> Optional[Any]
}
class MMPoseDetectionFramework {
- detection_config_path: Optional[str]
- detection_checkpoint_path: Optional[str]
+ get_detection_estimate(frame: np.ndarray) -> BoundingBox
- _load_framework() -> None
- _load_model() -> Optional[Any]
}
}
MMPoseDetectionFramework ..|> DetectionFramework : Implements
class PoseProcessor{
- input_source: InputSource
- pose_framework: PoseFramework
- detection_framework: Optional[DetectionFramework]
+ process(output_dir_path: str, processing_mode: str) -> ExtractionSession
}
class JSONOutputHandler {
+ save_results(self, session: ExtractionSession, output_dir_path: str, input_file_path: str) -> None
- _session_to_dict(self, session: ExtractionSession) -> Dict[str, Any]
- _frame_result_to_dict(self, frame_result) -> Dict[str, Any]
- _pose_result_to_dict(self, pose_result) -> Dict[str, Any]
- _convert_keypoints(self, keypoints) -> Any
- _bounding_box_to_dict(self, bbox) -> Dict[str, Any]
}
together {
class PoseFrameworkFactory{
+ create_pose_framework(pose_framework_name: str, pose_config_path: Optional[str], pose_checkpoint_path: Optional[str]) -> PoseFramework
}
class DetectionFrameworkFactory{
+ create_detection_framework(detection_framework_name: str, detection_config_path: Optional[str], detection_checkpoint_path: Optional[str]) -> DetectionFramework
}
class InputSourceFactory{
+ create_input_source(input_path: str) -> InputSource
}
}
class main_cli{
+ main() -> int
}
class ArgumentParser {
parse_args() -> Namespace
}
main_cli -down-> ArgumentParser : Depends on
main_cli -down-> JSONOutputHandler : Depends on
main_cli -down-> PoseFrameworkFactory : Depends on
main_cli -down-> DetectionFrameworkFactory : Depends on
main_cli -down-> InputSourceFactory : Depends on
main_cli -down-> PoseProcessor : Depends on
InputSource o-up- PoseProcessor
PoseFramework o-up- PoseProcessor
DetectionFramework o-up- PoseProcessor