|
| 1 | +# Tello Vision Configuration |
| 2 | +# Supports multiple detection backends: detectron2, yolov8, or custom |
| 3 | + |
| 4 | +# Detection Backend Configuration |
| 5 | +detector: |
| 6 | + backend: "yolov8" # Options: "detectron2", "yolov8", "custom" |
| 7 | + |
| 8 | + # YOLOv8 Configuration (fast, real-time capable) |
| 9 | + yolov8: |
| 10 | + model: "yolov8n-seg.pt" # Options: yolov8n/s/m/l/x-seg.pt (nano to extra-large) |
| 11 | + confidence: 0.5 |
| 12 | + iou_threshold: 0.45 |
| 13 | + device: "cuda" # "cuda" or "cpu" |
| 14 | + |
| 15 | + # Detectron2 Configuration (higher quality, slower) |
| 16 | + detectron2: |
| 17 | + config_file: "COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml" |
| 18 | + model_weights: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl" |
| 19 | + confidence: 0.5 |
| 20 | + device: "cuda" |
| 21 | + num_classes: 80 # COCO dataset |
| 22 | + |
| 23 | + # Classes to detect (COCO format) |
| 24 | + # Set to empty list to detect all classes |
| 25 | + target_classes: [] # e.g., ["person", "car", "dog"] |
| 26 | + |
| 27 | +# DJI Tello Drone Configuration |
| 28 | +drone: |
| 29 | + # Connection settings |
| 30 | + host: "192.168.10.1" |
| 31 | + port: 8889 |
| 32 | + vs_udp_port: 11111 |
| 33 | + |
| 34 | + # Flight parameters |
| 35 | + speed: 50 # cm/s (10-100) |
| 36 | + takeoff_height: 100 # cm |
| 37 | + |
| 38 | + # Video settings |
| 39 | + video_bitrate: 4 # Mbps (1-5) |
| 40 | + fps: 30 |
| 41 | + resolution: [960, 720] # Tello default |
| 42 | + |
| 43 | +# Video Processing |
| 44 | +processing: |
| 45 | + # Display settings |
| 46 | + display_window: true |
| 47 | + window_name: "Tello Vision" |
| 48 | + display_fps: true |
| 49 | + display_stats: true |
| 50 | + |
| 51 | + # Performance optimization |
| 52 | + frame_skip: 0 # Process every Nth frame (0 = process all) |
| 53 | + async_inference: true # Run detection in separate thread |
| 54 | + max_queue_size: 3 # Max frames in inference queue |
| 55 | + |
| 56 | + # Recording |
| 57 | + record_video: false |
| 58 | + output_dir: "./output" |
| 59 | + video_codec: "mp4v" |
| 60 | + |
| 61 | +# Visualization |
| 62 | +visualization: |
| 63 | + # Bounding boxes |
| 64 | + show_boxes: true |
| 65 | + box_thickness: 2 |
| 66 | + box_color: "random" # "random" or [R, G, B] |
| 67 | + |
| 68 | + # Masks |
| 69 | + show_masks: true |
| 70 | + mask_alpha: 0.4 # Transparency (0-1) |
| 71 | + |
| 72 | + # Labels |
| 73 | + show_labels: true |
| 74 | + show_confidence: true |
| 75 | + font_scale: 0.6 |
| 76 | + font_thickness: 2 |
| 77 | + |
| 78 | + # Colors per class (optional) |
| 79 | + class_colors: |
| 80 | + person: [255, 0, 0] |
| 81 | + car: [0, 255, 0] |
| 82 | + # Add more as needed |
| 83 | + |
| 84 | +# Keyboard Controls |
| 85 | +controls: |
| 86 | + takeoff: "tab" |
| 87 | + land: "backspace" |
| 88 | + emergency: "esc" |
| 89 | + forward: "w" |
| 90 | + backward: "s" |
| 91 | + left: "a" |
| 92 | + right: "d" |
| 93 | + up: "space" |
| 94 | + down: "shift" |
| 95 | + yaw_left: "q" |
| 96 | + yaw_right: "e" |
| 97 | + toggle_record: "r" |
| 98 | + take_photo: "enter" |
| 99 | + toggle_tracking: "t" |
| 100 | + quit: "p" |
| 101 | + |
| 102 | +# Logging |
| 103 | +logging: |
| 104 | + level: "INFO" # DEBUG, INFO, WARNING, ERROR |
| 105 | + log_file: "./tello_vision.log" |
| 106 | + log_to_console: true |
0 commit comments