AIS Anomaly ViT v2

ais_anomaly

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:

  1. AIS trajectory extraction
  2. Geographic normalization
  3. Route visualization generation
  4. Image resizing to ViT input dimensions
  5. 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
Safetensors
Model size
85.8M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Neo111x/ais-anomaly-vit-v2