Add metadata and improve model card
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,15 +1,75 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
```bash
|
| 8 |
git clone https://huggingface.co/Jamtang/classification
|
| 9 |
cd classification
|
| 10 |
```
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
```bash
|
| 13 |
python app.py
|
| 14 |
```
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-classification
|
| 4 |
+
tags:
|
| 5 |
+
- remote-sensing
|
| 6 |
+
- mamba
|
| 7 |
+
- mixture-of-experts
|
| 8 |
+
- cnn
|
| 9 |
---
|
| 10 |
+
|
| 11 |
+
# AFM-Net: Hierarchical Fusion of Local and Global Visual Features with Mixture-of-Experts for Remote Sensing Image Scene Classification
|
| 12 |
+
|
| 13 |
+
This repository contains the pre-trained model weights for **AFM-Net**, presented in the paper [Hierarchical Fusion of Local and Global Visual Features with Mixture-of-Experts for Remote Sensing Image Scene Classification](https://huggingface.co/papers/2510.27155).
|
| 14 |
+
|
| 15 |
+
AFM-Net is a parallel heterogeneous framework that synergizes CNN-based local texture extraction with Mamba-based global sequence modeling. It utilizes a hierarchical fusion module to integrate features across different semantic levels and an adaptive Mixture-of-Experts (MoE) classifier head for fine-grained scene recognition.
|
| 16 |
+
|
| 17 |
+
## 🔍 Introduction
|
| 18 |
+
|
| 19 |
+
Remote sensing scene classification of high-resolution images remains a challenging task due to complex spatial structures and high intra-class variance. We propose a parallel heterogeneous framework that:
|
| 20 |
+
- **Synergizes Local and Global Visual Encoder**: Coupling CNN-based local texture extraction with Mamba-based global sequence modeling to ensure robust co-representation.
|
| 21 |
+
- **Hierarchical Fusion Strategy**: Employs a hierarchical fusion module to densely integrate heterogeneous features across different semantic levels.
|
| 22 |
+
- **Adaptive MoE Classifier**: Uses a Mixture-of-Experts (MoE) head to dynamically select optimal features, balancing performance with efficiency.
|
| 23 |
+
|
| 24 |
+
Extensive experiments show our model achieves state-of-the-art performance on AID, NWPU-RESISC45, and UC Merced datasets.
|
| 25 |
+
|
| 26 |
+
## ⚙️ Installation
|
| 27 |
+
|
| 28 |
+
### 1. Clone this repository:
|
| 29 |
```bash
|
| 30 |
git clone https://huggingface.co/Jamtang/classification
|
| 31 |
cd classification
|
| 32 |
```
|
| 33 |
+
|
| 34 |
+
### 2. Create a Python virtual environment and install dependencies:
|
| 35 |
+
```bash
|
| 36 |
+
conda create -n class python=3.8 -y
|
| 37 |
+
conda activate class
|
| 38 |
+
pip install -r requirements.txt
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## 🚀 Usage
|
| 42 |
+
|
| 43 |
+
### Inference / Application
|
| 44 |
+
To run the provided application:
|
| 45 |
```bash
|
| 46 |
python app.py
|
| 47 |
```
|
| 48 |
|
| 49 |
+
### Training
|
| 50 |
+
To train the model on a specific dataset (e.g., AID):
|
| 51 |
+
```bash
|
| 52 |
+
python train.py --dataset AID --batch_size 32 --epochs 500
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## 🔥 Performance
|
| 56 |
+
| Dataset | F1 Score |
|
| 57 |
+
| :--- | :---: |
|
| 58 |
+
| UC Merced | 96.81 |
|
| 59 |
+
| AID | 93.71 |
|
| 60 |
+
| NWPU-RESISC45 | 95.52 |
|
| 61 |
+
|
| 62 |
+
## Links
|
| 63 |
+
- **Paper**: [https://huggingface.co/papers/2510.27155](https://huggingface.co/papers/2510.27155)
|
| 64 |
+
- **Code**: [https://github.com/tangyuanhao-qhu/AFM-Net](https://github.com/tangyuanhao-qhu/AFM-Net)
|
| 65 |
+
|
| 66 |
+
## Citation
|
| 67 |
+
If you find this work helpful or inspiring, please consider citing it:
|
| 68 |
+
```bibtex
|
| 69 |
+
@article{tang2025hierarchical,
|
| 70 |
+
title={Hierarchical Fusion of Local and Global Visual Features with Mixture-of-Experts for Remote Sensing Image Scene Classification},
|
| 71 |
+
author={Tang, Yuanhao and Zou, Xuechao and Hu, Zhengpei and Xing, Junliang and Zhang, Chengkun and Huang, Jianqiang},
|
| 72 |
+
journal={arXiv preprint arXiv:2510.27155},
|
| 73 |
+
year={2025}
|
| 74 |
+
}
|
| 75 |
+
```
|