facebookresearch / consistent_depth
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 219 units with 2,371 lines of code in units (75.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (369 lines of code)
    • 16 simple units (432 lines of code)
    • 198 very simple units (1,570 lines of code)
0% | 0% | 15% | 18% | 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% | 15% | 18% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 34% | 14% | 50%
utils0% | 0% | 0% | 17% | 82%
loss0% | 0% | 0% | 42% | 57%
loaders0% | 0% | 0% | 62% | 37%
tools0% | 0% | 0% | 13% | 86%
monodepth0% | 0% | 0% | 0% | 100%
optimizer0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def calibrate_scale()
in scale_calibration.py
141 19 4
43 19 2
def eval_and_save()
in depth_fine_tuning.py
69 18 4
def fine_tune()
in depth_fine_tuning.py
83 14 2
33 11 3
24 10 3
def augment_args()
in tools/make_video.py
27 9 1
def matchKeypoints()
in optical_flow_flownet2_homography.py
13 9 6
def geometry_consistency_loss()
in loss/consistency_loss.py
70 9 4
def parse_frame_range()
in utils/frame_range.py
34 9 1
39 9 1
20 9 4
def __getitem__()
in loaders/video_dataset.py
35 9 2
def cameras_to_intrinsics()
in utils/load_colmap.py
24 8 3
def parse()
in params.py
19 7 3
def resize_to_target()
in utils/image_io.py
22 7 4
def process()
in tools/colmap_processor.py
19 6 2
40 6 3
def to_in_range()
in utils/frame_sampling.py
6 6 2
def to_device()
in utils/torch_helpers.py
11 6 1