Intelligent Computer Vision System for Aircraft Maintenance & Component Analysis
A deep learning framework demonstrating how to build automated aircraft component detection systems using YOLOv8, Grounding DINO, and advanced vision-language models for real-world maintenance and analysis applications.
Author: Ishan
This comprehensive framework detects 40+ aircraft components including cylinders, magnetos, carburetors, fuel systems, engine components, and airframe structures. It demonstrates:
- Real-time Detection: YOLOv8-based object detection with configurable confidence thresholds
- Automated Labeling: Grounding DINO vision-language model for AI-powered annotation
- Data Pipeline: Web scraping, image cleaning, and dataset organization
- Web Deployment: Interactive Flask API for inference and visualization
- Production Architecture: End-to-end system from raw data to deployment
Key Achievement: A complete ML system demonstrating automated pipeline architecture that transforms raw aircraft imagery into annotated datasets and production-ready models without manual labeling.
Available on GitHub ✅:
aircraft_detector_app.py- Flask REST API web applicationyolo_detector.py- YOLOv8 detection inference engineautolabel_grounding_dino.py- Vision-language auto-labeling frameworkdata_cleaner.py- Image validation and preprocessing utilitiesscrape.py&scrape_engine_bay_detailed.py- Web scraping enginesaircraft_components/- Sample component reference imageslatest_scripts/- Core ML pipeline componentsrequirements.txt- All Python dependencies- Documentation: DATA_PREP_GUIDE.md, PIPELINE_GUIDE.md, DATASET_SOURCES.md, OPENIMAGES_GUIDE.md
- Complete source code and inline documentation
Not Included (excluded by .gitignore) ❌:
*.ptmodel files (auto-downloaded on first run via Ultralytics)datasets_prepared/- Large processed datasets (multi-GB)runs/- Training artifacts and checkpointsaircraft_labeled/- Labeled training data- Raw image collections from scrapers
- Google Open Images V7 dataset copy
The project implements a complete 4-phase ML pipeline architecture:
Available: Scraping engine source code
- Method: Web scraping from Wikimedia Commons, Flickr, DuckDuckGo
- Technology:
duckduckgo_search,requests, custom scraping logic - Datasets: Designed to integrate with Roboflow, Zenodo, OpenImages
- Output: Structured image collection pipeline
- Note: ❌ Actual datasets not included (download via provided scripts)
Available: Data preprocessing source code
- Functionality: Image validation, format standardization, corruption detection
- Organization: Structured directory creation for training datasets
- Metadata: JSON inventory and tracking support
- Note: ❌ Processed datasets directory excluded (generate by running pipeline)
Available: Vision-language labeling framework
- Method: Grounding DINO for intelligent auto-annotation
- Features:
- Generates bounding box annotations programmatically
- Detects 40+ aircraft component types
- YOLO-compatible output format
- No manual labeling required
- Technology: Hugging Face transformers, autodistill, segment-anything
- Note: ❌ Auto-labeled datasets not included (generate by running script)
Available: Detection inference engine + Flask deployment
- Detection (
yolo_detector.py):- YOLOv8 inference with configurable thresholds
- Type-safe Detection objects with JSON serialization
- CPU/GPU support
- Web API (
aircraft_detector_app.py):- Flask REST API for image upload
- Interactive web UI for real-time detection
- JSON-based results export
- Note: ❌ Trained model weights and training scripts not included (use YOLOv8 fine-tuning)
| Category | Technology |
|---|---|
| ML Framework | PyTorch 2.0+, Ultralytics YOLOv8 |
| Vision Models | Grounding DINO, Segment Anything, YOLOv8 |
| Language Model | Hugging Face Transformers |
| Backend | Flask, Python 3.8+ |
| Data Processing | OpenCV, Pillow, Scikit-learn |
| APIs & SDKs | Roboflow, Hugging Face Hub |
| Deployment | Docker-ready, REST API |
- Python 3.8 or higher
- 4GB+ RAM (8GB+ recommended for advanced features)
- GPU optional (NVIDIA CUDA 11.8+) for faster inference
- Internet connection (downloads YOLOv8 models on first run)
# Clone repository
git clone https://github.com/Ish45883/AI-Aircraft-component-detector.git
cd AI-Aircraft-component-detector
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtNote: YOLOv8 model files (~40MB) will be automatically downloaded on first detection call.
from latest_scripts.yolo_detector import YoloDetector
import cv2
# Initialize detector (downloads YOLOv8n model on first use)
detector = YoloDetector(model_path="yolov8n.pt")
# Load image and detect
image = cv2.imread("path/to/aircraft/image.jpg")
detections = detector.detect_bgr(image, conf=0.25)
# Process results
for detection in detections:
label = detection.label
confidence = detection.confidence
bbox = detection.bbox_xyxy # (x1, y1, x2, y2)
print(f"Found: {label} @ Confidence: {confidence:.1%}")python aircraft_detector_app.pyAccess at http://localhost:5000
Features:
- Upload aircraft images for real-time detection
- Adjust confidence threshold dynamically
- View annotated results with bounding boxes
- Export detections as JSON
- Clean web interface for quick analysis
from latest_scripts.autolabel_grounding_dino import GroundingDinoLabeler
labeler = GroundingDinoLabeler()
# Use for generating annotations on custom datasets
# See script for complete usage examples# Scrape aircraft images from multiple sources
python scrape_engine_bay_detailed.py
# Clean and validate collected images
python data_cleaner.py --input scraped_images/ --output cleaned_images/The repository includes reference scripts for building complete pipelines with your own datasets:
# Phase 1: Download datasets from multiple sources
python scripts/download_datasets.py --sources roboflow zenodo
# Phase 2: Organize and prepare datasets
python scripts/organize_scraped_images.py
python scripts/convert_formats.py
# Phase 3: Auto-label your images with Grounding DINO
python scripts/phase3_batch_autolabel.py --input ./images --output ./annotations
# Phase 4: Train YOLO on your annotated dataset
python scripts/phase4_train_yolo.py --data dataset.yaml --epochs 50📖 See Complete Documentation:
PIPELINE_GUIDE.md- Full pipeline walkthrough with detailed stepsDATA_PREP_GUIDE.md- Data collection and preparation workflowDATASET_SOURCES.md- Information on data sources and licensingOPENIMAGES_GUIDE.md- Working with large-scale OpenImages dataset
These scripts demonstrate the complete architecture—adapt them for your custom datasets and use cases.
AI-Aircraft-component-detector/ # Repository root
├── aircraft_detector_app.py # ✅ Flask web application
├── data_cleaner.py # ✅ Image cleaning utility
├── requirements.txt # ✅ Python dependencies
├── scrape.py # ✅ Web scraping engine
├── scrape_engine_bay_detailed.py # ✅ Advanced scraping
│
├── latest_scripts/ # ✅ Core ML components
│ ├── yolo_detector.py # ✅ Detection inference engine
│ ├── autolabel_grounding_dino.py # ✅ Auto-labeling framework
│ ├── aircraft_classes.yaml # ✅ Component class definitions
│ ├── labeling_optimized.py # Annotation optimization
│ ├── train.py # Training orchestration
│ └── roboflow_label.py # Roboflow dataset integration
│
├── aircraft_components/ # ✅ Sample component reference images
│ └── [aircraft component images]
│
├── DATA_PREP_GUIDE.md # ✅ Data preparation documentation
├── DATASET_SOURCES.md # ✅ Dataset sources & licensing
├── OPENIMAGES_GUIDE.md # ✅ OpenImages integration guide
├── PIPELINE_GUIDE.md # ✅ Complete pipeline documentation
│
├── scripts/ # Reference pipeline scripts
│ ├── download_datasets.py # Multi-source dataset downloader
│ ├── organize_scraped_images.py # Image organization utility
│ ├── convert_formats.py # Format conversion tools
│ ├── phase3_batch_autolabel.py # Batch auto-labeling
│ └── phase4_train_yolo.py # YOLO training orchestration
│
├── google_open_images_v7/ # ❌ Large dataset (not in repo)
├── datasets_prepared/ # ❌ NOT INCLUDED (multi-GB)
├── runs/ # ❌ NOT INCLUDED (artifacts)
└── aircraft_labeled/ # ❌ NOT INCLUDED (labeled data)
✅ Available on GitHub:
- Core detection & inference code
- Auto-labeling framework
- Web application API
- Data cleaning & scraping utilities
- Complete documentation & guides
- Component reference images
❌ Not Included (too large):
*.ptmodel files (downloaded on first run)- Large datasets (Roboflow, Zenodo, OpenImages copies)
- Training artifacts (
runs/directory) - Raw image collections
- Processed dataset directories
The system can identify 40+ aircraft components across multiple categories:
- Cylinders, Pistons, Spark Plugs
- Magnetos, Carburetors, Fuel Pumps
- Alternators, Starter Motors
- Oil Filters, Air Filters
- Exhaust Systems, Intake Manifolds
- Wings, Fuselage, Tail Section
- Wing Spars, Longerons
- Propellers, Landing Gear
- Cockpit Windows, Control Surfaces
- Engine Instruments
- Navigation Equipment
- Electrical Systems
- Hydraulic Components
See latest_scripts/aircraft_classes.yaml for complete class definitions.
- Component Detection: 40+ aircraft component types with high precision
- Inference Speed: Real-time detection on CPU (30-100ms per image)
- GPU Support: Accelerated inference with NVIDIA CUDA
- Model Size: YOLOv8n optimized for edge deployment (~3-4MB)
- Memory Efficiency: ~100-200MB RAM for inference
- Auto-Labeling: AI-powered annotations via Grounding DINO (no manual effort)
Available Benchmark (reference):
- Dataset: 1,052+ aircraft images
- Training: Standard YOLOv8n configuration
- Optimization: CPU and GPU-compatible architecture
Create a .env file in the project root:
ROBOFLOW_API_KEY=your_api_key_here
FLASK_ENV=production
CONFIDENCE_THRESHOLD=0.25Edit latest_scripts/aircraft_classes.yaml to customize:
- Component class definitions
- Detection thresholds
- Training parameters
📖 In-Repository Guides (included):
- PIPELINE_GUIDE.md - Complete 4-phase ML pipeline walkthrough
- DATA_PREP_GUIDE.md - Data collection and preparation steps
- DATASET_SOURCES.md - Dataset sources, licensing, and compliance
- OPENIMAGES_GUIDE.md - Large-scale OpenImages integration
🌐 External Framework Documentation:
- YOLOv8: ultralytics.com/docs
- Grounding DINO: Hugging Face Model Card
- Flask: flask.palletsprojects.com
- PyTorch: pytorch.org/docs
- Hugging Face: huggingface.co
POST /detect
- Upload image for detection
- Parameters: image (file), conf (float, 0-1)
- Returns: JSON with detections, annotated image
GET /health
- System health check
- Returns: status, model info
from latest_scripts.yolo_detector import YoloDetector, Detection
detector = YoloDetector("yolov8n.pt")
detections: List[Detection] = detector.detect_bgr(cv2_image, conf=0.25)
for det in detections:
x1, y1, x2, y2 = det.bbox_xyxy
print(f"{det.label}: {det.confidence:.1%}")- ✅ Type hints throughout codebase
- ✅ Modular, reusable components
- ✅ Comprehensive error handling
- ✅ Logging and monitoring ready
- ✅ Configuration management
- 📦 Multi-source data integration
- 🔄 Batch processing pipelines
- ⚙️ Hardware-agnostic (CPU/GPU support)
- 🎯 Optimized inference engine
- 🚀 Flask REST API
- 📊 JSON output serialization
- 🔐 Environment-based configuration
- 📈 Model versioning support
- Aviation Maintenance: Technicians use the web UI to identify components in maintenance photos
- Documentation Systems: Automated component tagging in technical manuals
- Training Programs: Educational tool for aviation engineers and technicians
- Quality Control: Automated verification in manufacturing and restoration facilities
- Research: Computer vision research on specialized domain detection
- Multi-model ensemble for higher accuracy
- Real-time video stream processing
- Component anomaly detection
- Advanced metrics dashboard
- Mobile app deployment
- Edge device optimization (TensorRT, ONNX)
This project is licensed under the MIT License - see LICENSE file for details.
Data Sources License Compliance:
- Roboflow: CC BY 4.0
- Zenodo: CC BY
- OpenImages: CC BY 4.0 / CC BY-SA 4.0
Ishan | Full-Stack ML Engineer
- 🎯 Computer Vision & Deep Learning specialist
- 🚀 Production ML systems & scalable deployment
✈️ Aircraft component detection & aerospace research- 💻 End-to-end ML pipeline architecture
Repository: github.com/Ish45883/AI-Aircraft-component-detector
For questions, issues, or contributions:
- Check the code: Review script docstrings and inline comments for implementation details
- Review the architecture: Examine the phase components to understand the design
- Run examples: Use the available scripts to see the framework in action
- Adapt & extend: The architecture is designed to be modifiable for custom domains
Contributions are welcome! Feel free to submit issues or pull requests.
✅ Complete Framework: End-to-end architecture from data collection to deployment
✅ Zero Manual Labeling: AI-powered auto-annotation using Grounding DINO
✅ Production Quality: REST API + interactive web interface ready to deploy
✅ Generalized Design: Adaptable for any object detection domain beyond aircraft
✅ Clean Codebase: Type hints, modular architecture, reusable components
✅ Optimized Performance: Lightweight YOLOv8n for real-time inference on CPU
Last Updated: May 2026 | GitHub: Ish45883/AI-Aircraft-component-detector | Status: Active Development