microsoft / computervision-recipes
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 960 units with 11,352 lines of code in units (61.4% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (336 lines of code)
    • 24 medium complex units (1,089 lines of code)
    • 65 simple units (2,068 lines of code)
    • 868 very simple units (7,859 lines of code)
0% | 2% | 9% | 18% | 69%
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% | 3% | 9% | 18% | 69%
js0% | 0% | 10% | 15% | 73%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
utils_cv/classification0% | 21% | 0% | 28% | 50%
utils_cv/tracking0% | 2% | 9% | 18% | 69%
utils_cv/detection0% | 4% | 19% | 14% | 61%
contrib/action_recognition0% | 0% | 11% | 33% | 55%
contrib/html_demo0% | 0% | 10% | 15% | 73%
contrib/vm_builder0% | 0% | 12% | 0% | 87%
utils_cv/action_recognition0% | 0% | 5% | 5% | 88%
scenarios/classification0% | 0% | 0% | 95% | 4%
utils_cv/similarity0% | 0% | 0% | 29% | 70%
contrib/document_cleanup0% | 0% | 0% | 9% | 90%
scenarios/action_recognition0% | 0% | 0% | 60% | 39%
contrib/vmss_builder0% | 0% | 0% | 55% | 44%
utils_cv/common0% | 0% | 0% | 6% | 93%
contrib/crowd_counting0% | 0% | 0% | 0% | 100%
utils_cv/segmentation0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _read_annos()
in utils_cv/detection/dataset.py
79 34 1
def update()
in utils_cv/tracking/references/fairmot/tracker/multitracker.py
126 30 3
def _create_ui()
in utils_cv/classification/widget.py
131 28 1
def loadRes()
in utils_cv/detection/references/coco_eval.py
49 20 2
def _coco_remove_images_without_annotations()
in utils_cv/detection/references/coco_utils.py
27 20 2
def __init__()
in contrib/action_recognition/i3d/models/pytorch_i3d.py
79 19 7
def load_model()
in utils_cv/tracking/references/fairmot/models/model.py
48 17 6
def parse()
in utils_cv/tracking/references/fairmot/opts.py
38 16 2
def run_epoch()
in utils_cv/tracking/references/fairmot/trains/base_trainer.py
53 16 4
def parse_instance()
in utils_cv/detection/references/anno_coco2voc.py
34 15 3
def __call__()
in utils_cv/detection/references/coco_utils.py
40 15 3
def get_data()
in utils_cv/tracking/references/fairmot/datasets/dataset/jde.py
64 15 3
def read_mot_results()
in utils_cv/tracking/references/fairmot/tracking_utils/io.py
36 15 3
def evaluate()
in utils_cv/detection/references/coco_eval.py
35 14 1
def _read_annos()
in utils_cv/tracking/dataset.py
32 14 1
def __init__()
in utils_cv/tracking/references/fairmot/models/networks/pose_hrnet.py
84 14 3
async function jsonParser()
in contrib/html_demo/UICode/script.js
55 13 2
def validate_password()
in contrib/vm_builder/vm_builder.py
42 13 1
def load()
in utils_cv/detection/model.py
38 13 3
def compute_ap()
in utils_cv/detection/references/pycocotools_cocoeval.py
29 13 6