oladokedamilola/image-processing-api
๐ฏ Image Processing Server
A high-performance computer vision server built with FastAPI and OpenCV, specializing in real-time image and video analysis. This production-ready solution provides advanced image processing capabilities for surveillance, monitoring, and multimedia analysis applications.
   
๐ Live Demo & API Endpoint
๐ฏ Core Image Processing Capabilities
Detection & Recognition
- Multi-class Object Detection: Identify 80+ object categories using YOLOv8 Nano
- Human Detection: Specialized people detection using HOG descriptors and Haar Cascades
- Vehicle Recognition: Car, truck, motorcycle, and bus detection
- Motion Analysis: Frame differencing for movement detection and activity monitoring
- Bounding Box Intelligence: Precise object localization with confidence scoring
Image Analysis Features
- Real-time Processing: Sub-3-second response times for image analysis
- Confidence Thresholding: Adjustable sensitivity (0.1-0.9) for detection accuracy
- Size-based Filtering: Configurable minimum object dimensions for filtering
- Multi-model Processing: Ensemble approach combining YOLOv8 with traditional CV algorithms
๐ง Processing Functionality
Image Processing Pipeline
Input โ Validation โ Decoding โ Preprocessing โ Detection โ Analysis โ Response
โ โ โ โ โ โ โ
File Check โ Format Verify โ OpenCV Load โ Optimization โ Model Inference โ JSON Format โ API ReturnSupported Operations
- Single Image Analysis: Immediate processing with detailed detection results
- Batch Image Processing: Multiple image analysis in optimized sequences
- Video Frame Extraction: Intelligent frame sampling for video analysis
- Format Conversion: Automatic normalization across different image formats
- Metadata Extraction: Image dimensions, properties, and quality assessment
๐ Detection & Output
Detection Results Structure
{
"detections": [
{
"label": "person",
"confidence": 0.92,
"bbox": [120, 85, 310, 480],
"dimensions": {"width": 190, "height": 395},
"position": {"center_x": 215, "center_y": 282.5}
},
{
"label": "car",
"confidence": 0.87,
"bbox": [450, 200, 620, 320],
"dimensions": {"width": 170, "height": 120},
"position": {"center_x": 535, "center_y": 260}
}
],
"image_analysis": {
"resolution": "1920x1080",
"color_profile": "RGB",
"detection_summary": {
"total_objects": 7,
"people_count": 3,
"vehicles_count": 2,
"other_objects": 2
},
"processing_metrics": {
"inference_time": 1.23,
"total_processing_time": 2.45,
"frames_per_second": 40.8
}
}
}Advanced Analysis Features
- Density Estimation: Object count per region/quadrant
- Activity Heatmaps: Movement concentration visualization
- Object Tracking: Basic trajectory analysis across video frames
- Scene Understanding: Dominant object and activity classification
๐ผ๏ธ Supported Image Formats & Specifications
Input Formats
Processing Specifications
- Resolution Handling: Automatic scaling for optimal processing
- Aspect Ratio Preservation: Maintains original image proportions
- Color Normalization: Standardized color processing pipeline
- Noise Reduction: Pre-processing filters for improved detection
โก Performance & Optimization
Speed & Efficiency
Quality & Accuracy
- Detection Rate: >85% accuracy for person detection
- Precision Control: Adjustable confidence thresholds (0.1-0.9)
- False Positive Reduction: Size-based filtering and multi-model validation
- Lighting Adaptation: Robust performance across varied lighting conditions
๐ API Endpoints
Primary Processing Endpoints
Job Management
Advanced Features
System Endpoints
๐ Authentication
All processing endpoints require an API key in the header:
curl -X POST "https://oladokedamilola-image-processing-api.hf.space/api/v1/process/image" \
-H "X-API-Key: your-api-key-here" \
-F "file=@image.jpg"๐ Quick Start Examples
Python
import requests
url = "https://oladokedamilola-image-processing-api.hf.space/api/v1/process/image"
headers = {"X-API-Key": "your-api-key-here"}
files = {"file": open("image.jpg", "rb")}
response = requests.post(url, headers=headers, files=files)
results = response.json()
print(f"Detected {results['detection_count']} objects")
for detection in results['detections']:
print(f" {detection['label']}: {detection['confidence']:.2f}")JavaScript
const formData = new FormData();
formData.append('file', imageFile);
fetch('https://oladokedamilola-image-processing-api.hf.space/api/v1/process/image', {
method: 'POST',
headers: { 'X-API-Key': 'your-api-key-here' },
body: formData
})
.then(response => response.json())
.then(data => console.log(data));๐ ๏ธ Technical Stack
๐ Deployment Status
status: "Production Ready"
platform: "Hugging Face Spaces"
hardware: "CPU (2 vCPU, 16GB RAM)"
uptime: "24/7 with auto-sleep after 48h idle"
region: "Global CDN"๐ Environment Variables
๐ License
MIT License ยฉ 2026 Oladoke Damilola
๐ค Support
- Issues: GitHub Issues
- Documentation:
/docsendpoint - Status: `/health`
Status: Production Ready | Image Processing Focus: Core Functionality Optimized For: Real-time analysis, High-volume processing, Accurate detection Deployed on: Hugging Face Spaces ๐
---