microsoft / arcticseals
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 596 units with 7,510 lines of code in units (59.5% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (151 lines of code)
    • 18 medium complex units (945 lines of code)
    • 48 simple units (1,264 lines of code)
    • 528 very simple units (5,150 lines of code)
0% | 2% | 12% | 16% | 68%
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% | 2% | 13% | 16% | 67%
cpp0% | 0% | 32% | 50% | 16%
cs0% | 0% | 0% | 14% | 85%
js0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
pyx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dataset-generator0% | 46% | 44% | 0% | 8%
MaskRCNNDetection0% | <1% | 11% | 18% | 68%
SealDetectionRCNN0% | 0% | 16% | 14% | 68%
image_registration0% | 0% | 41% | 36% | 22%
archive0% | 0% | 9% | 22% | 68%
CopyImageFiles0% | 0% | 0% | 18% | 81%
UploadBlobs0% | 0% | 0% | 10% | 89%
ir-normalization0% | 0% | 0% | 23% | 76%
parse-labels0% | 0% | 0% | 0% | 100%
viewer0% | 0% | 0% | 0% | 100%
utilities0% | 0% | 0% | 0% | 100%
SealDetectionAPI0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in src/dataset-generator/create_dataset_from_raw_csv.py
122 34 0
def _rename_basic_resnet_weights()
in src/MaskRCNNDetection/maskrcnn_benchmark/utils/c2_model_loading.py
29 28 1
def __init__()
in src/MaskRCNNDetection/maskrcnn_benchmark/data/datasets/vott.py
45 25 4
def computeTransform()
in src/image_registration/ir_to_rgb_registration/image_registration.py
76 25 4
def __init__()
in src/SealDetectionRCNN/data/vott_dataset.py
45 24 2
def __init__()
in src/SealDetectionRCNN/data/seals_dataset.py
48 23 2
def _prepare_batches()
in src/MaskRCNNDetection/maskrcnn_benchmark/data/samplers/grouped_batch_sampler.py
26 22 1
def _rename_weights_for_resnet()
in src/MaskRCNNDetection/maskrcnn_benchmark/utils/c2_model_loading.py
27 21 2
def main()
in src/dataset-generator/create_dataset_from_updated_csv.py
117 20 0
def calc_detection_voc_prec_rec()
in src/SealDetectionRCNN/utils/eval_tool.py
79 16 7
def vis_bbox()
in src/SealDetectionRCNN/utils/vis_tool.py
31 16 6
def train()
in src/SealDetectionRCNN/train.py
71 15 1
def convert_cityscapes_instance_only()
in src/MaskRCNNDetection/tools/cityscapes/convert_cityscapes_to_coco.py
91 14 2
def to_image_list()
in src/MaskRCNNDetection/maskrcnn_benchmark/structures/image_list.py
26 13 2
def create_map_file_from_folder()
in src/archive/inference/classifier/cntk_resnet18_tl/cntk_resnet18_tl.py
27 13 6
def calc_detection_voc_prec_rec()
in src/MaskRCNNDetection/maskrcnn_benchmark/data/datasets/evaluation/voc/voc_eval.py
66 12 3
def align_and_update_state_dicts()
in src/MaskRCNNDetection/maskrcnn_benchmark/utils/model_serialization.py
30 12 2
void pre_calc_for_bilinear_interpolate()
in src/MaskRCNNDetection/maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp
83 11 13
def select_over_all_levels()
in src/MaskRCNNDetection/maskrcnn_benchmark/modeling/rpn/inference.py
23 11 2
def instances2dict_with_polygons()
in src/MaskRCNNDetection/tools/cityscapes/instances2dict_with_polygons.py
34 11 2