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.
🚀 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
- Copy the example environment file:
cp .env.example .env
- Edit
.envwith 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
- Obtain an API key from Anthropic
- Set the key in your environment
Llama Setup
- Install vLLM:
pip install vllm
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2255e6cb9c581909a19ff86e1ecac13138b5dbf7525a8c9bb6175f12212c191
|
|
| MD5 |
6ca269a5bda9a22ad5d4d318bc9b8c9c
|
|
| BLAKE2b-256 |
1ba3528b71d1d537368d8ab18d96f6deadbf0352b2eef5588421ad091bf892cf
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecf43304ae66d5b88f548c70203a6e1ef43d46538ab48bbb8b204f2debb6be65
|
|
| MD5 |
3df756a06413119866cd214b97a5074d
|
|
| BLAKE2b-256 |
9daa81e34874a946902ef2928c84e02e0fd871b003b204dd59c7f7c698a8a491
|