ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.92k stars 16.4k forks source link

yolov5 Using dji tello video streaming? #4364

Closed Tiang-88 closed 3 years ago

Tiang-88 commented 3 years ago

❔Question

parser.add_argument('--source', type=str, default='0', help='source') # file/folder, 0 for webcam

Here, how to replace the camera of UAV for detection

The following is the acquisition method of UAV video stream

from djitellopy import Tello
import cv2, math, time

tello= Tello()
tello.connect()

tello.streamon()
frame_read = tello.get_frame_read()

while True:
    # In reality you want to display frames in a seperate thread. Otherwise
    #  they will freeze while the drone moves.
    img = frame_read.frame
    cv2.imshow("drone", img)

    key = cv2.waitKey(1) & 0xff
    if key == 27: # ESC
        break
Tiang-88 commented 3 years ago

tello is udp video stream

Tiang-88 commented 3 years ago

??????

glenn-jocher commented 3 years ago

@zzb1967736495 I'm not sure. You may want to ask the package authors at https://github.com/hanyazou/TelloPy

github-actions[bot] commented 3 years ago

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!