This paper presents a region-partition based attraction field dualrepresentation for line segment maps, and thus poses the problem of linesegment detection (LSD) as the region coloring problem. The latter is thenaddressed by learning deep convolutional neural networks (ConvNets) foraccuracy, robustness and efficiency. For a 2D line segment map, our dualrepresentation consists of three components: (i) A region-partition map inwhich every pixel is assigned to one and only one line segment; (ii) Anattraction field map in which every pixel in a partition region is encoded byits 2D projection vector w.r.t. the associated line segment; and (iii) Asqueeze module which squashes the attraction field to a line segment map thatalmost perfectly recovers the input one. By leveraging the duality, we learnConvNets to compute the attraction field maps for raw in-put images, followedby the squeeze module for LSD, in an end-to-end manner. Our method rigorouslyaddresses several challenges in LSD such as local ambiguity and classimbalance. Our method also harnesses the best practices developed in ConvNetsbased semantic segmentation methods such as the encoder-decoder architectureand the a-trous convolution. In experiments, our method is tested on theWireFrame dataset and the YorkUrban dataset with state-of-the-art performanceobtained. Especially, we advance the performance by 4.5 percents on theWireFrame dataset. Our method is also fast with 6.6~10.4 FPS, outperformingmost of existing line segment detectors.