Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Marek
Published © MPL-2.0

Detecting Airplanes in Images Using AI

The aim of the project is to practically verify the capabilities of Yolo algorithms in detecting airplanes in photos.

BeginnerProtip4 hours101
Detecting Airplanes in Images Using AI

Things used in this project

Hardware components

Minisforum Venus UM790 Pro with AMD Ryzen™ 9
Minisforum Venus UM790 Pro with AMD Ryzen™ 9
×1

Software apps and online services

Microsoft Visual Studio 2019
Python 3
Anaconda
AMD Ryzen AI SW

Story

Read more

Code

plane.py

Python
from ultralyticsplus import YOLO, render_result

model = YOLO('keremberke/yolov8m-plane-detection')

model.overrides['conf'] = 0.25  # NMS confidence threshold
model.overrides['iou'] = 0.45  # NMS IoU threshold
model.overrides['agnostic_nms'] = False  # NMS class-agnostic
model.overrides['max_det'] = 1000  # maximum number of detections per image

image = 'https://images.ctfassets.net/cnu0m8re1exe/432CoTAbQif6AAjTztTNAM/2f46d0982f97d8c8ec513cde2596a495/shutterstock_365678825.jpg'

results = model.predict(image)

print(results[0].boxes)
render = render_result(model=model, image=image, result=results[0])
render.show()

Credits

Marek
4 projects • 1 follower

Comments