周其当, 刘春晓, 吕金龙, 冯才博(浙江工商大学)
目的 曲线图是数据呈现的重要形式，但是在没有原始数据的情况下难以查询其中蕴含的具体数值。由于现有的图数转化算法需要大量的人工辅助操作去除图表中网格线等干扰，具有机械重复性且需大量人力的缺点。另外，图像压缩与缩放等攻击会降低图像质量，导致图数转化的准确度进一步降低。为了解决上述问题，本文提出了一个基于曲线提取与细化神经网络的图数转化算法。方法 首先，我们提出了基于侧结构引导与拉普拉斯卷积的曲线提取神经网络（side structure guidance and Laplace convolution based curve extraction neural network，SLCENet），以轻量化的模型解决了现有曲线提取方法中的池化操作导致的边界模糊问题，提高了曲线提取的准确度。其次，为了减小曲线线宽对图数转化造成的误差，并综合考虑计算复杂度和准确度，我们设计了10个能够反映曲线走势的特征，提出了基于曲线走势特征和多层感知机的曲线细化方法（curve trend features and MLP based curve thinning method，CMCT），实现了曲线细化的高精度。最后，利用PaddleOCR定位并识别坐标轴上的坐标标签，并建立起坐标轴坐标与像素坐标的变换关系公式，通过坐标变换完成图数转化任务。结果 在曲线提取方面，本文方法SLCENet的全局最优阈值指标（optimal dataset scale，ODS）达到了0.985，在分辨率为640×480的图像上的运行速度达到了0.043秒/张，在兼顾曲线提取准确度和运行速度的情况下达到了最好的性能。在图数转化方面，本文算法的归一化均值误差（normalized mean error，NME）达到了0.79，运行速度达到了0.83秒/张。结论 本文提出的基于侧结构引导与拉普拉斯卷积的曲线提取神经网络和基于曲线走势特征和多层感知机的曲线细化方法实现了全自动高精度的图数转化目标。与现有方法相比，在保持较小计算量的情况下兼具准确度高和运行速度快的特点，更是摆脱了图数转化需要大量人工交互辅助的限制。
Curve extraction and thinning based curve-to-data conversion neural network
ZHOU Qi Dang, LIU Chun Xiao, LV Jin Long, Feng Cai Bo(Zhejiang Gongshang University)
Objective Curve image is an important form of data presentation, but it is difficult to query the specific values embedded in it without the original data. Since the existing curve-to-data conversion methods require a lot of manual assistance to remove such interference in the curve images as grid lines, axes, etc., they have the disadvantage of being mechanically repetitive and labor-intensive. In addition, attacks such as image compression and scaling can degrade the image quality, leading to curve-to-data conversion accuracy decrease. Because the curve has a certain line width, the same X coordinate corresponds to multiple pixel points, and it is difficult to get the exact position of the point to be measured in the curve. To solve the above problems, this paper proposes a curve extraction and thinning based curve-to-data conversion neural network. Method First, we propose the side structure guidance and Laplace convolution based curve extraction neural network (SLCENet). SLCENet uses ResNet as the backbone network, enhances the curve extraction performance with side structure guidance, and uses deep supervision to make each layer of the network learn the details in the curve mask better. The side structure guidance contains 4 different scales, and each scale consists of 4 residual blocks. In order to obtain clearer curve details, we add the multiscale dilation module (MDM) to enrich the multi-scale curve features as well as the noise reduction module (NRM) to reduce the noise in the feature map, and specially design the Laplace module (LM) to enhance the curve extraction performance in side structure guidance. In general, the number of curve pixels is much smaller than the number of non-curve pixels, so this paper uses the cross entropy loss with weights to balance the penalty of the loss function for the curve and non-curve pixels. As a result, SLCENet solves the problem that the pooling operation in the existing curve extraction methods lead to blurred curve edges, and improves the curve extraction accuracy. Second, in order to reduce the error caused by the curve line width on the curve-to-data conversion, and balance the computational complexity and curve thinning accuracy, we design 10 features that can reflect the curve trend, and propose a curve trend features and MLP based curve thinning method (CMCT), which achieve the curve thinning results with high accuracy. Finally, PaddleOCR is used to identify the coordinate labels on the coordinate axes and establish the coordinate transformation formula between the axis coordinates and the pixel coordinates. Result Huge amount of experimental results show that our algorithm has superior accuracy and speed. In curve extraction, SLCENet achieves the optimal dataset scale (ODS) of 0.985, and only costs 0.043 seconds for the image with the resolution of 640×480. For the curve images degraded by JPEG compression, scaling and noising attack, SLCENet still achieves ODS of 0.902. Although the speed of our SLCENet is a little slower than the holistically-nested edge detection (HED), richer convolutional features for edge detection (RCF) and dense extreme inception network (DexiNed), they fail to achieve high curve extraction accuracy. Therefore, combining accuracy and running speed, SLCENet has the best performance. In curve-to-data conversion, our algorithm gets the normalized mean error (NME) of 0.79 and the running speed of 0.83 seconds per image. In model size, SLCENet achieves high accuracy with a lightweight model which is only about 17MB. In order to balance the curve thinning accuracy and computational costs, this paper compares typical machine learning methods for curve thinning task. Experimental results show that decision tree gets the best performance in the curve-to-data conversion accuracy. Nevertheless, considering the curve-to-data conversion accuracy, model size and running speed, MLP is chosen with the best comprehensive performances. Conclusion The side structure guidance and Laplace convolution based curve extraction neural network (SLCENet) and the curve trend features and MLP based curve thinning method (CMCT) achieve the goal of fully automatic curve-to-data conversion with high accuracy. And our algorithm shows greater advantages over existing methods in curve images with JPEG compression, image scaling and noising attacks. Compared with existing methods, our algorithm is free from the limitation of requiring a lot of manual interaction assistance for curve-to-data conversion, which has high accuracy and fast running speed.