facebookresearch / phosa
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 66 units with 838 lines of code in units (22.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (35 lines of code)
    • 4 simple units (94 lines of code)
    • 61 very simple units (709 lines of code)
0% | 0% | 4% | 11% | 84%
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% | 4% | 11% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
phosa0% | 0% | 6% | 16% | 76%
phosa/utils0% | 0% | 0% | 3% | 96%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def forward()
in phosa/global_opt.py
35 13 2
def assign_interaction_pairs()
in phosa/global_opt.py
30 9 3
28 8 3
def assign_human_masks()
in phosa/global_opt.py
29 8 3
def check_overlap()
in phosa/utils/bbox.py
7 6 2
def project_bbox()
in phosa/global_opt.py
23 5 4
def compute_ordinal_depth_loss()
in phosa/global_opt.py
19 5 4
def main()
in demo.py
51 5 1
def visualize_optimal_poses()
in phosa/pose_optimization.py
39 3 4
def compute_ordinal_depth_loss()
in phosa/global_opt.py
19 3 1
def save_obj()
in phosa/global_opt.py
10 3 2
def compute_dist_z()
in phosa/utils/geometry.py
8 3 2
def bbox_xy_to_wh()
in phosa/utils/bbox.py
12 3 1
def bbox_wh_to_xy()
in phosa/utils/bbox.py
12 3 1
def visualize_orthographic()
in phosa/bodymocap.py
13 2 2
def compute_optimal_translation()
in phosa/pose_optimization.py
19 2 4
def compute_offscreen_loss()
in phosa/pose_optimization.py
16 2 2
def get_faces_and_textures()
in phosa/global_opt.py
22 2 2
def compute_sil_loss()
in phosa/global_opt.py
10 2 3
def compute_interaction_loss()
in phosa/global_opt.py
10 2 3