facebookresearch / pifuhd
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 178 units with 2,928 lines of code in units (81.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (95 lines of code)
    • 10 medium complex units (534 lines of code)
    • 24 simple units (747 lines of code)
    • 143 very simple units (1,552 lines of code)
0% | 3% | 18% | 25% | 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% | 18% | 25% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/render0% | 20% | 21% | 0% | 58%
lib/render/gl0% | 0% | 25% | 9% | 64%
lib0% | 0% | 12% | 29% | 57%
lib/data0% | 0% | 27% | 36% | 35%
lib/model0% | 0% | 9% | 36% | 53%
apps0% | 0% | 34% | 49% | 16%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def load_obj_mesh_mtl()
in lib/render/mesh.py
95 35 1
def load_obj_mesh()
in lib/render/mesh.py
78 22 3
def get_item()
in lib/data/EvalWPoseDataset.py
78 19 2
def __init__()
in lib/render/gl/render.py
111 16 8
def createMLP()
in lib/net_util.py
32 15 4
def loadFromHGHPIFu()
in lib/model/HGPIFuNetwNML.py
26 15 2
def recon()
in apps/recon.py
64 14 2
def read_mtlfile()
in lib/render/mesh.py
26 11 1
def init_weights()
in lib/net_util.py
22 11 3
def __init__()
in lib/model/HGFilters.py
41 11 8
def run()
in lib/evaluator.py
56 11 3
def query()
in lib/model/HGPIFuMRNet.py
59 10 6
def get_error()
in lib/model/HGPIFuMRNet.py
25 10 1
def face_crop()
in lib/data/EvalWPoseDataset.py
30 10 1
def keyboard()
in lib/render/gl/cam_render.py
21 9 4
def loadShader()
in lib/render/gl/framework.py
20 8 2
def load_state_dict()
in lib/net_util.py
13 8 2
def build_conv_block()
in lib/networks.py
28 8 6
def filter_local()
in lib/model/HGPIFuMRNet.py
31 8 3
33 8 6