Skip to main content

AI-powered RF signal analysis and classification

Project description

SpectroSense 📡

SpectroSense is an AI-powered RF signal analysis and classification tool that combines advanced signal processing with large language models to automatically identify and classify radio frequency signals from spectrograms.

SpectroSense Logo

🚀 Features

  • Multiple AI Models: Support for both Claude and Meta's Llama Vision model
  • Automated Signal Classification: Leverages AI to identify RF signals in spectrograms
  • Direct Image Analysis: Process existing spectrogram images in various formats
  • Batch Processing: Process multiple recordings or images efficiently
  • Detailed Analysis Reports: Generate comprehensive JSON reports of identified signals
  • Visualization Tools: Generate high-quality spectrograms
  • Extensible Architecture: Easy to add new signal types and analysis methods

🛠️ Installation

pip install spectrosense

For development installation:

git clone https://github.com/oldhero5/spectrosense.git
cd spectrosense
pip install -e ".[dev]"

🔧 Configuration

  1. Copy the example environment file:
cp .env.example .env
  1. Edit .env with your settings:
# For Claude
AI_MODEL_TYPE=claude
ANTHROPIC_API_KEY=your_api_key_here

# For Llama
AI_MODEL_TYPE=llama
VLLM_SERVER_URL=http://localhost:8000

📖 Quick Start

from spectrosense import SpectrogramImageAnalyzer
from spectrosense.ai_integration import ModelType

# Using Claude
analyzer = SpectrogramImageAnalyzer(
    model_type=ModelType.CLAUDE,
    anthropic_api_key="your-api-key"
)

# Using Llama
analyzer = SpectrogramImageAnalyzer(
    model_type=ModelType.LLAMA,
    vllm_server_url="http://localhost:8000"
)

# Analyze a single image
result = analyzer.analyze_spectrogram_image("spectrogram.png")
print(result)

# Batch process a directory
results = analyzer.batch_analyze_images("spectrograms/")

📊 Example Output

{
    "signal_types": ["wifi_halow"],
    "confidence": "high",
    "features": [
        "2MHz channel bandwidth",
        "Regular packet structure",
        "Center frequency: 919MHz"
    ],
    "notes": "IEEE 802.11ah signal with MCS0 modulation"
}

🚀 Model Setup

Claude Setup

  1. Obtain an API key from Anthropic
  2. Set the key in your environment

Llama Setup

  1. Install vLLM:
pip install vllm
  1. Start the vLLM server:
python -m vllm.entrypoints.api_server \
    --model meta-llama/Llama-3.2-11B-Vision-Instruct \
    --port 8000

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🎯 Roadmap

  • Support for more AI models
  • Real-time signal processing
  • Web interface for analysis
  • GPU acceleration
  • Batch processing optimization
  • Custom model training

📚 Documentation

Full documentation is available at spectrosense.readthedocs.io


Made with ❤️ by the SpectroSense Team

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

spectrosense-0.3.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

spectrosense-0.3.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file spectrosense-0.3.0.tar.gz.

File metadata

  • Download URL: spectrosense-0.3.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for spectrosense-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f2255e6cb9c581909a19ff86e1ecac13138b5dbf7525a8c9bb6175f12212c191
MD5 6ca269a5bda9a22ad5d4d318bc9b8c9c
BLAKE2b-256 1ba3528b71d1d537368d8ab18d96f6deadbf0352b2eef5588421ad091bf892cf

See more details on using hashes here.

File details

Details for the file spectrosense-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: spectrosense-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for spectrosense-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecf43304ae66d5b88f548c70203a6e1ef43d46538ab48bbb8b204f2debb6be65
MD5 3df756a06413119866cd214b97a5074d
BLAKE2b-256 9daa81e34874a946902ef2928c84e02e0fd871b003b204dd59c7f7c698a8a491

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