File size: 2,093 Bytes
e04dce3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import enum


class GenerationOptions(enum.Enum):
    """This Enum provides the options that are used in the usual generation

    (that is, consumed by the core_generation_funnel).

    Please use this to avoid typos. Also, this enum provides default values for these options."""
    def __new__(cls, *args, **kwds):
        value = len(cls.__members__) + 1
        obj = object.__new__(cls)
        obj._value_ = value
        return obj

    def __init__(self, default_value=None, *args):
        """Saves default value as a member (called "df") of a member of this enum"""
        self.df = default_value

    COMPUTE_DEVICE = "GPU"
    MODEL_TYPE = "Depth Anything v2 Base"  # Will become enum element
    BOOST = False
    NET_SIZE_MATCH = False
    NET_WIDTH = 448
    NET_HEIGHT = 448
    TILING_MODE = False

    DO_OUTPUT_DEPTH = True
    OUTPUT_DEPTH_INVERT = False
    OUTPUT_DEPTH_COMBINE = False
    OUTPUT_DEPTH_COMBINE_AXIS = "Horizontal"  # Format (str) is subject to change
    DO_OUTPUT_DEPTH_PREDICTION = False  # Hidden, do not use, subject to change

    CLIPDEPTH = False
    CLIPDEPTH_MODE = "Range"
    CLIPDEPTH_FAR = 0.0
    CLIPDEPTH_NEAR = 1.0

    GEN_STEREO = False
    STEREO_MODES = ["left-right", "red-cyan-anaglyph"]
    STEREO_DIVERGENCE = 2.5
    STEREO_SEPARATION = 0.0
    STEREO_FILL_ALGO = "polylines_sharp"
    STEREO_OFFSET_EXPONENT = 1.0
    STEREO_BALANCE = 0.0

    GEN_NORMALMAP = False
    NORMALMAP_PRE_BLUR = False
    NORMALMAP_PRE_BLUR_KERNEL = 3
    NORMALMAP_SOBEL = True
    NORMALMAP_SOBEL_KERNEL = 3
    NORMALMAP_POST_BLUR = False
    NORMALMAP_POST_BLUR_KERNEL = 3
    NORMALMAP_INVERT = False

    GEN_HEATMAP = False

    GEN_SIMPLE_MESH = False
    SIMPLE_MESH_OCCLUDE = True
    SIMPLE_MESH_SPHERICAL = False

    GEN_INPAINTED_MESH = False
    GEN_INPAINTED_MESH_DEMOS = False

    GEN_REMBG = False
    SAVE_BACKGROUND_REMOVAL_MASKS = False  # Legacy, will be reworked
    PRE_DEPTH_BACKGROUND_REMOVAL = False  # Legacy, will be reworked
    REMBG_MODEL = "u2net"