facebookresearch / 3detr
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 224 units with 3,326 lines of code in units (72.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (474 lines of code)
    • 22 simple units (647 lines of code)
    • 196 very simple units (2,205 lines of code)
0% | 0% | 14% | 19% | 66%
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% | 14% | 17% | 67%
pyx0% | 0% | 0% | 92% | 7%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
datasets0% | 0% | 54% | 0% | 45%
utils0% | 0% | 6% | 29% | 64%
ROOT0% | 0% | 15% | 9% | 74%
models0% | 0% | 4% | 15% | 79%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
70 18 6
def __getitem__()
in datasets/sunrgbd.py
149 13 2
def eval_det()
in utils/eval_det.py
29 12 5
def main()
in main.py
78 12 2
def __getitem__()
in datasets/scannet.py
114 11 2
def forward()
in models/transformer.py
34 11 7
pyx
def polygon_clip_unnest()
in utils/box_intersection.pyx
26 10 4
pyx
def box_intersection()
in utils/box_intersection.pyx
22 10 16
def __call__()
in utils/random_cuboid.py
46 10 4
def forward()
in models/transformer.py
39 10 11
15 9 5
def metrics_to_str()
in utils/ap_calculator.py
30 9 3
def forward()
in models/transformer.py
34 9 7
def polygon_clip_unnest()
in utils/box_ops3d.py
21 8 2
63 8 6
def polygon_clip_unnest()
in utils/box_util.py
21 8 2
29 8 3
def voc_ap()
in utils/eval_det.py
17 7 3
pyx
def polygon_clip_float()
in utils/box_intersection.pyx
33 7 4
def write_oriented_bbox()
in utils/pc_util.py
36 7 3