microsoft / human-pose-estimation.pytorch
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 91 units with 1,788 lines of code in units (52.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (266 lines of code)
    • 15 simple units (472 lines of code)
    • 71 very simple units (1,050 lines of code)
0% | 0% | 14% | 26% | 58%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 15% | 24% | 59%
pyx0% | 0% | 0% | 72% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/core0% | 0% | 32% | 13% | 54%
lib/dataset0% | 0% | 20% | 29% | 50%
lib/models0% | 0% | 19% | 0% | 80%
pose_estimation0% | 0% | 0% | 50% | 49%
lib/nms0% | 0% | 0% | 55% | 44%
lib/utils0% | 0% | 0% | 18% | 81%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _update_dict()
in lib/core/config.py
26 18 2
def evaluate()
in lib/dataset/coco.py
53 14 8
def validate()
in lib/core/function.py
87 13 8
def __getitem__()
in lib/dataset/JointsDataset.py
58 13 2
def init_weights()
in lib/models/pose_resnet.py
42 13 2
47 10 2
def reset_config()
in pose_estimation/valid.py
17 9 2
def generate_target()
in lib/dataset/JointsDataset.py
40 8 3
pyx
def cpu_nms()
in lib/nms/cpu_nms.pyx
43 8 3
def get_final_preds()
in lib/core/inference.py
19 7 4
def locate_cuda()
in lib/nms/setup.py
18 7 0
def accuracy()
in lib/core/evaluate.py
28 6 4
def select_data()
in lib/dataset/JointsDataset.py
27 6 2
23 6 3
24 6 2
def oks_iou()
in lib/nms/nms.py
20 6 6
def oks_nms()
in lib/nms/nms.py
15 6 4
30 6 6
def save_debug_images()
in lib/utils/vis.py
21 6 7
def main()
in pose_estimation/train.py
100 6 0