This project focuses on detecting aircraft in satellite images using various Computer Vision and Machine Learning techniques. The workflow includes data preprocessing, feature extraction, clustering, and classification using Support Vector Machines (SVMs).
Important
For detailed instructions on installing ucasML tool on your machine, please refer to the ad hoc README.
For a detailed reference of all functions, please refer to the API Documentation.
- Introduction
- βοΈFeatures
- π¦Dependencies
- π¨Installation
- πUsage
- β‘οΈ β β‘οΈPipeline
- π₯Contributors
- πLicense
The aim of this project is to develop an automated system for detecting aircraft in satellite imagery. The project utilizes a combination of image processing techniques, feature extraction methods, and machine learning algorithms to achieve high accuracy in aircraft detection.
- Straight airplanes Extraction: Extract straightened airplanes from the training dataset images.
- Clustering: Perform K-Means clustering based on size and intensity on the airplanes previously extracted.
- Image Resizing: Resize images within each cluster to uniform dimensions.
- Eigenplanes Generation: Generate eigenplanes for the clustered images.
- SVM Training Data Extraction: Extract data from CSV for SVM training.
- Performance Evaluation: Evaluate the performance of the classifier.
Note
The training dataset used is a sub-set of the training dataset of HRPlanesv2 Data Set.
Important
For a detailed description of the underlying ratio of design choices taken, see project_report.pdf.
Ensure you have the above installed on your machine.
Important
Make sure Python is installed system wide (e.g., on Windows, Python must be added to the system PATH
).
For detailed instructions on how to install OpenCV on your machine, please refer to this guide.
Tip
Click the badges to visit their official websites.
For a list of C++20 compliant compilers, click here.
Command Line Instructions
-
Clone the repository:
git clone https://github.com/giusalfieri/IPA_Project.git cd IPA_Project
-
Create a build directory:
mkdir build cd build
-
Configure the project using CMake:
cmake ../src
-
Compile the project:
make
-
Run the project:
./aircraft_detection_project [step1] [step2] ...
For example, to run the entire pipeline, see the Usage below.
CMake GUI and Visual Studio Instructions
-
Clone the repository:
git clone https://github.com/giusalfieri/IPA_Project.git cd IPA_Project
-
Open CMake GUI:
- Set the "Where is the source code" field to the path of the
IPA_Project
directory. - Set the "Where to build the binaries" field to a new
build
directory within theIPA_Project
directory (e.g.,IPA_Project/build
).
- Set the "Where is the source code" field to the path of the
-
Configure the project:
- Click on the "Configure" button.
- Select your version of Visual Studio (e.g., Visual Studio 2022) and the appropriate platform (e.g., x64).
- Click "Finish" to complete the configuration process.
- If there are any missing dependencies, resolve them and click "Configure" again.
-
Generate the project files:
- Once the configuration is complete, click the "Generate" button to create the Visual Studio solution and project files.
-
Open the project in Visual Studio:
- Navigate to the
build
directory and open the generated.sln
file (e.g.,IPA_Project.sln
) with Visual Studio.
- Navigate to the
-
Build the project:
- In Visual Studio, set the build configuration to
Release
orDebug
as needed. - Build the solution by selecting "Build Solution" from the "Build" menu.
- In Visual Studio, set the build configuration to
-
Run the project:
- In Visual Studio, set the startup project to
aircraft_detection_project
. - Start debugging or run the project without debugging as needed.
- For an example of the command-line arguments to run the entire pipeline, see the Usage below.
- In Visual Studio, set the startup project to
To run the entire pipeline, use the following command in the directory where the executable is located:
./aircraft_detection_project extractStraightAirplanes KMeansBySize KMeansByIntensity resizeImagesInClusters generateEigenplanes extract_SVM_Training_Data Performance_evaluation
Or you can run individual steps as needed. See the Pipeline section for the exact order in which the steps should be executed.
Note
It is strongly suggested to execute the steps one by one, as some of them are computationally intensive. For example, extract_SVM_Training_Data
involves template matching for numerous images, each with many airplane templates.
The steps in the pipeline must be executed in the following order to ensure the correct functioning of the process:
extractStraightAirplanes
KMeansBySize
KMeansByIntensity
resizeImagesInClusters
generateEigenplanes
extract_SVM_Training_Data
Performance_evaluation
Make sure to follow this precise order when running the steps.
Important
After each phase completes, a .done
file is created in the /src/steps_completed
folder. When a command is issued, the program verifies the previous step's completion by checking for the corresponding .done
file. If the file is missing, a warning message indicates the unmet prerequisite.
Note
The step extractStraightAirplanes
has already been completed by us, and its .done
file is already present inside /src/steps_completed
folder.
Furthermore, the straight airplanes extracted by us, must be downloaded from a Google Drive folder: see this README.md.
Important
Please ensure that the folders /src/dataset_training
and /src/dataset_for_straight_airplanes_extraction
are populated as specified in their respective README files: dataset_training README and dataset_for_straight_airplanes_extraction README.
Important
The output of the SVM in cross-validation mode are two .sco
files. Rename them positive.sco
and negative.sco
and put them inside /src/svm_cv_outputs
directory.
A detailed description of each step can be found by invoking the executable with the --help
option:
Name | GitHub |
---|---|
Giuseppe Alfieri | @giusalfieri |
Paolo Simeone | @bonoboprog |
Aurora Pisa | @aurorapisa |
Riccardo D'Aguanno | @ricdag8 |
Gianmarco Luongo | @GianmarcoL |
This project is licensed under the MIT License. See the LICENSE file for details.