This model detects Shahed-136 military drones in real-time using YOLO12's attention-centric architecture. YOLO12 introduces Area Attention mechanisms and R-ELAN feature aggregation for improved accuracy while maintaining real-time inference speeds.
1from ultralytics import YOLO
2
3# Load model
4model = YOLO("path/to/best.pt")
5
6# Run inference
7results = model("image.jpg")
8
9# Show results
10results[0].show()
1from ultralytics import YOLO
2import cv2
3
4model = YOLO("path/to/best.pt")
5cap = cv2.VideoCapture(0)
6
7while True:
8 ret, frame = cap.read()
9 if not ret:
10 break
11
12 results = model(frame, conf=0.25, verbose=False)
13 annotated = results[0].plot()
14
15 cv2.imshow("Drone Detection", annotated)
16 if cv2.waitKey(1) & 0xFF == ord('q'):
17 break
18
19cap.release()
20cv2.destroyAllWindows()
1from huggingface_hub import hf_hub_download
2
3# Download from specific branch (training run)
4model_path = hf_hub_download(
5 repo_id="shng2025/EDTH-Warsaw-shahed136-detector",
6 filename="best.pt",
7 revision="yolo12m_20251206_144537", # Branch name = run name
8)
1from ultralytics import YOLO
2
3model = YOLO("yolo12m.pt")
4model.train(
5 data="data.yaml",
6 epochs=100,
7 batch=16,
8 imgsz=640,
9 optimizer="AdamW",
10 lr0=0.001,
11 augment=True,
12 mosaic=1.0,
13)
1@software{edth_shahed136_detector,
2 author = {EDTH Team - Orzel 1},
3 title = {YOLO12 Shahed-136 Drone Detector},
4 year = {2025},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/shng2025/EDTH-Warsaw-shahed136-detector}
7}
8
9@article{yolo12,
10 title = {YOLO12: Attention-Centric Real-Time Object Detectors},
11 author = {Tian, Yunjie and Ye, Qixiang and Doermann, David},
12 journal = {arXiv preprint arXiv:2502.12524},
13 year = {2025}
14}