Spaces:
Paused
Paused
Download config/surface.py from modventures/room-visualizer: direct link, hf CLI and curl.
- Browser
- Download file 3.32 kB
-
https://huggingface.co/spaces/modventures/room-visualizer/resolve/main/config/surface.py
- Command line
-
hf download hf://spaces/modventures/room-visualizer/config/surface.py
-
curl -L -o surface.py https://huggingface.co/spaces/modventures/room-visualizer/resolve/main/config/surface.py
3.32 kB
| from config.loader import config_bool, config_value | |
| SURFACE_RANSAC_DISTANCE = float(config_value( | |
| "SURFACE_RANSAC_DISTANCE", "surface_mapping", "ransac_distance_threshold", "0.04", | |
| )) | |
| SURFACE_MAX_PLANES = int(config_value( | |
| "SURFACE_MAX_PLANES", "surface_mapping", "max_planes", "5", | |
| )) | |
| SURFACE_NORMAL_ANGLE_DEGREES = float(config_value( | |
| "SURFACE_NORMAL_ANGLE_DEGREES", "surface_mapping", "normal_angle_threshold_degrees", "35", | |
| )) | |
| SURFACE_NORMAL_SMOOTHING_KERNEL = int(config_value( | |
| "SURFACE_NORMAL_SMOOTHING_KERNEL", "surface_mapping", "normal_smoothing_kernel", "5", | |
| )) | |
| SURFACE_MIN_PLANE_PIXELS = int(config_value( | |
| "SURFACE_MIN_PLANE_PIXELS", "surface_mapping", "min_plane_pixels", "1500", | |
| )) | |
| SURFACE_EDGE_CLOSE_RATIO = float(config_value( | |
| "SURFACE_EDGE_CLOSE_RATIO", "surface_mapping", "edge_close_ratio", "0.009", | |
| )) | |
| SURFACE_EDGE_KERNEL_RATIO = float(config_value( | |
| "SURFACE_EDGE_KERNEL_RATIO", "surface_mapping", "edge_kernel_ratio", "0.006", | |
| )) | |
| SURFACE_EDGE_DILATION_ITERATIONS = int(config_value( | |
| "SURFACE_EDGE_DILATION_ITERATIONS", "surface_mapping", "edge_dilation_iterations", "2", | |
| )) | |
| ENABLE_SOFT_FLOOR_COVERING_EXPANSION = config_bool( | |
| "ENABLE_SOFT_FLOOR_COVERING_EXPANSION", "surface_mapping", | |
| "soft_floor_covering_expansion_enabled", "1", | |
| ) | |
| SOFT_FLOOR_COVERING_KERNEL_RATIO = float(config_value( | |
| "SOFT_FLOOR_COVERING_KERNEL_RATIO", "surface_mapping", | |
| "soft_floor_covering_kernel_ratio", "0.008", | |
| )) | |
| SOFT_FLOOR_COVERING_DILATION_ITERATIONS = int(config_value( | |
| "SOFT_FLOOR_COVERING_DILATION_ITERATIONS", "surface_mapping", | |
| "soft_floor_covering_dilation_iterations", "2", | |
| )) | |
| SURFACE_UV_MIN_COVERAGE = float(config_value( | |
| "SURFACE_UV_MIN_COVERAGE", "surface_mapping", "uv_min_coverage", "0.995", | |
| )) | |
| # Walls tile *behind* mounted objects, so a wall surface legitimately | |
| # contains pixels with no valid wall geometry (a TV, a mirror, a cabinet). | |
| # Holding walls to the floor's 0.995 makes every wall fail the gate as | |
| # 'incomplete-surface-uv'. The shortfall is exactly the occluded pixels, | |
| # which the occlusion mask repaints anyway, so it is not a defect. | |
| SURFACE_UV_WALL_MIN_COVERAGE = float(config_value( | |
| "SURFACE_UV_WALL_MIN_COVERAGE", "surface_mapping", "uv_wall_min_coverage", "0.90", | |
| )) | |
| SURFACE_UV_MAX_BAD_NEIGHBOR_RATIO = float(config_value( | |
| "SURFACE_UV_MAX_BAD_NEIGHBOR_RATIO", "surface_mapping", "uv_max_bad_neighbor_ratio", "0.035", | |
| )) | |
| SURFACE_UV_MAX_JUMP_RATIO = float(config_value( | |
| "SURFACE_UV_MAX_JUMP_RATIO", "surface_mapping", "uv_max_jump_ratio", "8.0", | |
| )) | |
| SURFACE_UV_ABSOLUTE_JUMP_METERS = float(config_value( | |
| "SURFACE_UV_ABSOLUTE_JUMP_METERS", "surface_mapping", "uv_absolute_jump_meters", "0.35", | |
| )) | |
| ENABLE_GEOMETRY_SURFACE_FILTER = config_bool( | |
| "ENABLE_GEOMETRY_SURFACE_FILTER", "surface_mapping", "enable_geometry_surface_filter", "1", | |
| ) | |
| SURFACE_PLANE_DISTANCE_METERS = float(config_value( | |
| "SURFACE_PLANE_DISTANCE_METERS", "surface_mapping", "plane_distance_threshold_meters", "0.12", | |
| )) | |
| SURFACE_PLANE_NORMAL_MIN_COS = float(config_value( | |
| "SURFACE_PLANE_NORMAL_MIN_COS", "surface_mapping", "plane_normal_min_cos", "0.45", | |
| )) | |
| SURFACE_PLANE_FILTER_MIN_KEEP_RATIO = float(config_value( | |
| "SURFACE_PLANE_FILTER_MIN_KEEP_RATIO", "surface_mapping", "plane_filter_min_keep_ratio", "0.45", | |
| )) | |