YOLOv8l-FMSC-Spatial:一种微地图地理要素的检索模型
侯宇豪(1998— ),男,安徽宿州人,硕士生,主要从事微地图检索研究。E-mail: 1638897013@qq.com |
Copy editor: 黄光玉 , 蒋树芳
收稿日期: 2024-06-08
修回日期: 2024-11-25
网络出版日期: 2025-01-24
基金资助
甘肃省高等学校产业支撑计划项目(2022CYZC-30)
国家自然科学基金项目(42430108)
国家自然科学基金项目(41930101)
国家自然科学基金项目(42371463)
国家自然科学基金项目(42271454)
国家自然科学基金项目(42394063)
国家自然科学基金项目(42061076)
兰州交通大学研究生教育教学质量提升工程项目(JG202301)
甘肃省联合科研基金重大项目(24JRRA848)
YOLOv8l-FMSC-Spatial: A Retrieval Model for We-Map Geographical Elements
Received date: 2024-06-08
Revised date: 2024-11-25
Online published: 2025-01-24
Supported by
The Industrial Support and Program Project of Universities in Gansu Province(2022CYZC-30)
The National Natural Science Foundation of China(42430108)
The National Natural Science Foundation of China(41930101)
The National Natural Science Foundation of China(42371463)
The National Natural Science Foundation of China(42271454)
The National Natural Science Foundation of China(42394063)
The National Natural Science Foundation of China(42061076)
The Graduate Education Teaching Quality Improvement Project of Lanzhou Jiaotong University(JG202301)
The Major Program of Joint fund of Gansu Province, China(24JRRA848)
【目的】 当前在微地图的内容检索领域尚缺乏系统性的研究。为了填补这一研究空白,本文提出了一种YOLOv8l-FMSC-Spatial (You Only Look Once v8l- Fewer Multi-Scale Convolution-Spatial, YOLOv8l-FMSC-Spatial)模型,实现在手绘地图场景下地理要素的提取及检索。【方法】 首先通过对比YOLO系列模型,选取最优的YOLOv8l模型,引入C2f-FMSC模块改进最优模型,建立应用于微地图的YOLOv8l-FMSC训练模型,利用该模型实现栅格地图的地理要素提取;其次针对地理要素的检索需要,建立地理要素的空间关系数据库,设计空间计算检索模块Spatial,通过Spatial模块实现地理要素信息的传递与筛选,进一步地计算用户检索信息与数据库地理要素信息的空间关系关联程度;最后根据空间关系关联程度,从微地图数据库中索引包含相关地理要素信息的地图,实现基于空间关系的地理要素检索模型构建。依据上述方法,在手绘校园地图检索场景中进行验证。实验数据源自各个学校发布内容以及学生自由制作,共计493幅手绘校园地图,在全国范围内研究学校代表性地理要素检索,此类要素包括水体、操场、特色建筑,确保准确识别和检索这些特征元素,验证所提模型的实际适用性。【结果】 实验结果表明:训练后的YOLOv8l模型可有效识别手绘地图中的地理要素,并在收集的数据集上验证了模型的有效性和鲁棒性;引入FMSC模块后的YOLOv8l-FMSC模型精确率可达0.8、召回率可达0.764,为实际对比中的最优模型;引入Spatial模块计算模型度量空间关系,可有效捕捉到相关地理要素的空间信息,减少与正射地图检索的差距。【结论】 综上,提出的YOLOv8l-FMSC-Spatial模型可根据顾及空间关系的地理要素条件,快速准确地检索到内容相关的手绘地图,从而填补微地图在内容检索方面的研究空缺。
侯宇豪 , 杨维芳 , 闫浩文 , 李精忠 , 朱昕宇 , 闫香蓉 , 彭毅博 . YOLOv8l-FMSC-Spatial:一种微地图地理要素的检索模型[J]. 地球信息科学学报, 2025 , 27(2) : 461 -478 . DOI: 10.12082/dqxxkx.2025.240327
[Objectives]Currently, systematic research in content retrieval for We-maps is lacking. To address this gap, this paper proposes an approach for geographic feature extraction and retrieval in hand-drawn map scenes using the YOLOv8l-FMSC-Spatial model (You Only Look Once v8l - Fewer Multi-Scale Convolution-Spatial). [Methods]First, different YOLO models were compared to select the optimal YOLOv8l model. The C2f-FMSC module was introduced to improve this model, resulting in the YOLOv8l-FMSC training model specifically designed for We-maps. This model was applied to extract geographic features from raster maps. Next, to meet the retrieval needs of geographic features, a spatial relationship database for these features was established. A spatial computation and retrieval module, Spatial, was designed to process geographic feature information by transmitting and filtering it. The module further calculates spatial correlations between user queries and the geographic feature information in the database. Based on the degree of spatial relationship association, the model indexes maps containing relevant geographic feature information from the We-maps database, enabling the construction of a spatial relationship-based geographic feature retrieval model. The method was validated using hand-drawn campus map retrieval scenarios. The experimental dataset comprised publicly available maps from schools and maps freely created by students, totaling 493 hand-drawn campus maps. These maps were used to study the retrieval of representative geographical elements such as water bodies, sports fields, and unique architectural structures associated with schools nationwide. The focus was on accurately identifying and retrieving these characteristic elements to ensure the model’s practical applicability. [Results] The experimental results indicate: (1) The trained YOLOv8l model effectively identifies geographical elements in self-made maps, with its effectiveness and robustness verified on the proposed dataset; (2)The YOLOv8l model, enhanced with the FMSC module, achieved a precision of 0.8 and a recall of 0.764, making it the optimal choice for practical comparisons; (3)The Spatial calculation model effectively captures the spatial information of relevant geographical elements, narrowing the gap with orthographic map retrieval. By applying this method, the retrieval of geographical elements from hand-drawn campus maps, while considering spatial relationships, becomes achievable. [Conclusions] The proposed model can quickly and accurately retrieve content-relevant hand-drawn maps based on geographic feature conditions, effectively filling the research gap in content retrieval for We-maps.
Key words: geographic elements; YOLOv8; We-maps; hand-drawn campus map; spatial relationships; retrieval
表1 不同YOLOv8模型参数大小对比Tab. 1 Comparison of parameter sizes of different YOLOv8 models |
YOLOv8n | YOLOv8s | YOLOv8m | YOLOv8l | YOLOv8x | |
---|---|---|---|---|---|
参数/M | 3.2 | 11.2 | 25.9 | 43.7 | 68.2 |
表2 检测评价指标Tab. 2 Detection and evaluation indicators |
评估指标 | 定义 | 公式 | 取值范围 | 公式编号 | 变量参数含义 |
---|---|---|---|---|---|
Precision | 精确率 | 0~1 | (4) | TP为被分类至正类别的样本;FP为被分类至负类别的样本 | |
Recall | 召回率 | 0~1 | (5) | FN为被错误分类至正类别的样本 | |
F1 | F1分数 | 0~1 | (6) | F1值是评估二分类模型的一个指标 | |
AP | 平均精确度 | 0~1 | (7) | AP是用于计算单一类别的平均精确度 | |
mAP | 0.800 | 0~1 | (8) | n为设置类别的数量;APS为S类别的AP;mAP为衡量多类别地理要素检测下的的准确性 | |
IoU | 重叠度 | 0~1 | (9) | AS为预测框所包含的面积;BS为真实框所包含的面积 | |
Confidence | 置信度 | 0~1 | (10) | Confidence[19]为每个类别的置信度;Pr(Classi)为某一类别下的条件概率 |
注:式(6)由于精确率与召回率指标计算存在矛盾,因此引入F1值用于综合衡量考虑精确率与召回率,即F1值较高时实验方法较为有效;式(7)张秀再等[29]通过构建P-R曲线,计算曲线下的面积,即AP;式(7)为计算单一类别AP的计算方法;式(8)为多类别AP的计算方法;式(9) IoU是表现检索模型的推理出的边界框准确性,通过设定IoU的阈值可控制检测结果的输出及正负类别的划分;式(10)通过置信度分数可分析该类别存在的可能性。 |
表3 不同YOLO模型验证对比Tab. 3 Verification comparison of different YOLO models |
模型 | Precision | Recall | F1-Confidence | mAP50 |
---|---|---|---|---|
YOLOv3 | 0.647 | 0.771 | 0.70-0.356 | 0.737 |
Scaled-YOLOv4 | 0.721 | 0.697 | 0.70-0.472 | 0.754 |
YOLOv5n | 0.668 | 0.624 | 0.64-0.227 | 0.630 |
YOLOv5s | 0726 | 0.619 | 0.67-0.231 | 0.689 |
YOLOv5m | 0.669 | 0.614 | 0.64-0.191 | 0.668 |
YOLOv5l | 0.836 | 0.568 | 0.66-0.322 | 0.699 |
YOLOv5x | 0.563 | 0.667 | 0.61-0.201 | 0.653 |
YOLOv6n | 0.636 | 0.498 | 0.55-0.243 | 0.530 |
YOLOv6s | 0.764 | 0.491 | 0.59-0.215 | 0.622 |
YOLOv6m | 0.755 | 0.636 | 0.68-0.249 | 0.700 |
YOLOv6l | 0.733 | 0.620 | 0.65-0.202 | 0.694 |
YOLOv6x | 0.651 | 0.664 | 0.66-0.193 | 0.666 |
YOLOv7 | 0.826 | 0.668 | 0.74-0.473 | 0.735 |
YOLOv7-w6 | 0.724 | 0.632 | 0.67-0.391 | 0.684 |
YOLOv7x | 0.775 | 0.721 | 0.75-0.102 | 0.716 |
YOLOv7-d6 | 0.507 | 0.572 | 0.51-0.216 | 0.537 |
YOLOv7-e6 | 0.752 | 0.666 | 0.70-0.415 | 0.718 |
YOLOv7-e6e | 0.677 | 0.789 | 0.72-0.266 | 0.764 |
YOLOv8n | 0.576 | 0.660 | 0.60-0.166 | 0.626 |
YOLOv8s | 0.796 | 0.566 | 0.66-0.266 | 0.721 |
YOLOv8m | 0.677 | 0.661 | 0.69-0.301 | 0.704 |
YOLOv8l | 0.750 | 0.727 | 0.76-0.330 | 0.794 |
YOLOv8x | 0.694 | 0.704 | 0.72-0.242 | 0.769 |
注:加粗数值为同类数据最优部分及所属模型,上述值在0~1范围内。F1-Confidence代表最大F1值所在的置信度,例如0.76-0.330代表该模型在置信度为0.330时F1达到最大值0.76。 |
表4 模型参数设置Tab. 4 Comparison of parameter sizes of different YOLOv8 models |
Epoch | Batch | Patience | 图像大小 | 优化器 |
---|---|---|---|---|
400 | 32 | 30 | 640像素×640像素 | AdamW |
Dropout | Momentum | Lr0 | Lrf | Mosaic |
0.5 | 0.937 | 0.00 01 | 0.01 | 0.8 |
表5 不同YOLO模型对比Tab. 5 Comparison of parameter sizes of different YOLOv8 models |
Precision | Recall | F1-Confidence | mAP50 | mAP50-95 | |
---|---|---|---|---|---|
YOLOv8l | 0.750 | 0.727 | 0.76-0.330 | 0.794 | 0.515 |
YOLOv8n-FMSC | 0.720 | 0.588 | 0.65-0.270 | 0.629 | 0.312 |
YOLOv8s-FMSC | 0.710 | 0.617 | 0.66-0.217 | 0.657 | 0.385 |
YOLOv8m-FMSC | 0.670 | 0.677 | 0.67-0.223 | 0.691 | 0.377 |
YOLOv8l-FMSC | 0.800 | 0.764 | 0.78-0.405 | 0.815 | 0.588 |
YOLOv8x-FMSC | 0.654 | 0.691 | 0.67-0.223 | 0.718 | 0.466 |
注:加粗数值为同类数据中的最优值。F1-Confidence代表最大F1值所在的置信度,例如0.76-0.330代表该模型在置信度为0.330时F1达到最大值0.76。mAP50-95指标是用于表示IOU阈值从0.50到0.95变化的范围内,模型在验证集上的平均精度。 |
表6 不同YOLO模型针对特色建筑识别对比Tab. 6 Comparison of different YOLO models for characteristic building recognition |
模型 | Precision | Recall | F1-Confidence | mAP50 | mAP50-95 |
---|---|---|---|---|---|
YOLOv8l | 0.493 | 0.433 | 0.49-0.206 | 0.441 | 0.233 |
YOLOv8n-FMSC | 0.169 | 0.135 | 0.17-0.075 | 0.078 | 0.020 |
YOLOv8s-FMSC | 0.221 | 0.212 | 0.23-0.122 | 0.151 | 0.054 |
YOLOv8m-FMSC | 0.387 | 0.452 | 0.43-0.175 | 0.381 | 0.197 |
YOLOv8l-FMSC | 0.530 | 0.519 | 0.54-0.189 | 0.477 | 0.262 |
YOLOv8x-FMSC | 0.472 | 0.446 | 0.46-0.185 | 0.447 | 0.234 |
注:加粗数值为同类数据中的最优值。F1-Confidence代表最大F1值所在的置信度,例如0.54-0.189代表该模型在置信度为0.189时F1达到最大值0.54。 |
[1] |
王家耀. 地图科学技术:由数字化到智能化[J]. 武汉大学学报(信息科学版), 2022, 47(12):1963-1977.
[
|
[2] |
陈述彭. 新型地图产品前瞻[J]. 地球信息科学, 2005, 7(2):8-10.
[
|
[3] |
何宗宜, 宋鹰, 李连营. 地图学[M]. 武汉: 武汉大学出版社, 2016.
[
|
[4] |
王家耀. 关于信息时代地图学的再思考[J]. 测绘科学技术学报, 2013, 30(4):329-333.
[
|
[5] |
闫浩文, 张黎明, 杜萍, 等. 自媒体时代的地图:微地图[J]. 测绘科学技术学报, 2016, 33(5):520-523.
[
|
[6] |
侯宇豪, 杨维芳, 马文骏, 等. 一种利用VSM检索微地图的方法[J]. 测绘科学, 2023, 48(12):225-233.
[
|
[7] |
|
[8] |
|
[9] |
赵学敏, 田生湖, 张潇璐. 基于深度学习的以图搜图技术在照片档案管理中的应用研究[J]. 档案学研究, 2020(4):64-68.
[
|
[10] |
顾昕, 张兴亮, 王超, 等. 基于文本和内容的图像检索算法[J]. 计算机应用, 2014, 34(S2):280-282,313.
[
|
[11] |
周熙然, 李德仁, 薛勇, 等. 地图图像智能识别与理解:特征、方法与展望[J]. 武汉大学学报(信息科学版), 2022, 47(5):641-650.
[
|
[12] |
|
[13] |
丁世飞, 齐丙娟, 谭红艳. 支持向量机理论与算法研究综述[J]. 电子科技大学学报, 2011, 40(1):1-10.
[
|
[14] |
汪海燕, 黎建辉, 杨风雷. 支持向量机理论及算法研究综述[J]. 计算机应用研究, 2014, 31(5):1281-1286.
[
|
[15] |
|
[16] |
|
[17] |
周晓彦, 王珂, 李凌燕. 基于深度学习的目标检测算法综述[J]. 电子测量技术, 2017, 40(11):89-93.
[
|
[18] |
|
[19] |
|
[20] |
|
[21] |
|
[22] |
|
[23] |
窦智, 高浩然, 刘国奇, 等. 轻量化YOLOv8的小样本钢板缺陷检测算法[J]. 计算机工程与应用, 2024, 60(9):90-100.
[
|
[24] |
卢子册, 刘小芳, 王德伟. 基于改进YOLOv8的PCB焊点语义分割方法[J]. 无线电工程, 2023(2023-10-31). https://kns.cnki.net/kcms/detail/13.1097.TN.20231031.1454.002.html
[
|
[25] |
油亚鹏, 马波, 赵乐, 等. 基于CA-YOLOv8的输送带大块煤检测方法[J/OL]. 计算机辅助设计与图形学学报, 2024(2024-02-06). https://kns.cnki.net/kcms/detail/11.2925.TP.20240204.1655.057.html
[
|
[26] |
|
[27] |
袁红春, 陶磊. 基于改进的Yolov8商业渔船电子监控数据中鱼类的检测与识别[J]. 大连海洋大学学报, 2023, 38(3):533-542.
[
|
[28] |
李松, 史涛, 井方科. 改进YOLOv8的道路损伤检测算法[J]. 计算机工程与应用, 2023, 59(23):165-174.
[
|
[29] |
魏陈浩, 杨睿, 刘振丙, 等. 具有双层路由注意力的YOLOv8道路场景目标检测方法[J]. 图学学报, 2023, 44(6):1104-1111.
[
|
[30] |
程换新, 矫立浩, 骆晓玲, 等. 改进YOLOv8的遥感图像检测算法[J]. 无线电工程, 2024, 54(5):1155-1161.
[
|
[31] |
张秀再, 沈涛, 许岱. 改进YOLOv8算法的遥感图像目标检测[J/OL]. 激光与光电子学进展, 2023(2023-11-10). https://kns.cnki.net/kcms/detail/31.1690.TN.20231108.1140.078.html
[
|
[32] |
杨锦辉. 基于深度学习的目标检测方法轻量化研究[D]. 北京: 中国科学院大学, 2022.
[
|
[33] |
|
[34] |
|
[35] |
|
[36] |
|
[37] |
邓亚平, 李迎江. YOLO算法及其在自动驾驶场景中目标检测研究综述[J/OL]. 计算机应用, 2023(2023-09-05). https://kns.cnki.net/kcms/detail/51.1307.TP.20230904.1321.006.html
[
|
[38] |
赵继达, 甄国涌, 储成群. 基于YOLOv8的无人机图像目标检测算法[J]. 计算机工程, 2024, 50(4):113-120.
[
|
[39] |
|
[40] |
|
[41] |
|
[42] |
|
[43] |
|
[44] |
|
[45] |
|
[46] |
|
/
〈 |
|
〉 |