当前位置: X-MOL 学术Empir. Software Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Code Localization in Programming Screencasts
Empirical Software Engineering ( IF 3.5 ) Pub Date : 2020-01-20 , DOI: 10.1007/s10664-019-09759-w
Mohammad Alahmadi , Abdulkarim Khormi , Biswas Parajuli , Jonathan Hassel , Sonia Haiduc , Piyush Kumar

Programming screencasts are growing in popularity and are often used by developers as a learning source. The source code shown in these screencasts is often not available for download or copy-pasting. Without having the code readily available, developers have to frequently pause a video to transcribe the code. This is time-consuming and reduces the effectiveness of learning from videos. Recent approaches have applied Optical Character Recognition (OCR) techniques to automatically extract source code from programming screencasts. One of their major limitations, however, is the extraction of noise such as the text information in the menu, package hierarchy, etc. due to the imprecise approximation of the code location on the screen. This leads to incorrect, unusable code. We aim to address this limitation and propose an approach to significantly improve the accuracy of code localization in programming screencasts, leading to a more precise code extraction. Our approach uses a Convolutional Neural Network to automatically predict the exact location of code in an image. We evaluated our approach on a set of frames extracted from 450 screencasts covering Java, C#, and Python programming topics. The results show that our approach is able to detect the area containing the code with 94% accuracy and that our approach significantly outperforms previous work. We also show that applying OCR on the code area identified by our approach leads to a 97% match with the ground truth on average, compared to only 31% when OCR is applied to the entire frame.

中文翻译:

编程截屏中的代码本地化

编程截屏视频越来越受欢迎,并且经常被开发人员用作学习资源。这些截屏视频中显示的源代码通常无法下载或复制粘贴。如果没有现成的代码,开发人员必须经常暂停视频以转录代码。这很耗时,并且会降低从视频中学习的效率。最近的方法已应用光学字符识别 (OCR) 技术从编程截屏视频中自动提取源代码。然而,它们的主要限制之一是由于屏幕上代码位置的不精确近似而提取噪声,例如菜单中的文本信息、包层次结构等。这会导致不正确的、无法使用的代码。我们旨在解决这一限制,并提出一种方法来显着提高编程截屏中代码本地化的准确性,从而实现更精确的代码提取。我们的方法使用卷积神经网络来自动预测图像中代码的确切位置。我们在从 450 个截屏视频中提取的一组框架上评估了我们的方法,这些视频包括 Java、C# 和 Python 编程主题。结果表明,我们的方法能够以 94% 的准确率检测包含代码的区域,并且我们的方法明显优于以前的工作。我们还表明,在我们的方法识别的代码区域上应用 OCR 会导致与基本事实的平均匹配率为 97%,而将 OCR 应用于整个帧时仅为 31%。导致更精确的代码提取。我们的方法使用卷积神经网络来自动预测图像中代码的确切位置。我们在从 450 个截屏视频中提取的一组帧上评估了我们的方法,这些视频包括 Java、C# 和 Python 编程主题。结果表明,我们的方法能够以 94% 的准确率检测包含代码的区域,并且我们的方法明显优于以前的工作。我们还表明,在我们的方法识别的代码区域上应用 OCR 会导致与基本事实的平均匹配率为 97%,而将 OCR 应用于整个帧时仅为 31%。导致更精确的代码提取。我们的方法使用卷积神经网络来自动预测图像中代码的确切位置。我们在从 450 个截屏视频中提取的一组框架上评估了我们的方法,这些视频包括 Java、C# 和 Python 编程主题。结果表明,我们的方法能够以 94% 的准确率检测包含代码的区域,并且我们的方法明显优于以前的工作。我们还表明,在我们的方法识别的代码区域上应用 OCR 会导致与基本事实的平均匹配率为 97%,而将 OCR 应用于整个帧时仅为 31%。我们在从 450 个截屏视频中提取的一组框架上评估了我们的方法,这些视频包括 Java、C# 和 Python 编程主题。结果表明,我们的方法能够以 94% 的准确率检测包含代码的区域,并且我们的方法明显优于以前的工作。我们还表明,在我们的方法识别的代码区域上应用 OCR 会导致与基本事实的平均匹配率为 97%,而将 OCR 应用于整个帧时仅为 31%。我们在从 450 个截屏视频中提取的一组框架上评估了我们的方法,这些视频包括 Java、C# 和 Python 编程主题。结果表明,我们的方法能够以 94% 的准确率检测包含代码的区域,并且我们的方法明显优于以前的工作。我们还表明,在我们的方法识别的代码区域上应用 OCR 会导致与基本事实的平均匹配率为 97%,而将 OCR 应用于整个帧时仅为 31%。
更新日期:2020-01-20
down
wechat
bug