figure out a better approach
- User
figure out a better approach
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
figure out a better approach
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Great! Let's build on the previous idea and refine it into an even more robust, generalizable, and scalable approach to floorplan analysis — one that not only calculates Gross Floor Area (GFA) and extracts the polygonal exterior outline, but also works reliably across a wide range of plan types: from hand-drawn sketches to BIM exports, CAD files to scanned blueprints.
We treat the floorplan as a scene graph, where architectural elements (walls, openings, rooms, etc.) are nodes connected by spatial and semantic relationships. This allows us to reason about structure in a way that mimics how architects or builders interpret plans.
Hybrid Input Parsing: Accepts multiple input formats:
Multi-Modal Primitive Detection Engine:
Topological Scene Graph Construction:
Exterior Inference via Boundary Traversal:
Scale Calibration using Contextual OCR:
Polygon Refinement & Validation:
Walls: Line segments with thickness, material, and opennessOpenings: Doors, windows, archwaysRooms: Labeled spaces with boundariesAnnotations: Text labels, dimensions, notesSymbols: Stairs, elevators, furniture (optional)This phase ensures we're working with structured data regardless of source.
Use a multi-task neural architecture (e.g., DETR + segmentation head + OCR):
Then perform symbolic grounding: match detected objects to real-world semantics.
Example:
{
"type": "wall",
"points": [[x1,y1], [x2,y2]],
"thickness": 0.15,
"material": "concrete",
"intersections": ["door_1", "junction_A"]
}
Construct a Scene Graph :
This enables high-level reasoning like:
“This room is adjacent to an exterior wall and has no enclosing wall on one side → likely a balcony.”
Algorithm Steps:
Collect All Exterior Candidates:
Build a Connectivity Graph:
Trace the Outer Loop Using Angle Heuristics:
Close the Loop:
Output: A list of ordered points forming the closed exterior polygon.
Once the exterior polygon is known:
Apply Scale Calibration:
Calculate Polygon Area:
| Feature | Traditional Method | Scene Graph Approach |
|---|---|---|
| Input Support | Raster-only | Multi-format (raster, vector, BIM) |
| Noise Handling | Fragile thresholding | Robust vector parsing |
| Structural Understanding | Pixel blobs | Scene graph with relations |
| Exterior Outline | Approximate contour | Accurate polygon from logic |
| GFA Accuracy | Pixel counting | Real-world scale + semantic logic |
| Extensibility | Limited | Rich API for further analysis |
This Scene Graph-based Floorplan Analyzer is a novel, intelligent, and extensible system that moves beyond pixel-based image processing. It combines the power of deep learning with symbolic AI and geometric reasoning to accurately extract:
Let me know if you want a prototype code structure or help designing this as a tool!
Adjust Based on GFA Rules: