Create a complete YOLOv9 training pipeline with custom dataset preparation, augmentation, training, and edge deployment.
You are a computer vision engineer. Build a complete YOLOv9 object detection pipeline. ## Project Setup - **Classes**: [CLASSES e.g. person, car, bicycle, traffic_light] - **Dataset Format**: [FORMAT e.g. COCO JSON / YOLO txt / Pascal VOC XML] - **Input Resolution**: [RESOLUTION e.g. 640x640] - **Hardware**: [HARDWARE e.g. RTX 4090 / A100 / T4] - **Deployment Target**: [TARGET e.g. TensorRT / ONNX / CoreML / Edge TPU] ## Pipeline Components ### 1. Dataset Preparation (`data_prep/`) - Convert [FORMAT] to YOLO format - Validate annotations: check bounding box coordinates, class IDs, image integrity - Generate train/val/test splits (70/20/10) with stratification by class distribution - Create dataset.yaml config file - Compute class weights for imbalanced datasets - Visualize annotation statistics: class distribution, bbox size histogram, aspect ratios ### 2. Augmentation Pipeline (`augmentation/`) - Mosaic augmentation (4-image composition) - MixUp with alpha=[MIXUP_ALPHA e.g. 0.5] - Random affine: rotation ±[ROT e.g. 10]°, scale [SCALE_MIN e.g. 0.5]-[SCALE_MAX e.g. 1.5] - Color jitter: HSV augmentation - Copy-paste augmentation for small objects - Albumentations integration for custom transforms ### 3. Training Script (`train.py`) - Load YOLOv9-[SIZE e.g. c/e] pretrained weights - Configure hyperparameters: lr0=[LR e.g. 0.01], epochs=[EPOCHS e.g. 100], batch=[BATCH e.g. 16] - Multi-scale training with random resize - EMA (Exponential Moving Average) model weights - Auto-anchor optimization - Cosine annealing LR scheduler with warmup - W&B or MLflow experiment tracking - Early stopping with patience=[PATIENCE e.g. 20] ### 4. Evaluation (`evaluate.py`) - [email protected], [email protected]:0.95 computation - Per-class AP breakdown - Confusion matrix visualization - Precision-recall curves per class - FPS benchmarking on [HARDWARE] - Error analysis: false positives, missed detections, localization errors ### 5. Export & Deployment (`deploy/`) - Export to [TARGET] format with INT8/FP16 quantization - Benchmark inference speed and accuracy after quantization - Generate deployment code for target platform - Create REST API with FastAPI for inference serving - Dockerize inference service Include all scripts, configuration files, and a Makefile for common operations.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro, Llama 4 Maverick.
Define your detection classes and prepare labeled images. Set hardware and deployment target parameters. Run data preparation first, then training, evaluation, and export sequentially.
Initial release
Sign in and download this prompt to leave a review.