Jormungandr: End-to-End Video Object Detection with Spatial-Temporal Mamba
📋 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 |
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jormungandr_ssm-0.0.1.tar.gz | 6.3 MB | Without provenance | Details for jormungandr_ssm-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jormungandr_ssm-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for jormungandr_ssm-0.0.1-py3-none-any.whl |
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
|
Security for jormungandr-ssm 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.