Skip to content

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.

License

Notifications You must be signed in to change notification settings

agneya-1402/Aircraft_Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aircraft Detector using YOLOv8

Overview

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.

1 2 3 4 5

Project Structure

├── 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

Installation

Ensure you have Python 3.8+ installed. Then, install dependencies:

pip install ultralytics numpy matplotlib opencv-python 

Dataset Preparation

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

Training the Model

To train the YOLOv8 model, run:

python train_model_v2.py

This 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

Testing the Model

Run inference on test images:

python test_v2.py

This will:

  • Detect objects in all test images
  • Draw bounding boxes and count objects
  • Display results using Matplotlib

Evaluation Metrics

The trained model is evaluated using:

  • Precision
  • Recall
  • F1 Score

Results : Results F1 Curve : F1_curve PRECISION Curve : PR_curve PRECISION RECALL Curve : P_curve RECALL Curve : R_curve

Model Weights

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

Author

Agneya Pathare – Robotics Engineer | AI & Computer Vision Developer

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages