facebookresearch / VideoPose3D
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 82 units with 1,150 lines of code in units (42.5% of code).
    • 1 very long units (111 lines of code)
    • 3 long units (176 lines of code)
    • 14 medium size units (443 lines of code)
    • 14 small units (210 lines of code)
    • 50 very small units (210 lines of code)
9% | 15% | 38% | 18% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py9% | 15% | 38% | 18% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
common14% | 16% | 28% | 17% | 22%
ROOT0% | 37% | 50% | 12% | 0%
inference0% | 0% | 73% | 17% | 8%
data0% | 0% | 41% | 32% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def render_animation()
in common/visualization.py
111 18 14
def parse_args()
in common/arguments.py
67 6 0
55 12 4
def next_epoch()
in common/generators.py
54 20 1
def main()
in inference/infer_video_d2.py
49 7 1
def fetch()
in run.py
46 22 4
def __init__()
in common/generators.py
39 8 16
def main()
in inference/infer_video.py
39 5 1
def decode()
in data/prepare_data_2d_custom.py
37 8 1
def __init__()
in common/h36m_dataset.py
30 9 3
def remove_joints()
in common/skeleton.py
30 13 2
def parse_args()
in inference/infer_video_d2.py
30 2 0
27 6 2
def __init__()
in common/custom_dataset.py
25 3 3
def __init__()
in common/humaneva_dataset.py
25 10 2
def p_mpjpe()
in common/loss.py
23 1 2
def wrap()
in common/utils.py
22 10 3
def __init__()
in common/model.py
21 6 9
def next_epoch()
in common/generators.py
20 7 1
def read_video()
in common/visualization.py
19 6 3