This project implements an Aircraft Detector using YOLOv8 to detect aircraft in images. The dataset is automatically split into train, validation, and test sets, and a YOLOv8 Nano model is trained on this data.
├── dataset.yaml # YOLO dataset config
├── weights/
│ ├── best.pt # Best trained model
│ ├── last.pt # Last trained model
├── train_model_v2.py # Training script
├── test_v2.py # Inference script
├── README.md # Project documentation
Ensure you have Python 3.8+ installed. Then, install dependencies:
pip install ultralytics numpy matplotlib opencv-python The dataset is automatically split into train (80%), validation (10%), and test (10%) during execution. Dataset: https://www.kaggle.com/datasets/khlaifiabilel/military-aircraft-recognition-dataset/data
To train the YOLOv8 model, run:
python train_model_v2.pyThis will:
- Load the YOLOv8-Nano model (
yolov8n.pt) - Train the model for 15 epochs (increase to 50 if your machine can handle)
- Save trained weights in the
weights/directory
Run inference on test images:
python test_v2.pyThis will:
- Detect objects in all test images
- Draw bounding boxes and count objects
- Display results using Matplotlib
The trained model is evaluated using:
- Precision
- Recall
- F1 Score
Results :
F1 Curve :
PRECISION Curve :
PRECISION RECALL Curve :
RECALL Curve : 
The trained YOLOv8 model weights are saved in the weights/ directory:
- best.pt – Best performing model checkpoint
- last.pt – Model from the last training epoch
Agneya Pathare – Robotics Engineer | AI & Computer Vision Developer




