facebookresearch / dino
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 146 units with 2,038 lines of code in units (74.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (135 lines of code)
    • 7 medium complex units (305 lines of code)
    • 16 simple units (499 lines of code)
    • 122 very simple units (1,099 lines of code)
0% | 6% | 14% | 24% | 53%
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% | 6% | 14% | 24% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 6% | 14% | 24% | 53%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def train_dino()
in main_dino.py
135 27 1
37 20 5
def __load_model()
in video_generation.py
52 17 1
def eval_linear()
in eval_linear.py
102 16 1
def train_one_epoch()
in main_dino.py
48 14 12
22 12 3
def eval_result()
in eval_copy_detection.py
26 11 3
18 11 3
def extract_features()
in eval_copy_detection.py
40 10 3
55 10 1
41 9 3
def restrict_neighborhood()
in eval_video_segmentation.py
13 9 2
def validate_network()
in eval_linear.py
34 9 5
def apply()
in utils.py
12 8 2
36 8 4
def display_instances()
in visualize_attention.py
33 7 5
def log_every()
in utils.py
53 7 4
def step()
in utils.py
22 7 1
def eval_video_tracking_davis()
in eval_video_segmentation.py
25 7 7
def __init__()
in vision_transformer.py
22 6 8