File size: 2,769 Bytes
a5a8b9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aad25b1
 
a5a8b9d
aad25b1
 
 
a5a8b9d
 
 
 
 
aad25b1
 
a5a8b9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---

title: Orcan VisionTrace GPU Service
emoji: 👁️
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
tags:
- face-recognition
- computer-vision
- faiss
- gpu-acceleration
- similarity-search
---


# Orcan VisionTrace GPU Service

GPU-accelerated face recognition and FAISS indexing service for high-performance reverse image search.

## Features

- **Batch Face Embedding Extraction**: Process multiple images simultaneously using InsightFace on GPU
- **GPU-Accelerated FAISS Indexing**: Create high-performance vector indexes for similarity search
- **Image Enhancement**: Automatic quality improvement for poor quality inputs (CCTV, low-light images)
- **High-Performance Search**: Fast similarity search with adaptive thresholds
- **Scalable Architecture**: Optimized for production workloads with automatic scaling

## API Endpoints

### POST /extract_embeddings_batch
Extract face embeddings from multiple images in parallel.

**Request:**
```json

{

  "images": ["base64_encoded_image1", "base64_encoded_image2"],

  "enhance_quality": true,

  "aggressive_enhancement": false

}

```

**Response:**
```json

{

  "embeddings": [[embedding_vector1], [embedding_vector2]],

  "extraction_info": [{"face_count": 1, "confidence": 0.95}, ...],

  "total_processed": 2,

  "successful": 2

}

```

### POST /create_faiss_index
Create optimized FAISS index on GPU for fast similarity search.

**Request:**
```json

{

  "embeddings": [[embedding1], [embedding2], ...],

  "dataset_size": 10000,

  "dimension": 512

}

```

### POST /search_faiss

Perform similarity search on FAISS index.



### GET /health

Health check endpoint.



## Hardware Requirements



- **GPU**: NVIDIA A10G or A100 recommended

- **Memory**: Minimum 8GB GPU memory

- **CUDA**: Compatible with CUDA 11.8+



## Performance



- **Face Extraction**: 10-20x faster than CPU (0.05-0.1s per image)

- **Index Creation**: 5-10x faster than CPU

- **Search Latency**: <50ms for most queries

- **Throughput**: 50+ images per batch



## Use Cases



- Reverse image search systems

- Identity verification systems

- Photo organization and management

- Security and surveillance applications

- Digital asset management



## Model Details



- **Face Detection**: InsightFace RetinaFace

- **Face Recognition**: ArcFace embeddings (512-dimensional)

- **Enhancement**: Multi-strategy image quality improvement

- **Indexing**: Adaptive FAISS index selection based on dataset size



## Limitations



- Requires high-quality face images for best results

- GPU memory limits batch size for very large images

- Cold start latency of ~30 seconds on first request



## License



MIT License - See LICENSE file for details.