"A.R.M.O.R - Armament Models Recognizer for civilian security."
A comprehensive image classification model from data collection, dataset cleaning, model training, full deployment and API integration.
The model was developed as a security measure that can classify comprehensive 22 different types of most common modern military armaments posing threat for civilians on land and overall civilian security.
- I carried out All-encompassing research on the most typical armaments category.
- I researched the most produced and available armaments in modern times.
- I researched the most used armaments in military activities and conflicts in modern times.
- I researched the easily accessible and obtainable armaments in modern times.
The armament types are following:
- 2S19 Msta artillery
- BM-21 Grad artillery
- G6 Rhino artillery
- M109 artillery
- M270 MLRS artillery
- Smerch artillery
- BMP-2 vehicle
- BTR-80 vehicle
- Humvee vehicle
- LAV-25 vehicle
- M113 vehicle
- MRAP vehicle
- Leopard 2 tank
- M1 Abrams tank
- T-72 tank
- Type 99 tank
- Bayraktar TB2 UCAV drone
- CH-5 Rainbow UCAV drone
- Hermes 900 drone
- Heron TP drone
- MQ-9 Reaper UCAV drone
- RQ-4 Global Hawk UCAV drone
Scope Elaboration: This dataset covers mass amount of armaments of countries and conflicts worldwide such as Yemen, Syria, United States, Iraq, Iran, Ukraine, India, Germany, China, Russia, Turkey. Tank and Artillery shock the opposition while staying robust and afar without taking damage. Unmanned drones are highly used because they can inflict damage without risking pilots, replacing combat planes, harmful intelligence gathering on civilians. Other vehicles are used to support actual infantry engagement. After damage has been dealt with, this infantry engagement via vehicles carries out the final sweep and makes the final decisions. All of these pose a threat to civilians.
Research: Existing military datasets are not tailored towards civilian security focus at all. They also doesn't contain widely armaments and information regarding modern times and conflicts. I aimed to update them for our modern goals. I did research on which categories poses most threat to civilians being on land. I did thorough research on most common armaments on each categories. I researched most produced available armaments in modern times. I researched most used in military operation and wars in modern times. I researched most used armaments.
Data Collection: Computer vision data downloaded using DuckDuckGo API connection searching term names. A grand total of ~5500 images finally consisted our dataset after deeply cleaning dataset. (with more data and categories to be added more later project version)
DataLoader: Used fastai DataBlock API to set up the DataLoader
. Proper dataset split percentage was followed. Proper batch_size
was set to utilize power of GPU.
Data Augmentation: fastai provides default data augmentation which operates in GPU.
Details can be found in data augmentation
section in notebooks/ARMOR_classfier_full_process.ipynb
Training overview: The powerful ResNet-152 model was chosen as starting point due to high amount of categories. I fine-tuned the ResNet-152 model for 20 epochs and achieved up to ~97% accuracy. During this 20 epochs period, I observed train loss and validation loss with attention to ensure overfit doesn't occur.
Data Cleaning: This was the most time-consuming part. I dealt with a lot of noisy data/miscategorization from the browser fetched images. There were also images that interfered. And some images were contaminated. First I did an universal cleaning manually. Then I cleaned and updated data using fastai ImageClassifierCleaner
. I cleaned the data each time after training or finetuning, except for the last time which was the final iteration of the model.
I deployed the model to HuggingFace Spaces server space by packaging the model in my coded Gradio App. The implementation can be found in hf_deployment
folder and online here.
The deployed model API is integrated here in GitHub Pages Website. Deployment implementation and other details can be found in docs
folder.