facebookresearch / meshrcnn
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 212 units with 3,404 lines of code in units (72.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (109 lines of code)
    • 15 medium complex units (747 lines of code)
    • 29 simple units (723 lines of code)
    • 167 very simple units (1,825 lines of code)
0% | 3% | 21% | 21% | 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% | 3% | 21% | 21% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools0% | 19% | 19% | 21% | 39%
meshrcnn/utils0% | 0% | 45% | 3% | 51%
shapenet/evaluation0% | 0% | 98% | 0% | 1%
meshrcnn/modeling0% | 0% | 15% | 39% | 44%
meshrcnn/data0% | 0% | 20% | 47% | 32%
meshrcnn/config0% | 0% | 100% | 0% | 0%
shapenet/utils0% | 0% | 7% | 4% | 87%
shapenet/data0% | 0% | 19% | 56% | 24%
shapenet/modeling0% | 0% | 9% | 20% | 69%
meshrcnn/structures0% | 0% | 0% | 16% | 83%
shapenet/solver0% | 0% | 0% | 38% | 61%
meshrcnn/evaluation0% | 0% | 0% | 14% | 85%
shapenet/config0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def training_loop()
in tools/train_net_shapenet.py
109 41 8
def _forward_shape()
in meshrcnn/modeling/roi_heads/roi_heads.py
87 24 3
def annotations_to_instances()
in meshrcnn/data/meshrcnn_transforms.py
24 18 2
def visualize_minibatch()
in meshrcnn/utils/vis.py
114 16 4
def _read_binvox_header()
in shapenet/utils/binvox_torch.py
36 16 1
def _compute_sampling_metrics()
in meshrcnn/utils/metrics.py
44 15 6
def main()
in tools/preprocess_shapenet.py
45 14 1
def __call__()
in meshrcnn/data/meshrcnn_transforms.py
32 14 2
def forward()
in shapenet/modeling/heads/mesh_loss.py
29 13 5
def estimate()
in meshrcnn/utils/projtransform.py
53 12 4
def evaluate_test()
in shapenet/evaluation/eval.py
55 12 3
def handle_model()
in tools/preprocess_shapenet.py
66 11 5
def get_meshrcnn_cfg_defaults()
in meshrcnn/config/config.py
45 11 1
def draw_pix3d_dict()
in meshrcnn/utils/vis.py
38 11 2
def evaluate_test_p2m()
in shapenet/evaluation/eval.py
49 11 2
def postprocess()
in shapenet/data/mesh_vox.py
30 11 3
def load_pix3d_json()
in meshrcnn/data/datasets/pix3d.py
57 10 3
def _scale_meshes()
in meshrcnn/utils/metrics.py
18 9 3
def transform_annotations()
in meshrcnn/data/meshrcnn_transforms.py
35 9 4
def __getitem__()
in shapenet/data/mesh_vox.py
49 9 2