Skip to main content

High-performance MindAR implementation for real-time image recognition on edge devices. Developed by FANSEE LAB.

Project description

MindAR Python

High-performance MindAR implementation for real-time image recognition on edge devices.

Features

  • MindAR Compatible: Full compatibility with MindAR .mind file format
  • High Performance: Optimized with numba JIT compilation for edge devices
  • Real-time Detection: Efficient feature detection and matching
  • Modern Architecture: Clean configuration-based API with dataclasses
  • Type Safe: Full type hints and proper error handling
  • Production Ready: Comprehensive testing and linting (pylint score 7.5+)

Installation

From PyPI (Recommended)

pip install mindar

From Source

git clone https://github.com/FANSEE-LAB/mind-ar.git
cd mind-ar
pip install -e .

Requirements

  • Python >= 3.9 (required for numba optimization)
  • OpenCV
  • NumPy
  • msgpack (for .mind file format)
  • numba (for performance optimization)

Usage

Basic Detection

import cv2
from mindar import Detector, Matcher, MindARCompiler
from mindar.types import DetectorConfig, MatcherConfig

# Configure detector with new configuration system
detector_config = DetectorConfig(
    method="super_hybrid",
    max_features=1000,
    debug_mode=False
)
detector = Detector(detector_config)

# Configure matcher
matcher_config = MatcherConfig(
    ratio_threshold=0.75,
    min_matches=8,
    debug_mode=False
)
matcher = Matcher(matcher_config)

# Detect features in image
image = cv2.imread("target.jpg", cv2.IMREAD_GRAYSCALE)
result = detector.detect(image)
feature_points = result["feature_points"]

print(f"Detected {len(feature_points)} features")

Compile .mind Files

from mindar.compiler import MindARCompiler

# Initialize compiler with debug mode
compiler = MindARCompiler(debug_mode=True)

# Compile images to .mind file
success = compiler.compile_directory("./images", "./targets.mind")
if success:
    print("✅ Compilation successful")

# Load compiled targets
mind_data = compiler.load_mind_file("./targets.mind")
print(f"Loaded {len(mind_data['dataList'])} targets")

Performance

Optimized for edge devices like Raspberry Pi 4:

  • Detection: ~50ms per frame (640x480)
  • Matching: ~20ms per target
  • Memory: <100MB usage

License

MIT License - Compatible with original MindAR project

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindar-0.1.2.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mindar-0.1.2-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file mindar-0.1.2.tar.gz.

File metadata

  • Download URL: mindar-0.1.2.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for mindar-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bc3ef8d00752527203e4a1f9154d9a8b588f31747fdc4b92e27c35237c1dc4ae
MD5 2542fe7abd3c362f308c5f21add85b47
BLAKE2b-256 22d8014f1833d8014a3d5e8bc08632a192a11d99e1cbcc4dddc59a578b900b48

See more details on using hashes here.

File details

Details for the file mindar-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mindar-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for mindar-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b4ef00c2a9aad49438ce3a584ea9f454dcaa7dd281b28be9daf912e4d042e4e
MD5 bbbb8f461d2cd567dc2e7e09c3d6765e
BLAKE2b-256 286564dfb201640a98f83c01f609e9df39197c6f701b1686d1ca515dbf546b90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page