Download floorplan/__init__.py from rikhoffbauer2/floorplan-parser: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/rikhoffbauer2/floorplan-parser/resolve/75a0e927f29da607420999ef09993fb00a4bb4a2/floorplan/__init__.py
- Command line
-
hf download hf://rikhoffbauer2/floorplan-parser@75a0e927f29da607420999ef09993fb00a4bb4a2/floorplan/__init__.py
-
curl -L -o __init__.py https://huggingface.co/rikhoffbauer2/floorplan-parser/resolve/75a0e927f29da607420999ef09993fb00a4bb4a2/floorplan/__init__.py
1.69 kB
| """ | |
| floorplan — Parse floor plan images into structured wall/door/window data. | |
| Architecture: | |
| schema.py — Pydantic data models (Wall, Opening, Room, FloorPlan, Corrections) | |
| geometry.py — Computational geometry (wall polygons, room detection, centerline ops) | |
| renderer.py — SVG + PIL rendering for visual verification and overlay | |
| parser.py — VLM-based parsing with iterative correction loop | |
| """ | |
| from .schema import ( | |
| FloorPlan, | |
| Wall, | |
| Opening, | |
| OpeningType, | |
| DoorSwing, | |
| Point2D, | |
| Room, | |
| RoomLabel, | |
| WallFaceRef, | |
| WallSide, | |
| Correction, | |
| CorrectionAction, | |
| CorrectionResult, | |
| ) | |
| from .geometry import ( | |
| compute_centerline_length, | |
| interpolate_along_centerline, | |
| normal_at_distance, | |
| wall_to_polygon, | |
| wall_polygon_with_openings, | |
| wall_union, | |
| detect_rooms_from_walls, | |
| build_rooms, | |
| compute_floor_plan_geometry, | |
| ) | |
| from .renderer import ( | |
| render_floorplan_svg, | |
| render_to_image, | |
| overlay_on_image, | |
| ) | |
| from .parser import ( | |
| FloorPlanParser, | |
| parse_floorplan, | |
| ) | |
| __version__ = "0.1.0" | |
| __all__ = [ | |
| # Schema | |
| "FloorPlan", "Wall", "Opening", "OpeningType", "DoorSwing", | |
| "Point2D", "Room", "RoomLabel", "WallFaceRef", "WallSide", | |
| "Correction", "CorrectionAction", "CorrectionResult", | |
| # Geometry | |
| "compute_centerline_length", "interpolate_along_centerline", | |
| "normal_at_distance", "wall_to_polygon", "wall_polygon_with_openings", | |
| "wall_union", "detect_rooms_from_walls", "build_rooms", | |
| "compute_floor_plan_geometry", | |
| # Renderer | |
| "render_floorplan_svg", "render_to_image", "overlay_on_image", | |
| # Parser | |
| "FloorPlanParser", "parse_floorplan", | |
| ] | |