Anomaly Detection
Identify outliers and anomalous content using embedding distance from cluster centroids. Flag quality issues, novel content, or items that don't match expected patterns.
"Find images that don't match the expected product catalog style with anomaly score above 0.85"
Why This Matters
Anomalies can be problems (data quality issues) or opportunities (novel content). Either way, you need to find them before they find you.
import requestsAPI_URL = "https://api.mixpeek.com"headers = {"Authorization": "Bearer YOUR_API_KEY", "X-Namespace": "your-namespace"}# Create baseline clusters for anomaly detectioncluster = requests.post(f"{API_URL}/v1/clusters", headers=headers, json={"cluster_name": "baseline_distribution","source_collection_ids": ["col_my_collection"],"feature_addresses": ["mixpeek://multimodal_extractor@v1/embedding"],"algorithm": "hdbscan","algorithm_config": {"min_cluster_size": 20}}).json()# Execute to establish baselineexecution = requests.post(f"{API_URL}/v1/clusters/{cluster['cluster_id']}/execute",headers=headers).json()# Get artifacts including outliersartifacts = requests.get(f"{API_URL}/v1/clusters/{cluster['cluster_id']}/executions/{execution['run_id']}/artifacts",headers=headers,params={"include_members": True}).json()# Find anomalies (items marked as noise by HDBSCAN)outliers = [m for m in artifacts.get("members", []) if m["cluster_id"] == -1]print(f"Found {len(outliers)} anomalous items")# Analyze anomaly distributionfor item in outliers[:10]:print(f"Document: {item['document_id']}")print(f"Distance: {item.get('distance', 'N/A')}")
Feature Extractors
Video Embedding
Generate vector embeddings for video content
Retriever Stages
feature search
Search and filter documents by vector similarity using feature embeddings
Documentation
Use Cases Using This Recipe
AI Video Surveillance Analytics
Transform passive camera feeds into actionable security intelligence
85% of events caught live vs. 5% manual baseline
Real-time incident detection rate
Security operations centers, facility managers, and enterprise security teams monitoring 50+ camera feeds across multiple locations
Related Recipes & Resources
Explore these related resources to deepen your understanding and discover more powerful features
Video Embedding
Generate vector embeddings for video content
Video Embedding
Dense vector representations of video content
Image Embedding
Dense vector representations of image content
Semantic Multimodal Search
Unified semantic search across all content types. Query by natural language and retrieve relevant video clips, images, audio segments, and documents based on meaning-not keywords or manual tags.
Feature Extraction
Multi-tier feature extraction that decomposes content into searchable components: embeddings, transcripts, detected objects, OCR text, scene boundaries, and more. The foundation for all downstream retrieval and analysis.
Clustering & Theme Discovery
Unsupervised clustering that groups content into semantic themes using HDBSCAN. Surfaces hidden patterns, content variants, and outliers without requiring predefined labels.