Downloads · 30 days
0
JavideuS/aid-image-classification
aid-image-classification is a image classification model from JavideuS. Use it when you need a label for an image.
This repository contains two types of models for classifying aerial images from the AID dataset: 1. Convolutional Neural Network (CNN): A lightweight ResNet-based model. 2. Classic Machine Learning: A Bag of Features…
Downloads · 30 days
0
Access
Public
Updated Dec 3, 2025
Repo size
428 MB
Likes
0
Public
Click a slice to open those files.
.pkl414 MB · 97%
From the Hugging Face model README
This repository contains two types of models for classifying aerial images from the AID dataset:
These models were developed as part of a machine learning assignment to evaluate deep learning approaches against classical computer vision methods.
The architecture consists of an initial convolution layer followed by three residual blocks.
The model is intended for classifying high-resolution aerial scenes into one of 30 categories. It is suitable for:
This model can be fine-tuned on other aerial or satellite imagery datasets.
The model was trained on the Aerial Image Dataset (AID).
The CNN significantly outperformed classical Machine Learning methods (SVM, Random Forest, etc.) evaluated on the same dataset.
| Metric | Value |
|---|---|
| Test Accuracy | 92.80% |
| Macro Average | 0.93 |
| Weighted Average | 0.93 |
| Model | Test Accuracy |
|---|---|
| CNN (This Model) | 0.9280 |
| SVM (RBF Kernel) | 0.7120 |
| Softmax Regression | 0.6580 |
| Random Forest | 0.5680 |
| Naïve Bayes | 0.5280 |
You can use the provided demo.ipynb notebook for a complete example. Below is a snippet to load both models.
from huggingface_hub import hf_hub_download
import joblib
# Download model
model_path = hf_hub_download(
repo_id="JavideuS/aid-image-classification",
filename="classicML/models/bovw_softmax.pkl"
)
# Load pipeline
bundle = joblib.load(model_path)
pipeline = bundle['pipeline']
label_encoder = bundle['label_encoder']
# Predict
# pipeline.predict(["path/to/image.jpg"])
import torch
from NeuralNets.model import PiattiCNN # Ensure you have the model definition
from huggingface_hub import hf_hub_download
# Download checkpoints
checkpoints_path = hf_hub_download(
repo_id="JavideuS/aid-image-classification",
filename="neuralNet/models/PiattiVL_v0.69.pth"
)
# Load model
checkpoints = torch.load(checkpoints_path, map_location='cpu')
model = PiattiCNN(num_classes=checkpoints['num_classes'])
model.load_state_dict(checkpoints['model_state_dict'])
model.eval()
# Inference
# ...
If you use this model or the AID dataset, please cite the original dataset paper:
@article{aid_dataset,
title={AID: A Scene Classification Dataset},
author={Xia, Gui-Song and et al.},
journal={IEEE Transactions on Geoscience and Remote Sensing},
year={2017}
}