facebookresearch / InterHand2.6M
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 98 units with 1,297 lines of code in units (76.2% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (397 lines of code)
    • 7 medium size units (219 lines of code)
    • 29 small units (418 lines of code)
    • 56 very small units (263 lines of code)
0% | 30% | 16% | 32% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 30% | 16% | 32% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
data/InterHand2.6M0% | 86% | 0% | 8% | 5%
data/RHD0% | 82% | 0% | 11% | 6%
data/STB0% | 81% | 0% | 11% | 6%
common/utils0% | 0% | 34% | 47% | 17%
main0% | 0% | 57% | 23% | 18%
common/nets0% | 0% | 11% | 48% | 40%
common0% | 0% | 0% | 56% | 43%
tool/MANO_world_to_camera0% | 0% | 0% | 100% | 0%
tool/MANO_render0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def evaluate()
in data/InterHand2.6M/dataset.py
99 30 2
def __init__()
in data/InterHand2.6M/dataset.py
71 14 3
def evaluate()
in data/STB/dataset.py
59 17 2
def evaluate()
in data/RHD/dataset.py
59 17 2
def __init__()
in data/RHD/dataset.py
56 8 3
def __init__()
in data/STB/dataset.py
53 7 3
def get_keypoint_rgb()
in common/utils/vis.py
49 23 1
def main()
in main/train.py
37 7 0
def forward()
in main/model.py
34 7 5
def gen_trans_from_patch_cv()
in common/utils/preprocessing.py
26 2 9
def __init__()
in common/nets/resnet.py
25 4 2
def main()
in main/test.py
25 4 0
def augmentation()
in common/utils/preprocessing.py
23 4 7
def vis_keypoints()
in common/utils/vis.py
20 9 9
def vis_3d_keypoints()
in common/utils/vis.py
18 8 7
def load_skeleton()
in common/utils/preprocessing.py
17 7 2
def __init__()
in common/logger.py
17 2 3
def make_upsample_layers()
in common/nets/layer.py
17 7 2
def make_deconv_layers()
in common/nets/layer.py
16 7 2
def make_deconv3d_layers()
in common/nets/layer.py
16 7 2