MLSD Line Detection

  • Mobile Line Segment Detection
  • M-LSD

byM-LSD Team & lllyasviel

Extract straight structural wireframes and geometric perspectives from architectural spaces while filtering organic noise

MLSD Line Detection

How MLSD Line Detection works

Convert complex architectural photography into clean, straight-line vector maps in three straightforward actions.

Supply source imagery

Supply source imagery

Upload an architectural photo, room perspective, or product layout containing straight geometric boundaries.

Tune detection parameters

Tune detection parameters

Adjust the score threshold between 0.0 and 1.0 and distance threshold up to 20.0 to balance sensitivity and line continuity.

Generate vector wireframe

Generate vector wireframe

Receive a high-contrast line map isolating rigid structural bones for precise downstream spatial conditioning.

What MLSD Line Detection is good at

Engineered to isolate structural perspective, eliminate organic clutter, and deliver precise geometric wireframes.

Rigid Linear Extraction

Rigid Linear Extraction

Isolates rigid straight lines and perspective grids from input images while automatically stripping away organic curves, textures, and fluid shapes.

Score Sensitivity Tuning

Score Sensitivity Tuning

Configure detection sensitivity between 0.0 and 1.0 to isolate dominant structural frameworks or capture faint, distant architectural lines.

Distance Segment Merging

Distance Segment Merging

Merge adjacent line fragments into continuous vectors across complex architectural planes using a distance threshold range up to 20.0.

Perspective Conditioning

Perspective Conditioning

Produces clean, high-contrast black-and-white vector maps ready for ControlNet conditioning to lock down spatial perspective in generative pipelines.

Made with MLSD Line Detection

Explore high-contrast line extractions across structural design, interior layouts, and geometric objects.

Geometric furniture drafting with crisp linear boundaries

Geometric furniture drafting with crisp linear boundaries

Transit interior perspective isolating structural corridor lines

Transit interior perspective isolating structural corridor lines

Exploded industrial chassis detailing sharp mechanical tolerances

Exploded industrial chassis detailing sharp mechanical tolerances

Scaffolding grid lines isolated from historic masonry

Scaffolding grid lines isolated from historic masonry

What people build with MLSD Line Detection

Architects, 3D artists, and generative creators use straight-line maps to lock down perspective and structural fidelity.

Architectural Perspective Alignment

01

Extract pristine structural perspective lines from building elevations and streetscapes to guide architectural rendering.

Interior Layout Restyling

02

Preserve the structural walls, cabinetry, and flooring grid of interior rooms while exploring new decorative styles.

Urban Environment Synthesis

03

Isolate geometric bridges, building facades, and transit corridors to maintain scene continuity across concept frames.

Industrial Hardware Drafting

04

Capture the precise geometric boundaries and mechanical edges of hard-surface products for industrial concept variants.

Graphic Poster Layouts

05

Transform photographs into minimalist vector line art for branding collateral, technical illustrations, and album artwork.

Frequently Asked Questions

Mobile Line Segment Detection (MLSD) is a specialized deep learning model designed to detect straight, rigid line segments while actively discarding curves, organic silhouettes, and surface textures. Unlike general edge detectors such as Canny or HED that outline every high-contrast edge, MLSD isolates linear perspective lines and structural boundaries for architectural and geometric conditioning.

Yes, MLSD stands for Mobile Line Segment Detection and is frequently referenced as M-LSD across ControlNet ecosystems and diffusion toolkits. It was originally engineered as a lightweight, resource-efficient straight-line extractor for mobile hardware before becoming a standard perspective preprocessor in generative image workflows.

The score threshold (ranging from 0.0 to 1.0) defines detection confidence, where lower values capture faint or distant lines and higher values filter out background noise. The distance threshold (ranging from 0.0 to 20.0) governs how aggressively adjacent and collinear line segments are merged into continuous linear vectors.

Avoid using MLSD for organic subjects such as human portraits, drapery, foliage, animals, and natural landscapes. The model intentionally strips non-linear contours, meaning organic or curved inputs typically yield blank canvases or fragmented, unhelpful line maps.

MLSD was developed by the M-LSD research team and adapted for ControlNet generative conditioning by lllyasviel, with primary repository releases published between February and April 2023.

Try MLSD Line Detection on Fuser

Extract straight structural wireframes and geometric perspectives from architectural spaces while filtering organic noise