facebookresearch / co3d
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 112 units with 1,021 lines of code in units (46.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (73 lines of code)
    • 5 medium complex units (149 lines of code)
    • 9 simple units (198 lines of code)
    • 97 very simple units (601 lines of code)
0% | 7% | 14% | 19% | 58%
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% | 7% | 14% | 19% | 58%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dataset0% | 11% | 11% | 23% | 53%
evaluation0% | 0% | 56% | 0% | 44%
tools0% | 0% | 10% | 13% | 75%
ROOT0% | 0% | 0% | 33% | 66%
models0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _filter_db()
in dataset/co3d_dataset.py
73 27 1
def collate()
in dataset/co3d_dataset.py
47 21 2
def _dataclass_from_dict()
in dataset/types.py
23 15 2
def pretty_print_nvs_metrics()
in evaluation/evaluate_new_view_synthesis.py
27 15 1
def aggregate_nvs_results()
in evaluation/evaluate_new_view_synthesis.py
29 14 1
def cat_dataclass()
in tools/utils.py
23 11 2
def main()
in eval_demo.py
24 8 0
def _get_pytorch3d_camera()
in dataset/co3d_dataset.py
34 8 4
def select_cameras()
in tools/camera_utils.py
16 7 4
def concatenate_cameras()
in tools/camera_utils.py
14 7 1
def __getitem__()
in dataset/co3d_dataset.py
63 7 2
def _unwrap_type()
in dataset/types.py
6 7 1
def _load_crop_fg_probability()
in dataset/co3d_dataset.py
15 6 2
def _load_subset_lists()
in dataset/co3d_dataset.py
20 6 1
def _invalidate_indexes()
in dataset/co3d_dataset.py
6 6 2
def _load_crop_images()
in dataset/co3d_dataset.py
16 5 4
def _load_mask_depth()
in dataset/co3d_dataset.py
27 5 4
def _resize_image()
in dataset/co3d_dataset.py
20 4 3
def _get_clamp_bbox()
in dataset/co3d_dataset.py
14 4 3
def _sample_batch()
in dataset/scene_batch_sampler.py
18 4 2