Skip to content

Ajinkya-001/Identifying-Military-Assets-with-Satellite-Image-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python PyTorch YOLOv8 FastAPI MLflow Docker License

Identifying Military Assets with Satellite Image Analysis

Project Overview

This project leverages YOLOv8 object detection and satellite imagery to automatically identify and map military infrastructure. Designed for real-time analysis, it integrates FastAPI for API serving and provides clear geospatial visualizations of detected assets.

Key Highlights:

Detection of military facilities from high-resolution satellite imagery

Fast and scalable inference using YOLOv8

Integrated with FastAPI for API deployment

Designed for potential deployment in defense-tech R&D and advanced geospatial intelligence systems

Pipeline Overview

  1. Data Preprocessing → Image resizing, normalization, annotation.
  2. Model Training → YOLOv8 fine-tuned on satellite dataset.
  3. Evaluation → Precision (85.8%), Recall (44.9%), mAP@50 = 50.9%.
  4. Experiment Tracking → MLflow logs for metrics & hyperparams.
  5. API Serving → FastAPI provides /predict endpoint.
  6. Deployment → Containerized with Docker.
  7. Visualization → Results mapped with bounding boxes + geospatial view.

Dataset Preparation

The model was trained on a custom dataset of satellite imagery. The raw dataset is available here - https://drive.google.com/drive/folders/1JhbzmCQK6aqwd33azx9k4zvuqr7FXZ_A?usp=sharing

Important Note:

The provided dataset contains raw images and their corresponding label files. To use it for training this YOLOv8 model, you must perform the following preparation steps:

Dataset Splitting: You need to split the data into training, validation, and test sets (e.g., 70%/20%/10%). This can be done using scripts from the scripts/ directory.

Label Format Conversion: Ensure the label files are converted to the correct format expected by YOLOv8 (typically .txt files with one file per image, containing class_id center_x center_y width height normalized to 0-1).

The repository includes utility scripts (scripts/split_dataset.py, scripts/convert_labels.py) to help automate this process. Please refer to the comments within those scripts for usage instructions.

After preparation, your dataset directory should be structured as follows:

image

Directory Structure

image

Setup & Installation

  1. Clone the repo:
    git clone git@github.com:Ajinkya-001/Identifying-Military-Assets-with-Satellite-Image-Analysis.git
    cd Identifying-Military-Assets-with-Satellite-Image-Analysis
    
  2. Create a virtual environment & install dependencies:
    python -m venv yolo_env
    source yolo_env/bin/activate
    pip install -r requirements.txt
    
  3. Run the FastAPI server:
    uvicorn app.main:app --reload
    

Usage

Access the API at http://localhost:8000/

Send satellite images for military asset detection

Receive detection results with bounding boxes and confidence scores

Visualization

Detected bounding boxes can be overlaid on images for quick analysis.

image

Training Results

image

Results (Final Epoch)

Training Losses

Box loss: 1.434

Cls loss: 0.842

DFL loss: 0.916

Validation Losses

Box loss: 1.466

Cls loss: 0.867

DFL loss: 0.920

Metrics

Precision (B): 85.8%

Recall (B): 44.9%

mAP@50 (B): 50.9%

mAP@50-95 (B): 28.6%

Confusion Matrix

The normalized confusion matrix below shows class-wise prediction accuracy and misclassifications:

image

interpretation of your matrix

Fighter jet: 64% correctly classified, but often confused with background.

Radar: strongest detection (74% correct).

Tank: seems underrepresented (little data or poor detection).

Military truck: confused with background often.

Background: relatively well recognized (71%), but sometimes objects are misclassified as background.

Future Enhancements

Real-time streaming satellite data processing

Integration with geospatial visualization dashboards

Multi-class military asset classification

Acknowledgements

YOLOv8-Object detection framework

Open satellite datasets – Training and validation

FastAPI – API framework

Author

Ajinkya Patil

LinkedIn : https://www.linkedin.com/in/ajinkya-patil-728a19313/

About

AI system using YOLOv8 to detect and track military assets from satellite imagery, with FastAPI deployment and geospatial visualization for strategic analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors