A lightning fast and insanely accurate agentic object detection system
Project description
AI Scout
AI Scout is a flexible object detection system that combines YOLO with LLMs for intelligent object identification and analysis.
Quick Start
import os
from aiscout import Scout
from aiscout.providers.anthropic import LLM
# Initialize with your preferred LLM
api_key = os.getenv("ANTHROPIC_API_KEY")
llm = LLM(api_key=api_key, model="claude-3-7-sonnet-20250219")
scout = Scout(llm=llm)
# Run detection
result = scout.detect(
"path/to/image.jpg",
target_list=["target1", "target2"],
confidence_threshold=0.2
)
# Save annotated image
result["annotated_image"].save("output.jpg")
Features
- Combines YOLO and LLM capabilities for enhanced object detection
- Supports multiple LLM providers (Anthropic Claude, OpenAI GPT-4V)
- Advanced prompt customization and management
- Iterative refinement with configurable iterations
- Debug mode for development
- Flexible target specification
- Provider-agnostic interface
Requirements
- Python >=3.9
- ultralytics (YOLO)
- requests
- rich
- Anthropic API key (for Claude) or OpenAI API key (for GPT-4V)
Installation
pip install aiscout
Configuration
Set your API key as an environment variable:
# For Anthropic Claude
export ANTHROPIC_API_KEY="your_api_key"
# For OpenAI
export OPENAI_API_KEY="your_api_key"
Advanced Usage
# Enable debug mode
scout = Scout(llm=llm, debug_mode=True)
# Configure detection parameters
result = scout.detect(
"image.jpg",
target_list=["target1", "target2"],
confidence_threshold=0.2,
min_iterations=3,
max_iterations=6
)
Prompt Customization
from aiscout.prompts import prompt_manager
# Replace entire prompt
prompt_manager.set_prompt(
"identify_objects",
"""Analyze this image and identify objects with these requirements:
1. Focus on vehicles and traffic signs
2. Identify make and model when possible
3. Note any safety hazards"""
)
# Append additional instructions
prompt_manager.append_to_prompt(
"analyze_targets",
"Additional requirement: Prioritize specific vehicle types over generic classes"
)
# Reset prompts
prompt_manager.reset_prompt("identify_objects") # Reset specific prompt
prompt_manager.reset_all() # Reset all prompts
Available prompt types:
identify_objects: Initial object identificationanalyze_targets: Target analysis and mappingrefine_detections: Detection refinement rules
Examples
The examples directory contains:
anthropic/: Claude integration exampleopenai/: GPT-4V integration examplecustom_prompts/: Prompt customization examplessample_images/: Test images
License
MIT License
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
aiscout-0.1.0.tar.gz
(21.8 kB
view details)
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
aiscout-0.1.0-py3-none-any.whl
(26.5 kB
view details)
File details
Details for the file aiscout-0.1.0.tar.gz.
File metadata
- Download URL: aiscout-0.1.0.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6591fc7c3e3b95f616b52af1e26c7a1bed0087a6d05508a15b04af74c96191c
|
|
| MD5 |
865556184142a16653b12de65fb2fa47
|
|
| BLAKE2b-256 |
eff27877c4dc88ecda929e855fe72606c072dedbf988161ef99181b02a11350d
|
File details
Details for the file aiscout-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aiscout-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a17474321fbdcd7b301fd5941740cabdf589767fa3692a6e54dfeb6430bb76df
|
|
| MD5 |
7b12409c0c04e22dd5ac5a04f78a1203
|
|
| BLAKE2b-256 |
37ad706e331a2fe9efd1c83371af74d74bd48b70f94c4dea7bc322ebb2683372
|