Skip to main content

Jormungandr: End-to-End Video Object Detection with Spatial-Temporal Mamba

GitHub Workflow Status (with event) GitHub top language GitHub language count License: MIT Project Version

jormungandr VOD Logo
📋 Table of contents

Description

Jormungandr is an novel end-to-end video object detection system that leverages the Spatial-Temporal Mamba architecture to accurately detect and track objects across video frames. By combining spatial and temporal information, Jormungandr enhances detection accuracy and robustness, making it suitable for various applications such as surveillance, autonomous driving, and video analytics.

Getting started

Prerequisites

Before installing this package, ensure that your system meets the following requirements:

  • Operating System: Linux
  • Python: Version 3.12 or higher
  • Hardware: CUDA-enabled GPU
  • Software Dependencies:
    • NVIDIA drivers compatible with your GPU
    • CUDA Toolkit properly installed and configured, can be checked with nvidia-smi

Installation

PyPI package:

pip install jormungandr-ssm

Alternatively, from source:

pip install git+https://github.com/Knolaisen/jormungandr

Usage

We expose several levels of interface with the Fafnir still image detector and Jormungandr Video Object Detection (VOD) model. Both models follow a simple PyTorch-style API. Due to the Mamba architecture, the models are optimized for GPU execution and require CUDA for inference and training.

Still Image Detection (Fafnir)

Use Fafnir when performing object detection on single images.

import torch
from jormungandr import Fafnir

device = torch.device("cuda")

batch, channels, height, width = 2, 3, 224, 224
x = torch.randn(batch, channels, height, width).to(device)

# Initialize model
model = Fafnir(variant="fafnir-b", pretrained=True).to(device)
model.eval()

# Inference
with torch.no_grad():
    detections = model(x)

Video Object Detection (Jormungandr)

Use Jormungandr for end-to-end video object detection using spatial-temporal modeling.

import torch
from jormungandr import Jormungandr

device = torch.device("cuda")

frames, channels, height, width = 32, 8, 3, 224, 224
x = torch.randn(frames, channels, height, width).to(device)

# Initialize model
model = Jormungandr(variant="jormungandr-b", pretrained=True).to(device)
model.eval()

# Inference
with torch.no_grad():
    detections = model(x)

Pretrained Models

We provide pretrained models hosted on Hugging Face.

  • The Fafnir models (fafnir-t, fafnir-s, fafnir-b) are pretrained on the COCO dataset.
  • The Jormungandr models (jormungandr-t, jormungandr-s, jormungandr-b) are pretrained on the MOT17 dataset.

These models will be automatically downloaded when initialized in your code.

Documentation

Authors

Kristoffer Nohr Olaisen
Kristoffer Nohr Olaisen
Sverre Nystad
Sverre Nystad

License


Distributed under the MIT License. See LICENSE for more information.

Metadata

Release files for jormungandr-ssm 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jormungandr-ssm 0.0.1
File Size Uploaded
jormungandr_ssm-0.0.1.tar.gz 6.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jormungandr-ssm 0.0.1
File Interpreter ABI Platform
jormungandr_ssm-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 MB

Release files / jormungandr_ssm-0.0.1.tar.gz

Download URL jormungandr_ssm-0.0.1.tar.gz
Size 6.3 MB
Tags Source
SHA-256 checksum
How to use checksums
9468d79444ce739ffbe012f56a0b31c212aad2d3efb6b00b07d27f6f10071817
BLAKE2b-256 checksum
How to use checksums
6e96a18cc4162a9bcb12de23881fc42a192fd7be53eea4c686c913d8e559394e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Release files / jormungandr_ssm-0.0.1-py3-none-any.whl

Download URL jormungandr_ssm-0.0.1-py3-none-any.whl
Size 45.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9f7dd4ff41638b9607bfcbe2b59ab0387c0cd2b35ec06673555c69077ab7081
BLAKE2b-256 checksum
How to use checksums
82dba3f1d157aeda96faef1c6d70b5b321cb6a8af68a386993e11e8036b132ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page