amazon-research / siam-mot
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 223 units with 2,805 lines of code in units (78.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (228 lines of code)
    • 24 simple units (536 lines of code)
    • 193 very simple units (2,041 lines of code)
0% | 0% | 8% | 19% | 72%
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% | 8% | 19% | 72%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
siammot/data/ingestion0% | 0% | 52% | 38% | 9%
siammot/modelling/track_head0% | 0% | 6% | 0% | 93%
siammot/data0% | 0% | 13% | 17% | 69%
siammot/modelling/box_head0% | 0% | 27% | 23% | 49%
siammot/eval0% | 0% | 19% | 43% | 36%
siammot/data/adapters0% | 0% | 0% | 16% | 83%
siammot/modelling/backbone0% | 0% | 0% | 21% | 78%
siammot/engine0% | 0% | 0% | 39% | 60%
siammot/utils0% | 0% | 0% | 66% | 33%
siammot/modelling0% | 0% | 0% | 47% | 52%
siammot/operator_patch0% | 0% | 0% | 40% | 59%
tools0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _check_load_bbox()
in siammot/data/image_dataset.py
41 18 3
def eval_det_ap()
in siammot/eval/eval_det_ap.py
31 16 5
def forward()
in siammot/modelling/box_head/inference.py
37 14 3
def main()
in siammot/data/ingestion/ingest_mot.py
62 12 4
def forward()
in siammot/modelling/track_head/track_solver.py
37 11 2
def _update_memory_with_dormant_track()
in siammot/modelling/track_head/track_head.py
20 11 2
def get_ap()
in siammot/eval/eval_det_ap.py
21 10 5
def _filter()
in siammot/data/adapters/handler/data_filtering.py
14 10 3
def eval_clears_mot()
in siammot/eval/eval_clears_mot.py
49 9 4
def _postprocess_tracks()
in siammot/engine/inferencer.py
14 9 2
def sample_from_mot_csv()
in siammot/data/ingestion/ingest_mot.py
45 9 5
def _filter()
in siammot/data/adapters/handler/data_filtering.py
17 9 3
def bbs_iou()
in siammot/utils/entity_utils.py
24 7 2
def __call__()
in siammot/engine/tensorboard_writer.py
13 7 6
def do_inference()
in siammot/engine/inferencer.py
36 7 5
def __call__()
in siammot/data/adapters/augmentation/video_augmentation.py
14 7 3
def get_video_clips()
in siammot/data/video_dataset.py
18 7 2
def entity2target()
in siammot/data/video_dataset.py
11 7 3
def forward()
in siammot/modelling/backbone/dla.py
22 7 3
def __init__()
in siammot/modelling/backbone/dla.py
31 7 15