Instructions to use Neo111x/ais-anomaly-vit-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Neo111x/ais-anomaly-vit-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Neo111x/ais-anomaly-vit-v2") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("Neo111x/ais-anomaly-vit-v2") model = AutoModelForImageClassification.from_pretrained("Neo111x/ais-anomaly-vit-v2") - Notebooks
- Google Colab
- Kaggle
AIS Anomaly ViT v2
Model Overview
AIS Anomaly ViT v2 is a Vision Transformer (ViT) model fine-tuned for maritime anomaly detection using visual representations derived from Automatic Identification System (AIS) vessel tracks.
The model classifies vessel trajectory images into:
- Normal Maritime Behavior
- Anomalous Maritime Behavior
The objective is to support maritime domain awareness, vessel monitoring, maritime security operations, and geospatial intelligence workflows by automatically identifying suspicious vessel movement patterns from AIS-derived visualizations.
The model was trained using the AIS Anomaly v1-30 dataset.
Model Details
| Property | Value |
|---|---|
| Architecture | Vision Transformer (ViT) |
| Base Model | google/vit-base-patch16-224 |
| Task | Image Classification |
| Domain | Maritime Analytics |
| Input | AIS Track Images |
| Output | Binary Classification |
| Classes | Normal, Anomaly |
| Framework | Transformers |
| Training Dataset | Neo111x/ais-anomaly-v1-30 |
Intended Use
Primary Use Cases
- Maritime anomaly detection
- Vessel behavior monitoring
- Maritime traffic surveillance
- Illegal fishing detection support
- Dark vessel activity analysis
- Maritime OSINT and GEOINT workflows
- Maritime security research
- AIS trajectory intelligence
Example Applications
- Coast guard monitoring systems
- Maritime traffic management
- Port security operations
- Maritime threat intelligence platforms
- Geospatial AI research
- AIS analytics dashboards
Dataset
AIS Anomaly v1-30
The model was trained on:
Dataset: Neo111x/ais-anomaly-v1-30
The dataset contains AIS trajectory visualizations generated from vessel movement data.
Each image represents a vessel track encoded as a visual pattern suitable for computer vision models.
Classes include:
- Normal vessel movement
- Anomalous vessel movement
Potential anomaly categories represented in the data may include:
- Unusual route deviations
- Suspicious loitering
- AIS gaps or interruptions
- Unexpected course changes
- Irregular movement behavior
Training Procedure
Preprocessing
AIS trajectories are transformed into image representations before training.
Typical preprocessing steps include:
- AIS trajectory extraction
- Geographic normalization
- Route visualization generation
- Image resizing to ViT input dimensions
- Dataset balancing and augmentation
Training Configuration
| Parameter | Value |
|---|---|
| Model Type | Vision Transformer |
| Image Size | 224 × 224 |
| Classification Type | Binary |
| Optimizer | AdamW |
| Framework | PyTorch + Transformers |
Evaluation
The model was evaluated on a held-out validation split derived from the AIS Anomaly v1-30 dataset.
Evaluation metrics may include:
- Accuracy
- Precision
- Recall
- F1 Score
- Confusion Matrix Analysis
Users are encouraged to perform independent evaluation on operational maritime datasets before deployment in production environments.
Usage
Install Dependencies
pip install transformers torch pillow
Load the model
from transformers import AutoImageProcessor, AutoModelForImageClassification
model_name = "Neo111x/ais-anomaly-vit-v2"
processor = AutoImageProcessor.from_pretrained(model_name)
model = AutoModelForImageClassification.from_pretrained(model_name)
Inference example
from PIL import Image
import torch
from transformers import AutoImageProcessor, AutoModelForImageClassification
model_name = "Neo111x/ais-anomaly-vit-v2"
processor = AutoImageProcessor.from_pretrained(model_name)
model = AutoModelForImageClassification.from_pretrained(model_name)
image = Image.open("trajectory.png").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(-1).item()
print("Predicted class:", predicted_class)
Citation
@misc{cherif2026aisanomalyvitv2,
title={AIS Anomaly ViT v2},
author={Bilel Cherif},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/Neo111x/ais-anomaly-vit-v2}
}
- Downloads last month
- 25
