1multi_scale: true # 多尺度训练
2cos_lr: true # 余弦退火学习率
3close_mosaic: 20 # 最后20轮关闭马赛克增强
4scale: 0.9 # 缩放范围扩大 (0.1-1.9)
5mosaic: 1.0 # 马赛克增强
6mixup: 0.1 # MixUp增强
7degrees: 10.0 # 旋转增强
8translate: 0.2 # 平移增强
9flipud: 0.5 # 垂直翻转
10fliplr: 0.5 # 水平翻转
11patience: 50 # 早停耐心值
12warmup_epochs: 5 # 预热轮次
1from ultralytics import YOLO
2
3# 加载模型
4model = YOLO("path/to/best.pt")
5
6# 推理
7results = model("satellite_image.jpg")
8
9# 显示结果
10results[0].show()
11
12# 获取检测详情
13for box in results[0].obb:
14 cls_id = int(box.cls)
15 conf = float(box.conf)
16 coords = box.xyxyxyxy # OBB 的 8 个坐标点
17 print(f"类别: {model.names[cls_id]}, 置信度: {conf:.2f}")
1from huggingface_hub import hf_hub_download
2from ultralytics import YOLO
3
4# 下载权重
5weights_path = hf_hub_download(
6 repo_id="Mercyiris/yolo11m-obb-aircraft",
7 filename="best.pt"
8)
9
10# 加载模型
11model = YOLO(weights_path)
12
13# 推理
14results = model("military_airport.jpg", imgsz=1024)
1# A1-A20 到飞机型号的映射
2CLASS_NAMES = {
3 "A1": "SU-35", "A2": "C-130", "A3": "C-17", "A4": "C-5",
4 "A5": "F-16", "A6": "TU-160", "A7": "E-3", "A8": "B-52",
5 "A9": "P-3C", "A10": "B-1B", "A11": "E-8", "A12": "TU-22",
6 "A13": "F-15", "A14": "KC-135", "A15": "F-22", "A16": "F/A-18",
7 "A17": "TU-95", "A18": "KC-10", "A19": "SU-34", "A20": "SU-24"
8}
1@misc{yolo11m-obb-aircraft-2025,
2 title={YOLOv11m-OBB Military Aircraft Detection Model},
3 author={Xie, KaiYuan and Yan, TingXuan},
4 year={2025},
5 publisher={HuggingFace},
6 url={https://huggingface.co/Mercyiris/yolo11m-obb-aircraft}
7}
1@article{yu2023mar20,
2 title={MAR20: A benchmark for military aircraft recognition in remote sensing images},
3 author={Yu, Wenqi and Cheng, Gong and Wang, Meijun and Yao, Yanqing and Xie, Xingxing and Yao, Xiwen and Han, Junwei},
4 journal={Journal of Remote Sensing},
5 volume={27},
6 number={12},
7 pages={2688--2696},
8 year={2023},
9 doi={10.11834/jrs.20222139}
10}