REVIEW 2 major objections 6 minor 36 references
Under a one-megabyte activation budget, a compact int8 CNN with F-Clip encoding can reach sAP10 of 24.1 for line segments on microcontrollers.
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
T0 review · grok-4.5
2026-07-11 03:21 UTC pith:KBUWTMRJ
load-bearing objection First careful accuracy–memory map for learned line detection under real MCU SRAM; clean ablations, deferred silicon numbers, no circularity. the 2 major comments →
MiLSD: A Micro Line-Segment Detector for Resource-Constrained Devices
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
At extreme memory limits the choice of output representation dominates capacity: the F-Clip formulation (center confidence, length, and double-angle orientation) is the only encoding that yields coherent segments with a 25k-parameter fully-convolutional backbone. Eight-bit quantization preserves that performance; four-bit quantization collapses angle regression even under quantization-aware training. Scaling the same backbone to a ~1 MB activation arena and adding only inference-time refinements (sub-pixel peaks, four-view TTA, and a lightweight Line-of-Interest verifier) raises sAP10 on ShanghaiTech Wireframe from 10.6 to 24.1, placing the first learned line detector inside microcontroller
What carries the argument
F-Clip center-with-length-and-angle encoding: each segment is a center peak plus length and (cos 2θ, sin 2θ) on a 128×128 grid, decoded by peak NMS and optional sub-pixel fit, then re-scored by a tiny Line-of-Interest MLP that pools features along the candidate.
Load-bearing premise
The claim that the whole pipeline stays inside roughly 1 MB of real STM32H7 SRAM and runs usefully rests on software-measured activation arenas that the paper itself says still need on-device confirmation.
What would settle it
Export the exact int8 MiLSD graph through the vendor tool chain, flash it on a bare STM32H7, and measure peak SRAM occupancy together with Wireframe sAP10; if peak memory exceeds the 1 MB envelope or accuracy falls well below 24.1, the central resource claim fails.
If this is right
- F-Clip-style geometric heads should be the default starting point for any new sub-megabyte line detector.
- Int8 is a safe deployment target; sub-8-bit designs for angle regression need new encodings or training methods.
- Accuracy can be roughly doubled after training by memory-neutral post-processing (sub-pixel, TTA, small verifier) without enlarging the stored network.
- The previously empty MCU column in the line-detector table is now occupied, so future TinyML geometric work has a concrete accuracy–memory reference curve.
Where Pith is reading between the lines
- Angle and other continuous geometric heads may systematically demand higher bit-width than classification maps in TinyML vision, so mixed-precision or specialized encodings for orientation could be the next lever.
- The same three-axis map (representation, bit-width, post-processing) can be reused for other sparse geometric primitives—junctions, vanishing points, or short arcs—on the same MCU class.
- Classical edge walkers may still win pure latency contests; MiLSD defines a learned niche rather than a universal replacement.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper studies line-segment detection under sub-megabyte MCU memory budgets. It compares three output encodings (heatmap, center+displacement, F-Clip center+length+double-angle) on a compact fully-convolutional backbone, shows that F-Clip is most effective at ~25k parameters (sAP10=10.6 on ShanghaiTech Wireframe), and reports that int8 quantization preserves fp32 accuracy while int4 collapses especially on the (cos2θ,sin2θ) head, with QAT only partially recovering. Scaling the backbone to ~0.39M parameters under a ~1 MB activation arena and adding sub-pixel decoding, 4-view TTA, and a frozen-backbone Line-of-Interest verifier yields MiLSD at sAP10=24.1. The work positions itself as an accuracy–memory map for embedded vision rather than a competitor to GPU parsers, and releases code.
Significance. If the reported trade-offs hold, the paper fills a previously empty MCU column in the line-detection literature: no prior learned detector is evaluated under sub-megabyte SRAM with an int8/int4 study. The representation ablation (heatmap 0.3 → endpoint 3.6 → F-Clip 10.6 at fixed 25k params), the angle-head sensitivity to 4-bit quantization, and the staged inference gains (17.8 → 18.1 → 21.0 → 24.1) are concrete, falsifiable engineering results on the standard Wireframe split and sAP metric. Released code and the explicit accuracy–resource frontier (Table IV, Fig. 9) are genuine strengths for TinyML geometric vision. The absolute accuracy remains far below GPU parsers, which the authors correctly treat as a regime limit rather than a failure.
major comments (2)
- Section V-E states that on-device arena and latency 'must be confirmed with ST Edge AI' and reports only software-measured peaks (~1 MB activation arena, ~0.54 MB weights). The central claim is an accuracy–memory map under a 1 MB budget on STM32H7; without measured peak SRAM, wall-clock FPS, and power on silicon (or an explicit X-CUBE-AI arena dump), the binding constraint remains unverified. This does not invalidate the sAP or quantization results, but it is load-bearing for the deployment claim and should be closed or clearly demoted to a software estimate.
- Table V and Section V-C: the LoI verifier is trained with the backbone frozen and contributes the largest single gain (+3.1 sAP10). The paper does not report an ablation of verifier capacity, pooling density (32 points), or training labels (one-to-one matching), nor whether the verifier was quantized to int8 with the backbone. Because the 24.1 figure is the headline MiLSD number, a short sensitivity check or confirmation that the head fits inside the same arena under int8 is needed to make the staged gains fully reproducible.
minor comments (6)
- Abstract and Section IV-A: the abstract says F-Clip reaches 10.6 at 25k params, while the narrative climb in IV-A first quotes 7.2 then 10.6 after data/aug/epochs; a single consistent baseline number in the abstract and Fig. 5 caption would avoid confusion.
- Fig. 5 y-axis and caption: the progression mixes representation changes with capacity and post-processing; labeling which bars share the same backbone width would make the representation-only claim clearer.
- Table III: heatmap row notes that sAP is not the right metric and reports Q2/recall instead; either move heatmap to a separate classical-style evaluation or drop sAP for that row entirely to avoid mixing metrics.
- Section II-A: the double-angle encoding is well motivated, but the loss weighting (2.0 on geometric terms) and masking are only in Table II; a one-sentence justification in the text would help.
- Fig. 9 / Table IV: parameter counts for prior work are taken from LINEA and papers; a footnote that some counts are approximate (e.g., HAWPv2 ~11M) would be more precise.
- Typos / polish: 'improvessAP' (abstract), 'On MCU?' column consistency, and a few missing spaces around sAP subscripts in the text.
Circularity Check
No circularity: accuracy claims are empirical ablations on an external benchmark, not predictions forced by construction or self-citation.
full rationale
MiLSD is an engineering systems paper that maps accuracy–memory trade-offs for MCU-scale line-segment detection. Its load-bearing claims (F-Clip best at ~25k params, int8 preserves fp32, int4 angle-head fragility, capacity scaling to ~0.39M params, staged gains from sub-pixel/TTA/LoI to sAP10=24.1) are all measured against the external ShanghaiTech Wireframe ground truth with the community sAP metric. Representation choice, bit-width, width scaling, and post-processing stages are ablated against that fixed held-out set; none of the reported sAP figures is a fitted free parameter renamed as a prediction, nor does any central result reduce by definition to its inputs. Self-references are limited to the authors’ own design-search notebooks and released code for reproducibility; they do not supply uniqueness theorems or load-bearing premises. The paper does not claim first-principles derivation of geometry or uniqueness of the F-Clip encoding; it reports empirical comparison. Hardware-arena confirmation is deferred (Section V-E) but that is a measurement gap, not circularity. Score 0 is therefore the correct outcome.
Axiom & Free-Parameter Ledger
free parameters (5)
- backbone channel widths (8→16→32→32→32 and width-4 scaling to ~0.39 M)
- geometric loss weight 2.0
- training schedule (300 epochs, Adam 1e-3 cosine, batch 32)
- LoI pooling (32 bilinear samples) and verification MLP size
- center-confidence and verification score thresholds / NMS
axioms (4)
- domain assumption ShanghaiTech Wireframe sAP at squared-endpoint thresholds is a valid proxy for embedded line-detection quality.
- domain assumption Per-tensor symmetric int8/int4 quantization with STE approximates the deployed CMSIS-NN kernels.
- standard math Double-angle (cos 2θ, sin 2θ) uniquely encodes undirected line orientation.
- domain assumption Peak activation memory, not parameter storage, is the binding SRAM constraint on the target MCUs.
invented entities (1)
-
MiLSD (the full H7 pipeline with LoI verifier)
no independent evidence
read the original abstract
Line segment detection is a key building block in visual SLAM, 3D reconstruction, and industrial inspection. Recent deep learning methods have greatly improved accuracy, yet even the smallest models require several megabytes of memory, exceeding low-cost MCU capacity. This work investigates the maximum achievable accuracy under a sub-megabyte budget. We propose MiLSD, a detector tailored for MCU-level constraints, and systematically compare three output representations within a compact fully-convolutional backbone. Our study shows that the proposed F-Clip center-with-length-and-angle formulation learns most effectively at small model sizes. We find that 8-bit quantization preserves full-precision performance, while 4-bit quantization causes significant degradation, particularly in angle regression, with quantization-aware training recovering only part of the loss. With a one-megabyte activation budget and inference enhancements including sub-pixel decoding, test-time augmentation, and a lightweight verifier, MiLSD improves sAP10 on ShanghaiTech Wireframe from 10.6 (25k parameters, 0.25 MB) to 24.1 within 1 MB. Rather than competing with GPU-scale parsers, we map the accuracy memory trade-off across representations, bit-widths, capacities, and post-processing strategies for embedded vision systems.
Figures
Reference graph
Works this paper leans on
-
[1]
LSD: A fast line segment detector with a false detection control,
R. G. von Gioi, J. Jakubowicz, J.-M. Morel, and G. Randall, “LSD: A fast line segment detector with a false detection control,”IEEE Trans. on Pattern Analysis and Machine Intelligence (TPAMI), vol. 32, no. 4, pp. 722–732, 2010
work page 2010
-
[2]
EDLines: A real-time line segment detector with a false detection control,
C. Akinlar and C. Topal, “EDLines: A real-time line segment detector with a false detection control,”Pattern Recognition Letters, vol. 32, no. 13, pp. 1633–1642, 2011
work page 2011
-
[3]
Y . Zhou, H. Qi, and Y . Ma, “End-to-end wireframe parsing,” in IEEE/CVF Int. Conf. on Computer Vision (ICCV), 2019, l-CNN. arXiv:1905.03246
work page internal anchor Pith review Pith/arXiv arXiv 2019
-
[4]
Holistically-Attracted Wireframe Parsing
N. Xue, T. Wu, S. Bai, F.-D. Wang, G.-S. Xia, L. Zhang, and P. H. Torr, “Holistically-attracted wireframe parsing,” inIEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR), 2020, hAWP. arXiv:2003.01663
work page internal anchor Pith review Pith/arXiv arXiv 2020
-
[5]
Fully Convolutional Line Parsing
X. Dai, H. Gong, S. Wu, X. Yuan, and Y . Ma, “Fully convolu- tional line parsing,”Neurocomputing, vol. 506, pp. 1–11, 2022, f-Clip. arXiv:2104.11207
work page internal anchor Pith review Pith/arXiv arXiv 2022
-
[6]
Towards Light-weight and Real-time Line Segment Detection
G. Gu, B. Ko, S. Go, S.-H. Lee, J. Lee, and M. Shin, “Towards light-weight and real-time line segment detection,” inAAAI Conf. on Artificial Intelligence, 2022, m-LSD / M-LSD-tiny; MobileNetV2, center+displacement. arXiv:2106.00186
work page internal anchor Pith review Pith/arXiv arXiv 2022
-
[7]
ELSED: Enhanced Line SEgment Drawing
I. Suárez, J. M. Buenaposada, and L. Baumela, “ELSED: Enhanced line segment drawing,”Pattern Recognition, vol. 127, p. 108619, 2022, arXiv:2108.03144
work page internal anchor Pith review Pith/arXiv arXiv 2022
-
[8]
Learning to parse wireframes in images of man-made environments,
K. Huang, Y . Wang, Z. Zhou, T. Ding, S. Gao, and Y . Ma, “Learning to parse wireframes in images of man-made environments,” inIEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR), 2018
work page 2018
-
[9]
Learning Attraction Field Representation for Robust Line Segment Detection
N. Xue, S. Bai, F. Wang, G.-S. Xia, T. Wu, and L. Zhang, “Learning attraction field representation for robust line segment detection,” in IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR), 2019, aFM. arXiv:1812.02122
work page internal anchor Pith review Pith/arXiv arXiv 2019
-
[10]
ULSD: Unified Line Segment Detection across Pinhole, Fisheye, and Spherical Cameras
H. Li, H. Yu, J. Wang, W. Yang, L. Yu, and S. Scherer, “ULSD: Unified line segment detection across pinhole, fisheye, and spherical cameras,”ISPRS J. of Photogrammetry and Remote Sensing, 2021, arXiv:2011.03174
work page internal anchor Pith review Pith/arXiv arXiv 2021
-
[11]
Line Segment Detection Using Transformers without Edges
Y . Xu, W. Xu, D. Cheung, and Z. Tu, “Line segment detection using transformers without edges,” inIEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR), 2021, lETR. arXiv:2101.01909. 10
work page internal anchor Pith review Pith/arXiv arXiv 2021
-
[12]
STM32F746xx arm cortex-m7 microcontroller datasheet,
STMicroelectronics, “STM32F746xx arm cortex-m7 microcontroller datasheet,” https://www.st.com/en/microcontrollers-microprocessors/ stm32f746ng.html, 320 KB SRAM, 1 MB flash, 216 MHz Cortex-M7
-
[13]
TP-LSD: Tri-Points Based Line Segment Detector
S. Huang, F. Qin, P. Xiong, N. Ding, Y . He, and X. Liu, “TP-LSD: Tri- points based line segment detector,” inEuropean Conf. on Computer Vision (ECCV), 2020, arXiv:2009.05505
work page internal anchor Pith review Pith/arXiv arXiv 2020
-
[14]
MCUNetV2: Memory-Efficient Patch-based Inference for Tiny Deep Learning
J. Lin, W.-M. Chen, H. Cai, C. Gan, and S. Han, “MCUNetV2: Memory-efficient patch-based inference for tiny deep learning,” in Advances in Neural Information Processing Systems (NeurIPS), 2021, arXiv:2110.15352
work page internal anchor Pith review Pith/arXiv arXiv 2021
-
[15]
C. Banbury, C. Zhou, I. Fedorov, R. Matas Navarro, U. Thakker, D. Gope, V . Janapa Reddi, M. Mattina, and P. N. Whatmough, “Mi- croNets: Neural network architectures for deploying tinyml applications on commodity microcontrollers,”Proc. of Machine Learning and Sys- tems (MLSys), 2021, arXiv:2010.11267
work page internal anchor Pith review Pith/arXiv arXiv 2021
-
[16]
MCUNet: Tiny Deep Learning on IoT Devices
J. Lin, W.-M. Chen, Y . Lin, J. Cohn, C. Gan, and S. Han, “MCUNet: Tiny deep learning on IoT devices,” inAdvances in Neural Information Processing Systems (NeurIPS), 2020, arXiv:2007.10319
work page internal anchor Pith review Pith/arXiv arXiv 2020
-
[17]
Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference
B. Jacob, S. Kligys, B. Chen, M. Zhu, M. Tang, A. Howard, H. Adam, and D. Kalenichenko, “Quantization and training of neural networks for efficient integer-arithmetic-only inference,” inIEEE/CVF Conf. on Com- puter Vision and Pattern Recognition (CVPR), 2018, arXiv:1712.05877
work page internal anchor Pith review Pith/arXiv arXiv 2018
-
[18]
Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computation
Y . Bengio, N. Léonard, and A. Courville, “Estimating or propagating gradients through stochastic neurons for conditional computation,”arXiv preprint arXiv:1308.3432, 2013, straight-through estimator
work page internal anchor Pith review Pith/arXiv arXiv 2013
-
[19]
M. Rusci, A. Capotondi, and L. Benini, “Memory-driven mixed low precision quantization for enabling deep network inference on micro- controllers,”arXiv preprint arXiv:1905.13082, 2019
work page internal anchor Pith review Pith/arXiv arXiv 1905
-
[20]
Quantization and deployment of deep neural networks on microcontrollers,
P.-E. Novac, G. Boukli Hacene, A. Pegatoquet, B. Miramond, and V . Gripon, “Quantization and deployment of deep neural networks on microcontrollers,”Sensors, vol. 21, no. 9, p. 2984, 2021
work page 2021
-
[21]
Holistically-Attracted Wireframe Parsing: From Supervised to Self-Supervised Learning
N. Xue, T. Wu, S. Bai, F.-D. Wang, G.-S. Xia, L. Zhang, and P. H. Torr, “Holistically-attracted wireframe parsing: From supervised to self- supervised learning,”IEEE Trans. on Pattern Analysis and Machine Intelligence (TPAMI), 2023, hAWPv2/v3. arXiv:2210.12971
work page internal anchor Pith review Pith/arXiv arXiv 2023
-
[22]
DeepLSD: Line Segment Detection and Refinement with Deep Image Gradients
R. Pautrat, D. Barath, V . Larsson, M. R. Oswald, and M. Pollefeys, “DeepLSD: Line segment detection and refinement with deep image gradients,” inIEEE/CVF Conf. on Computer Vision and Pattern Recog- nition (CVPR), 2023, line attraction field. arXiv:2212.07766
work page internal anchor Pith review Pith/arXiv arXiv 2023
-
[23]
LSDNet: Trainable Modification of LSD Algorithm for Real-Time Line Segment Detection
L. Teplyakov, L. Erlygin, and E. Shvets, “LSDNet: Trainable modifi- cation of LSD algorithm for real-time line segment detection,”IEEE Access, vol. 10, pp. 45 256–45 265, 2022, arXiv:2209.04642
work page internal anchor Pith review Pith/arXiv arXiv 2022
-
[24]
EvLSD-IED: Event-based line segment detection with image-to-event distillation,
Wanget al., “EvLSD-IED: Event-based line segment detection with image-to-event distillation,”IEEE Trans. on Instrumentation and Mea- surement (TIM), 2024, knowledge-distillation precedent for LSD
work page 2024
-
[25]
A fast line segment detector using approximate computing,
C. Ossimitz and N. Taherinejad, “A fast line segment detector using approximate computing,” 05 2021, pp. 1–5
work page 2021
-
[26]
CMSIS-NN: Efficient Neural Network Kernels for Arm Cortex-M CPUs
L. Lai, N. Suda, and V . Chandra, “CMSIS-NN: Efficient neural network kernels for arm cortex-m CPUs,”arXiv preprint arXiv:1801.06601, 2018
work page internal anchor Pith review Pith/arXiv arXiv 2018
-
[27]
LSD-TML-All: Training and evalua- tion notebooks for versions v1–v6,
P. Hassani Shariat Panahi, “LSD-TML-All: Training and evalua- tion notebooks for versions v1–v6,” https://www.kaggle.com/code/ parsahshariatpanahi/lsd-tml-all, 2026, kaggle notebooks for the repre- sentation and quantization study (v1–v6)
work page 2026
-
[28]
Improved knowledge distillation via teacher assis- tant,
S. I. Mirzadeh, M. Farajtabar, A. Li, N. Levine, A. Matsukawa, and H. Ghasemzadeh, “Improved knowledge distillation via teacher assis- tant,” inAAAI Conf. on Artificial Intelligence, 2020, capacity-gap effect
work page 2020
-
[29]
Dt-lsd: Deformable transformer-based line segment detection,
S. Janampa and M. Pattichis, “Dt-lsd: Deformable transformer-based line segment detection,” inProceedings of the Winter Conference on Applications of Computer Vision (WACV), February 2025, pp. 3477– 3486
work page 2025
-
[30]
LINEA: Fast and Accurate Line Detection Using Scalable Transformers
S. Janampa and M. Pattichis, “Linea: Fast and accurate line detection using scalable transformers,” 2025. [Online]. Available: https://arxiv.org/abs/2505.16264
work page internal anchor Pith review Pith/arXiv arXiv 2025
-
[31]
Em-lsd: A lightweight and efficient model for multi-scale line segment detection,
S. Hu, L. Zhao, and Q. Wang, “Em-lsd: A lightweight and efficient model for multi-scale line segment detection,”Robotics and Autonomous Systems, vol. 195, p. 105192, 2026. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0921889025002891
work page 2026
-
[32]
PPGNet: Learning point-pair graph for line segment detection,
Z. Zhang, Z. Li, N. Bi, J. Zheng, J. Wang, K. Huang, W. Luo, Y . Xu, and S. Gao, “PPGNet: Learning point-pair graph for line segment detection,” inProceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019, pp. 7105–7114
work page 2019
-
[33]
Deep Hough transform for semantic line detection,
K. Zhao, Q. Han, C.-B. Zhang, J. Xu, and M.-M. Cheng, “Deep Hough transform for semantic line detection,” inProceedings of the European Conference on Computer Vision (ECCV), 2020
work page 2020
-
[34]
ST Edge AI Suite / X-CUBE-AI / ST Edge AI De- veloper Cloud,
STMicroelectronics, “ST Edge AI Suite / X-CUBE-AI / ST Edge AI De- veloper Cloud,” https://www.st.com/en/embedded-software/x-cube-ai. html, 2025, model analysis, int8 code generation, and on-target bench- marking for STM32
work page 2025
-
[35]
MiLSD: Micro line-segment detector,
P. Hassani Shariat Panahi, A. H. Jalilvand, and M. H. Najafi, “MiLSD: Micro line-segment detector,” https://github.com/F4RAN/MiLSD, 2026, source code, trained models, and evaluation scripts for the MiLSD implementation. Parsa Hassani Shariat Panahireceived his B.Sc. degree in Computer Engineering from Azad Uni- versity South Tehran Branch, Tehran, Iran, a...
work page 2026
-
[36]
He is currently an Associate Professor at the Electrical, Computer, and Systems Engineering Department at Case Western Reserve University. His research interests include stochastic and approxi- mate computing, unary processing, in-memory com- puting, and hyperdimensional computing. He has authored/coauthored more than 120 peer-reviewed papers and has been...
work page 2024
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.