You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

FG-MV20 Experimental Model Weights

This repository releases the fine-grained maritime vessel image classification model weights and evaluation artifacts produced during the experiments for the FG-MV20 dataset. It is intended for research reproduction, model comparison, and further method development. The original FG-MV20 images, complete training code, and model definitions are not included.

Repository Contents

The repository contains six model-experiment directories. Each directory generally includes:

  • best_model.pth or best_model.pt: the PyTorch checkpoint saved at the best validation accuracy;
  • experiment_summary.json / summary.json: training configuration, dataset statistics, and test results;
  • test_predictions.csv: per-image predictions on the test split;
  • confusion_matrix.csv and confusion_matrix.png: the confusion matrix;
  • training_history.csv, epoch_history.csv, or epoch_metrics.csv: per-epoch training records;
  • training_curves.png, curve_accuracy.png, curve_loss.png, and related plots: training curves;
  • classification_report.txt: class-wise evaluation metrics (available for selected experiments).

The root-level scripts make_paper_figures.py and plot_individual_accuracy.py are provided for generating paper figures; they are not model inference APIs.

Models and Results

The test metrics below are taken from the experiment summary files in the corresponding directories and are reported as percentages. Because input resolutions and training configurations differ across models, these results should be interpreted as a comparison under the experimental settings used in this work.

Directory Model / Backbone Input Size (W×H) Parameters Best Val. Acc. Test Top-1 Test Macro-F1 Weight
ConvNeXt-Tiny ConvNeXt-Tiny 1024×512 27.836M 91.52% 91.01% 90.30% best_model.pth
DINOv2 DINOv2 ViT-L 518×280 Not recorded 91.52% 91.61% 90.87% best_model.pt
PMG PMG + ConvNeXt-Tiny 1024×512 28.571M 90.32% 89.69% 88.72% best_model.pth
ResNet-50v2 ResNet-50 (IMAGENET1K_V2) 1024×512 23.549M 90.92% 91.25% 90.51% best_model.pth
Swin-Tiny Swin-Tiny 1024×512 27.535M 90.44% 90.77% 90.08% best_model.pth
TransFG TransFG (ViT-B/16 + Part Selection + Contrastive Loss) 512×256 86.057M 89.49% 90.29% 89.61% best_model.pth

Dataset and Labels

The experiments use a fixed FG-MV20 split containing 6,688 training images, 837 validation images, and 834 test images across 20 classes. The label indices are consistent across all experiments (class_to_idx, starting from 0):

0 aircraft_carrier        1 bulk_carrier           2 car_carrier
3 container_ship           4 cruise_ship            5 destroyer
6 dredger                  7 fishing_vessel         8 frigate
9 offshore_support_vessel 10 oil_tanker           11 passenger_ferry
12 patrol_boat             13 pilot_boat             14 recreational
15 rescue_vessel           16 research_vessel       17 sailboat
18 submarine               19 tugboat

Using the Weights

These files are native PyTorch checkpoints saved by different experiment scripts. Depending on the experiment, a checkpoint may be a full dictionary containing a state_dict, epoch, and optimizer state, or it may contain the parameter dictionary directly. Since the corresponding model classes are not included, the weights cannot be used for inference through transformers or timm based on the file name alone. Please reconstruct the model with the original architecture, classification head, image preprocessing, and checkpoint-key mapping.

Generic checkpoint inspection example:

import torch

checkpoint = torch.load("ConvNeXt-Tiny/best_model.pth", map_location="cpu")

if isinstance(checkpoint, dict):
    print("checkpoint keys:", list(checkpoint.keys()))
    state_dict = checkpoint.get("state_dict", checkpoint.get("model_state_dict", checkpoint))
else:
    state_dict = checkpoint

# Build `model` using the same architecture as the original experiment.
# model.load_state_dict(state_dict, strict=True)
# model.eval()

For inference, please ensure that:

  1. You use the same aspect ratio and input resolution as the corresponding experiment;
  2. You apply the normalization and test-time transforms used by the training code, while preserving the label order;
  3. You use the model-specific heads and additional modules for DINOv2, PMG, and TransFG; these checkpoints cannot be substituted into a standard classifier without modification;
  4. You treat .pt and .pth files as weight artifacts only. They are not directly deployable TorchScript or ONNX models.

Evaluation Artifacts

Use test_predictions.csv to inspect per-image predictions. The confusion matrices and classification reports support analysis of class-level errors. Paths recorded in the experiment summaries refer to the original local training environment and are not expected to be accessible in this Hugging Face repository.

Reproducibility

For full reproduction, please obtain the following in addition to this repository:

  • the FG-MV20 dataset and the FG-MV20-SPLIT partition used in these experiments;
  • the corresponding network definitions and training scripts;
  • PyTorch, torchvision/timm, CUDA, and pretrained-model versions matching the experiment summaries;
  • experiment_summary.json or summary.json from each model directory to verify hyperparameters and label mappings.

Citation

If this repository or the FG-MV20 dataset is useful for your research, please cite the associated paper:

@misc{fgmv20,
  title  = {FG-MV20: Fine-Grained Maritime Vessel Dataset with Multi-Level Semantic Annotations},
  author = {Please complete with the final publication information},
  year   = {2026}
}

License and Disclaimer

No standalone license file is currently included. Before uploading this repository to Hugging Face, please add a LICENSE consistent with the paper, dataset source, pretrained models, and software dependencies, and verify that you have permission to redistribute the weights and evaluation artifacts. The models are intended for research and non-commercial evaluation. Validate performance, bias, and suitability independently before any operational deployment.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support